Get the foreign address associated with a socket
#include <sys/dcmd_ip.h> #define DCMD_IP_GDESTADDR __DIOF(_DCMD_IP, 0x02, struct sockaddr)
Argument | Value |
---|---|
filedes | A descriptor for a socket. |
dcmd | DCMD_IP_GDESTADDR |
dev_data_ptr | A pointer to a struct sockaddr |
n_bytes | sizeof(struct sockaddr) |
dev_info_ptr | NULL |
This command gets the foreign address associated with a socket. Clients usually use getpeername() to generate this request.
None.
A struct sockaddr that contains the address.
DCMD_IP_GSRCADDR, DCMD_IP_SDESTADDR, DCMD_IP_SSRCADDR
devctl(), getpeername() in the QNX Neutrino C Library Reference