Set the foreign address associated with a socket
#include <sys/dcmd_ip.h> /* * Desc: Set foreign address to associate with socket. * Args: Pointer to struct sockaddr from which address is taken. * Notes: Clients usually use connect() to generate this request. */ #define DCMD_IP_SDESTADDR __DIOT(_DCMD_IP, 0x03, struct sockaddr)
Argument | Value |
---|---|
filedes | A descriptor for a socket. |
dcmd | DCMD_IP_SDESTADDR |
dev_data_ptr | A pointer to a struct sockaddr |
n_bytes | sizeof(struct sockaddr) |
dev_info_ptr | NULL |
This command sets the foreign address associated with a socket. Clients usually use getpeername() to generate this request.
A struct sockaddr that contains the address.
None.
DCMD_IP_GDESTADDR, DCMD_IP_GSRCADDR, DCMD_IP_SSRCADDR
devctl(), getpeername() in the QNX Neutrino C Library Reference