| Previous | Next |
| EIDRM | ENOCSI |
EPROTONOSUPPORT
The protocol is unavailable before a connection can begin
EPROTONOSUPPORT means that the requested protocol cannot be used with the selected socket family on this system. The error is local: it does not say that a remote server rejected the connection, and it can occur before any packet is sent.
It is important to retain the protocol number as well as any high-level protocol name. Libraries often translate a configuration such as “TCP” or “raw” into a family, type, and protocol triple; the conversion layer can choose an invalid triple even when each component is valid in another combination.
Distinguish the three layers of compatibility
EPFNOSUPPORTconcerns the protocol family itself.ESOCKTNOSUPPORTconcerns the requested socket type.EPROTOTYPEconcerns an incompatible type/protocol pairing.
What to verify
Start with the exact socket() arguments and any platform-specific feature gate. Only after a compatible socket has been created do address, route, service, TLS, or application-protocol diagnostics become relevant.
References
Looking for a different code? Search another status or error code.