DCMD_IP_GDESTADDR
QNX SDP8.0Devctl and Ioctl CommandsDeveloper
Get the foreign address associated with a socket
Synopsis:
#include <sys/dcmd_ip.h>
#define DCMD_IP_GDESTADDR __DIOF(_DCMD_IP, 0x02, struct sockaddr)
Arguments to devctl():
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 |
Description:
This command gets the foreign address associated with a socket. Clients usually use getpeername() to generate this request.
Input:
None.
Output:
A struct sockaddr that contains the address.
See also:
DCMD_IP_GSRCADDR, DCMD_IP_SDESTADDR, DCMD_IP_SSRCADDR
devctl() in the QNX OS C Library Reference
getpeername() in the QNX OS C Library Reference, G page
Page updated: