Technical data

SunOS 5.5 Protocols ip(7P)
The IP layer will send an ICMP message back to the source host in many cases when it
receives a datagram that can not be handled. A “time exceeded”ICMP message will be
sent if the “time to live” field in theIP header drops to zero in the process of forwarding a
datagram. A “destination unreachable” message will be sent if a datagram can not be
forwarded because there is no route to the final destination, or if it can not be frag-
mented. If the datagram is addressed to the local host but is destined for a protocol that
is not supported or a port that is not in use, a destinationunreachable message will also
be sent. The IP layer may send anICMP “source quench” message if it is receiving
datagrams too quickly. ICMP messages are only sent for the first fragment of a frag-
mented datagram and are never returned in response to errors in other ICMP messages.
The IP layer supports fragmentation and reassembly. Datagrams are fragmented on out-
put if the datagram is larger than the maximum transmission unit (MTU) of the network
interface. Fragments of received datagrams are dropped from the reassembly queues if
the complete datagram is not reconstructed within a short time period.
Errors in sending discovered at the network interface driver layer are passed by IP back
up to the user process.
SEE ALSO ndd(1M), read(2), write(2), connect(3N), getsockopt(3N), recv(3N), send(3N), routing(4),
icmp(7P), if_tcp(7P), inet(7P) tcp(7P), udp(7P)
Postel, Jon, Internet Protocol - DARPA Internet Program Protocol Specification,RFC 791, Net-
work Information Center, SRI International, Menlo Park, Calif., September 1981.
DIAGNOSTICS A socket operation may fail with one of the following errors returned:
EACCES A IP broadcast destination address was specified and the caller
was not the privileged user.
EISCONN An attempt was made to establish a connection on a socket which
already had one, or to send a datagram with the destination
address specified and the socket was already connected.
EMSGSIZE An attempt was made to send a datagram that was too large for an
interface, but was not allowed to be fragmented (such as broad-
casts).
ENETUNREACH An attempt was made to establish a connection or send a
datagram, where there was no matching entry in the routing table,
or if an ICMP “destination unreachable” message was received.
ENOTCONN A datagrem was sent, but no destinationaddress was specified,
and the socket had not been connected.
ENOBUFS The system ran out of memory for fragmentation buffers or other
internal data structure.
EADDRNOTAVAIL An attempt was made to create a socket with a local address that
did not match any network interface, or anIP broadcast destina-
tion address was specified and the network interface does not sup-
port broadcast.
modified 3 Jul 1990 7P-147