TCP/IP Programming Manual
B Socket Errors
This appendix summarizes the socket errors that can be returned in the external variable errno
by the routines in the socket interface library.
Socket errors start at base 4000.
The errors returned in the external variable h_errno are not contained in this appendix. For those
errors, see the error descriptions under the gethostbyaddr and gethostbyname functions in
Chapter 4 (page 81).
The descriptions given here are general; you should interpret each error according to the type and
circumstances of the call. For specific information about the meaning of an error for a particular
socket routine, see the description of the individual routine in Chapter 4 (page 81).
Some of the errors defined in $SYSTEM.ZTCPIP.PARAMH are for HP internal use only and cannot
be received by application programs using the socket calls. This appendix lists only those socket
errors that can be received by application programs.
File-system errors can also be returned in errno upon return from a socket call. File-system errors
indicate that an error occurred during interprocess I/O. For descriptions of the file-system errors,
refer to the Guardian Procedure Errors and Messages Manual.
The SAP library function calls described in Chapter 4 (page 81), return file-system errors. For
descriptions of the file-system errors, refer to the Guardian Procedure Errors and Messages Manual.
The socket errors are described in alphabetical order. The error number associated with each error
is shown in parentheses following the mnemonic name of the error. Table 21 (page 253) lists of the
errors in numerical order.
Error number definitions can be found in the file $SYSTEM.SYSTEM.ERRNOH.
EACCES (4013)
EACCES
Cause
A call to bind or bind_nw specified an address or port number that cannot be assigned to a
nonprivileged user. Only applications whose process access ID is in the SUPER group (user ID
255,n) can bind a socket to a well-known port. 2. The requested operation specified a broadcast
address as the destination but the SO_BROADCAST socket option was not enabled (see setsockopt,
setsockopt_nw (page 184)).
Effect
The bind, bind_nw, sendto, or sendto_nw call failed.
Recovery
For bind and bind_nw, specify another port number or address, or rerun the application with
a process access ID in the SUPER group (user ID 255,n). For sendto or sendto_nw, set the
SO_BROADCAST option for the socket.
EADDRINUSE (4114)
EADDRINUSE
Cause
A call to bind or bind_nw specified an address-port number combination that is already in
use.
Effect
The bind or bind_nw call failed.
Recovery
Specify another address and port number.
243