What does errno 101 (EADDRNOTAVAIL) mean?

 
Could be also:
ConstantTypeOS
ERROR_EXCL_SEM_ALREADY_OWNEDWin32 errorWindows
HTTP_STATUS_SWITCH_PROTOCOLSHTTP CodeAny
ENETUNREACHerrnoLinux
ETIMEerrnoMac
MEMORY1_INITIALIZATION_FAILEDBugCheck CodeWindows
Previous Next
ETIME ENETRESET

EADDRNOTAVAIL

EADDRNOTAVAIL describes an address that cannot be used in the current socket operation. For a local bind, that often means the requested local IP address is not assigned to an active interface. For an outbound operation, it can also reflect an incompatible address family, a stale interface choice, or a source-address selection constraint.

Do not confuse it with a remote host failure. The address may be syntactically valid, yet unavailable on this machine at this moment. In native Winsock code the corresponding diagnostic is normally a WSAEADDRNOTAVAIL status returned through WSAGetLastError(), rather than this UCRT macro.

Diagnostic data that matters

  • Record the full local and remote sockaddr values, their family, scope ID for IPv6 where applicable, and whether the address was selected explicitly or automatically.
  • Capture the interface and route state at the same time as the failure; a VPN, address renewal, or network namespace change can invalidate cached choices.
  • Check for binding an IPv4 address to an IPv6 socket or the reverse before assuming a routing issue.
  • For clients, prefer automatic ephemeral binding unless the application has a real source-address requirement.

References


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