send.2 (2010 09)

s
send(2) send(2)
[EACCES] Process doing a
send() of a broadcast packet does not have broadcast capa-
bility enabled for the socket. Use
setsockopt()
to enable broadcast capa-
bility.
[EAFNOSUPPORT] The specified address is not a valid address for the address family of this
socket.
[EAGAIN] Nonblocking I/O is enabled using the
O_NONBLOCK flag with fcntl(), and
the requested operation would block, or the socket has an error that was set
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
connected.
[EMSGSIZE] A length in the
msghdr structure is invalid. The socket requires that mes-
sages 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
interface 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 (for example, Ethernet, 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
HP-UX 11i Version 3: September 2010 5 Hewlett-Packard Company 5