Contents

sock_getsockname

Declaration

errno_t sock_getsockname(socket_t so, struct sockaddr *sockname, int socknamelen);

Parameters

  • so:

    The socket.

  • sockname:

    Storage for the local name.

  • socknamelen:

    Length of storage for the socket name.

Return Value

0 on success otherwise the errno error.

Discussion

Retrieves the local address of a socket. See 'man 2 getsockname'.

See Also

Network Kernel Extensions