summaryrefslogtreecommitdiffstats
path: root/sys/netinet/in.h
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2002-10-21 20:40:02 +0000
committeriedowse <iedowse@FreeBSD.org>2002-10-21 20:40:02 +0000
commit4d33fec54145dd857e0d47d64751830d35fcfc97 (patch)
treef73628bb4740abef23fe9db016ee5002de0220f7 /sys/netinet/in.h
parent87dd3ba969dc5d2c53808adc3eeb712963dfa18b (diff)
downloadFreeBSD-src-4d33fec54145dd857e0d47d64751830d35fcfc97.zip
FreeBSD-src-4d33fec54145dd857e0d47d64751830d35fcfc97.tar.gz
Implement a new IP_SENDSRCADDR ancillary message type that permits
a server process bound to a wildcard UDP socket to select the IP address from which outgoing packets are sent on a per-datagram basis. When combined with IP_RECVDSTADDR, such a server process can guarantee to reply to an incoming request using the same source IP address as the destination IP address of the request, without having to open one socket per server IP address. Discussed on: -net Approved by: re
Diffstat (limited to 'sys/netinet/in.h')
-rw-r--r--sys/netinet/in.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
index 09fb134..09fd395 100644
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -366,6 +366,7 @@ __END_DECLS
#define IP_RECVOPTS 5 /* bool; receive all IP opts w/dgram */
#define IP_RECVRETOPTS 6 /* bool; receive IP opts for response */
#define IP_RECVDSTADDR 7 /* bool; receive IP dst addr w/dgram */
+#define IP_SENDSRCADDR IP_RECVDSTADDR /* cmsg_type to set src addr */
#define IP_RETOPTS 8 /* ip_opts; set/get IP options */
#define IP_MULTICAST_IF 9 /* u_char; set/get IP multicast i/f */
#define IP_MULTICAST_TTL 10 /* u_char; set/get IP multicast ttl */
OpenPOWER on IntegriCloud