Open System Services System Calls Reference Manual (G06.25+, H06.03+)

System Functions (s and S) socketpair(2)
RETURN VALUES
Upon successful completion, the socketpair() function returns the value 0 (zero). Otherwise, the
value -1 is returned, and errno is set to indicate the error.
ERRORS
If any of these conditions occurs, the socketpair() function sets errno to the corresponding
value:
[EACCES] The process does not have appropriate privileges to create a socket.
[EAFNOSUPPORT]
The specied address family is not supported.
[EFAULT] A user-supplied memory buffer cannot be accessed or written.
[EMFILE] No more le descriptors are available for this process.
[ENFILE] The maximum number of le descriptors for this processor are already open.
[ENOBUFS] There was not enough buffer space available to complete the call. A retry at a
later time might succeed.
[ENOENT] One of these conguration errors might have occurred:
A requested transport provider process is not available.
An initialization error occurred because of a QIO address conict.
An initialization error occurred because of a parallel TCP/IP address
conict.
The name of an unavailable transport-provider process can be obtained by a call
to the socket_transport_name_get() function.
[ENOMEM] Required memory resources were not available. A retry at a later time might
succeed.
[EOPNOTSUPP]
The specied protocol does not permit the creation of socket pairs.
[EPROTONOSUPPORT]
The specied address family does not support the specied protocol.
[EPROTOTYPE]
The specied socket type is not supported by the protocol.
[ETANOTRUNNING]
The OSS transport agent for this processor is not running.
This error can also occur when the calling process has migrated to a new proces-
sor that does not have a transport agent to support sockets. The socket can only
be closed.
RELATED INFORMATION
Functions: accept(2), bind(2), connect(2), getsockname(2), getsockopt(2), listen(2), recv(2),
recvfrom(2), recvmsg(2), send(2), sendmsg(2), sendto(2), setsockopt(2), shutdown(2),
socket(2), socket_transport_name_get(2), socket_transport_name_set(2).
527186-003 Hewlett-Packard Company 777