HP-UX Reference (11i v2 07/12) - 2 System Calls (vol 5)
s
send(2) send(2)
asynchronously. An asynchronous error can be caused by a gateway failing to
forward a datagram from this socket because the datagram exceeds the MTU of
the next-hop network and the "Don’t Fragment" (DF) bit in the datagram is set.
(See SO_PMTU in getsockopt (2)).
[EBADF] s is not a valid file descriptor.
[ECONNRESET] A connection was forcibly closed by a peer.
[EDESTADDRREQ] The to parameter needs to specify a destination address for the message. This is
also given if the specified address contains unspecified fields (see inet(7F)).
[EFAULT] An invalid pointer was specified in the msg or to parameter, or in the
msghdr
structure.
[EINTR] The operation was interrupted by a signal before any data was sent. (If some
data was sent, send() returns the number of bytes sent before the signal, and
[EINTR] is not set).
[EINVAL] The len or tolen parameter, or a length in the
msghdr structure is invalid. A
sendto() system call was issued on an X.25 socket, or the connection is in its
reset sequence and cannot accept data.
[EIO] A timeout occurred.
[EISCONN] An address was specified by to for a SOCK_DGRAM socket which is already con-
nected.
[EMSGSIZE] A length in the msghdr structure is invalid. The socket requires that messages
be sent atomically, and the size of the message to be sent made this impossible.
SOCK_DGRAM/AF_INET or SOCK_STREAM/AF_CCITT: The message size
exceeded the outbound buffer size.
[ENETDOWN] The interface used for the specified address is "down" (see ifconfig(1M)), no inter-
face for the specified address can be found (SO_DONTROUTE socket option in
use), or the X.25 Level 2 is down.
[EHOSTUNREACH]
The destination host is not reachable.
[ENETUNREACH] The destination network is not reachable. Some of the possible causes for this
error are:
(LAN) All encapsulations (e.g., ether, ieee) have been turned off (see also
ifconfig(1M)).
(X.25) The X.25 Level 2 is down. The X.25 link layer is not working (wires might
be broken, connections are loose on the interface hoods at the modem, the
modem failed, the packet switch at the remote end lost power or failed for some
reason, or electrical noise interfered with the line for an extremely long period of
time).
[ENOBUFS] No buffer space is available in the system to perform the operation.
[ENOMEM] No memory is available in the system to perform the operation.
[ENOPROTOOPT] The remote system or an intermediate system in the communications path does
not support a protocol option sent by the local system. This option may have
been set using a
getsockopt() or setsockopt() call, or set as a system
parameter.
[ENOTCONN] A send() on a socket that is not connected, or a send() on a socket that has
not completed the connect sequence with its peer, or is no longer connected to its
peer.
[ENOTSOCK] s is a valid file descriptor, but it is not a socket.
[EOPNOTSUPP] The MSG_OOB flag was specified; it is not supported for AF_UNIX or
AF_VME_LINK sockets.
[EPIPE] and SIGPIPE signal
An attempt was made to send on a socket that was connected, but the connection
HP-UX 11i Version 2: December 2007 Update − 5 − Hewlett-Packard Company 363