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