What does errno 98 (EPROTOTYPE) mean?

 
Could be also:
ConstantTypeOS
EADDRINUSEerrnoLinux
ENOSRerrnoMac
OBJECT1_INITIALIZATION_FAILEDBugCheck CodeWindows
Previous Next
ENOSR EADDRNOTAVAIL

EPROTOTYPE

Protocol and socket type are individually known but incompatible

EPROTOTYPE identifies a mismatch between a protocol and requested socket semantics. Solaris says the specified protocol does not support the socket type. POSIX socket() similarly allows the error when a nonzero protocol is requested with a type that protocol does not support.

This is more precise than EPROTONOSUPPORT: the issue is not simply that the protocol implementation is absent. It also differs from ESOCKTNOSUPPORT, where the socket type itself may be unsupported by the family or implementation. The failing triple of domain, type, and protocol is required to tell them apart.

Validate the socket argument combination

  • Log the symbolic and numeric domain, type, and protocol values passed to socket().
  • Check whether an explicit protocol number is necessary; protocol zero asks the implementation for a default appropriate to the family and type.
  • Review copied platform constants and conditional compilation when the same code runs on several UNIX-like systems.

References


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