IP_RECVORIGDSTADDR2const
Receive ip_origdstaddr control message
Usage
#include <netinet/in.h> /* Definition of IP* constants */ #include <sys/socket.h>
int setsockopt(int sockfd, IPPROTO_IP, IP_RECVORIGDSTADDR, const int *enable, sizeof(int));
Library
Standard C library (libc, -lc)
Overview
This boolean option enables the IP_ORIGDSTADDR ancillary message in recvmsg(2), in which the kernel returns the original destination address of the datagram being received.
The ancillary message contains a sockaddr_in(2type) structure.
Not supported for SOCK_STREAM sockets.
Errors
See IPPROTO_IP(2const). See setsockopt(2). See ip(7).