DCMD_IP_GSRCADDR

Get the local address associated with a socket

Synopsis:

#include <sys/dcmd_ip.h>

#define DCMD_IP_GSRCADDR        __DIOF(_DCMD_IP, 0x00, struct sockaddr)

Arguments to devctl():

Argument Value
filedes A descriptor for a socket.
dcmd DCMD_IP_GSRCADDR
dev_data_ptr A pointer to a struct sockaddr
n_bytes sizeof(struct sockaddr)
dev_info_ptr NULL

Description:

This command gets the local address associated with a socket. Clients usually use getsockname() to generate this request.

Input:

None.

Output:

The socket address.

See also:

DCMD_IP_GDESTADDR, DCMD_IP_SDESTADDR, DCMD_IP_SSRCADDR

devctl(), getsockname() in the QNX Neutrino C Library Reference