Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

System Functions (f - i) getpeername(2)
The connection was forcibly closed by the peer socket.
The socket can only be closed.
[EFAULT] A user-supplied memory buffer cannot be accessed or written.
[EINVAL] The socket has been shut down.
[ENOBUFS] There were not enough system resources available to complete the call. A retry
at a later time might succeed.
[ENOENT] The socket is either an AF_UNIX Release 1 datagram socket or an AF_UNIX
Release 2 datagram socket in compatibility mode and one of these conditions
occurred:
The underlying file of the peer socket specified in the address parameter
was renamed.
The underlying file of the peer socket specfied in the address parameter
was unlinked.
[ENOMEM] Required memory resources were not available. A retry at a later time might
succeed.
[ENOTCONN] The socket is not connected or has not had the peer socket previously specified.
[ENOTSOCK] The socket parameter does not refer to a socket.
[EOPNOTSUPP]
The operation is not supported for the protocol of the socket specified by the
socket parameter.
RELATED INFORMATION
Functions: accept(2), bind(2), getsockname(2), socket(2).
STANDARDS CONFORMANCE
The HP implementation does not return the errno value [ENOSR].
The following are HP extensions to the XPG4 specification:
The errno value [ECONNRESET] can be returned when the transport-provider process
is unavailable.
527186-023 Hewlett-Packard Company 377