| Previous | Next |
| ENOTSOCK | EMSGSIZE |
EDESTADDRREQ
No destination was available for this datagram-style send
EDESTADDRREQ means that the operation needs a destination address and none is available. A connectionless socket can obtain its destination from a sendto() or sendmsg() address, or from a peer previously set with connect(); without either, the kernel has nowhere to send the message.
This is an address-selection failure, not a DNS or route failure. The application has not yet supplied enough information for the network stack to begin routing. It is therefore distinct from ENETUNREACH and EHOSTUNREACH, which concern reachability after an address is known.
What to inspect
- Record which API was used:
send()uses the socket's peer state, whilesendto()andsendmsg()may supply a destination for each message. - For a datagram socket, verify whether the code deliberately uses a connected UDP-style socket or expects every send to carry an address.
- Log the complete
sockaddrlength and family when a destination was expected; a null or malformed address can be confused with an omitted one in application logs.
Related states
ENOTCONN applies to an operation that requires a connected peer. EISCONN can arise when code supplies a destination even though a connection-mode socket is already connected. They indicate opposite mistakes in managing peer state.
References
Looking for a different code? Search another status or error code.