What does errno 41 (EPROTOTYPE) mean?

 
Could be also:
ConstantTypeOS
KERN_LOCK_OWNED_SELFKern returnMac
ippStsI18nMsgCatalogInvalidIntel Ipp StatusAny
EWOULDBLOCKerrnoLinux
ELNRNGerrnoSolaris
ENOTEMPTYerrnoWindows
SECURITY_SYSTEMBugCheck CodeWindows
Previous Next
EWOULDBLOCK ELNRNG

EPROTOTYPE

Protocol and socket type do not form a valid combination

EPROTOTYPE identifies a mismatch among the values used to create or configure a socket. The family may be supported and the protocol may exist, yet that protocol is not appropriate for the chosen socket type.

Log all three inputs together: address family, SOCK_* type, and protocol number. Looking at only the protocol name can conceal the mismatch, especially when a wrapper chooses a default protocol for some socket types and an explicit one for others.

How it differs from similar creation failures

  • EPROTONOSUPPORT says the requested protocol itself is unavailable in the selected family.
  • ESOCKTNOSUPPORT says the socket type is unsupported; POSIX notes that implementations have historically varied in which of these codes they report for type/protocol selection.
  • EAFNOSUPPORT applies when an address family does not fit the socket or address used in an operation.

Diagnostic action

Reduce the failure to the exact socket(domain, type, protocol) call or to the later API that set the protocol-specific behavior. Do not treat this as an endpoint outage: no remote host is involved until a usable local socket exists.

References


Looking for a different code? Search another status or error code.