What does errno 94 (ESOCKTNOSUPPORT) mean?

 
Could be also:
ConstantTypeOS
EBADMSGerrnoMac
EUSERSerrnoSolaris
OBJECT_INITIALIZATION_FAILEDBugCheck CodeWindows
Previous Next
ENOTEMPTY EBADMSG

ESOCKTNOSUPPORT

ESOCKTNOSUPPORT means that the requested socket type is not available in the selected networking context. It can occur when code asks for an unknown SOCK_* type, requests a type that the address family or protocol does not implement, or reaches a protocol stack that is not configured to provide that type. The failure points to the domain/type/protocol tuple used to create or operate on the socket.

This is not the same diagnosis as EAFNOSUPPORT, where the address family itself is unsupported, or EPROTONOSUPPORT, where the protocol number is unavailable. It also differs from EPROTOTYPE, which concerns an incompatible protocol and socket type. Capturing all three creation arguments prevents the constants from being treated as interchangeable.

What to validate

  • Log the domain, socket type, protocol number, and the API that returned the error; include the concrete values after any flags such as SOCK_NONBLOCK are masked out.
  • Use the domain/type/protocol combination returned by getaddrinfo() where applicable rather than constructing a partly different socket manually.
  • Check the deployment target, network namespace, and kernel or module configuration when the same binary works on another host.
  • For an error returned by accept(), preserve the listener's type and pending network errors; Linux can surface protocol errors for a new connection through that call.

Linux IP sockets · Linux accept(2) · POSIX socketpair()


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