| Previous | Next |
| ENOMSG | EUNATCH |
ENOPROTOOPT
The option lookup failed before any network exchange
ENOPROTOOPT usually identifies an unavailable protocol option. It is most useful when logged with the exact getsockopt() or setsockopt() arguments: the descriptor, option level, option name, buffer length, and socket family/type.
An option name is not globally meaningful. The same numeric value can have a different meaning at another protocol level, and an option supported for one socket family may be unavailable for another. A build-time platform check does not prove that a runtime socket has the same capabilities.
Separate option availability from operation support
ENOPROTOOPTconcerns finding or applying a specific protocol option at a level.EOPNOTSUPPis broader: an operation, flag, or socket type does not support what the caller requested.EPROTONOSUPPORTarises earlier when the protocol itself cannot be used for the chosen family.
Actionable checks
Preserve symbolic and numeric level/option values in logs, not just a translated label. Then verify the option against the target macOS SDK and the actual socket family. Retrying the same unrecognized option cannot change its availability.
References
Looking for a different code? Search another status or error code.