| Previous | Next |
| ESTRPIPE | ENOATTR |
EPROTONOSUPPORT
EPROTONOSUPPORT means the system cannot provide the protocol requested for the selected socket domain. It commonly appears during socket() creation when the code specifies a protocol number that is unavailable or incompatible with that domain and type. It can also appear later where a protocol-specific operation is attempted against a socket that cannot support it.
Keep this separate from related errors. EAFNOSUPPORT concerns the address family itself. EPROTOTYPE describes a protocol or peer type mismatch. ENOPROTOOPT says that a particular socket option is unknown at the specified level. The distinctions matter because they point to different configuration fields.
What to validate
- Log the requested domain, type, and protocol numeric value at socket creation.
- Prefer the tuple returned by
getaddrinfo()instead of hard-coding a protocol number that may not exist in every environment. - Check container, kernel, or sandbox restrictions when code works on the host but not in the deployment target.
- For protocol options, verify the option level and option name against the selected protocol rather than retrying the same call.
POSIX socket() · Linux socket(2) · Linux getsockopt(2)
Looking for a different code? Search another status or error code.