| Previous | Next |
| EUSERS | EMULTIHOP |
EOPNOTSUPP
EOPNOTSUPP means that the operation is incompatible with the socket that received it. The exact reason is API-specific. A listener operation such as accept() needs a connection-oriented socket; a send can reject flags that the socket type does not implement; and socketpair() can reject a protocol that does not permit creating a pair. This is therefore a contract mismatch, not evidence that the network is temporarily unavailable.
Do not merge it blindly with ENOPROTOOPT. The latter concerns an option name at a protocol level. EOPNOTSUPP can instead describe the operation itself, the socket's type, or an incompatible message flag. On Linux, ENOTSUP and EOPNOTSUPP share a numeric value, but portable code should not assume that relationship on every POSIX system.
What to compare
- Identify the failed operation and record the socket domain,
SOCK_*type, protocol, connection/listening state, and every nonzero message flag. - For servers, verify that
listen()andaccept()are used only with a connection-oriented transport. - For send and receive paths, validate protocol-specific support for flags such as out-of-band or peek behavior instead of retrying with the same flag set.
- Surface the mismatch during startup or configuration validation where possible; a runtime retry cannot add unsupported semantics to a socket.
Linux send(2) · POSIX accept() · Linux socketpair(2)
Looking for a different code? Search another status or error code.