Contents

sock_getpeername

Declaration

errno_t sock_getpeername(socket_t so, struct sockaddr *peername, int peernamelen);

Parameters

  • so:

    The socket.

  • peername:

    Storage for the peer name.

  • peernamelen:

    Length of storage for the peer name.

Return Value

0 on success otherwise the errno error.

Discussion

Retrieves the remote address of a connected socket. See 'man 2 getpeername'.

See Also

Network Kernel Extensions