[Midnightbsd-cvs] src [8263] trunk/share/man/man4/ip.4: document IP_SENDSRCADDR option
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Sep 17 17:42:03 EDT 2016
Revision: 8263
http://svnweb.midnightbsd.org/src/?rev=8263
Author: laffer1
Date: 2016-09-17 17:42:03 -0400 (Sat, 17 Sep 2016)
Log Message:
-----------
document IP_SENDSRCADDR option
Modified Paths:
--------------
trunk/share/man/man4/ip.4
Modified: trunk/share/man/man4/ip.4
===================================================================
--- trunk/share/man/man4/ip.4 2016-09-17 21:41:31 UTC (rev 8262)
+++ trunk/share/man/man4/ip.4 2016-09-17 21:42:03 UTC (rev 8263)
@@ -32,7 +32,7 @@
.\" @(#)ip.4 8.2 (Berkeley) 11/30/93
.\" $MidnightBSD$
.\"
-.Dd June 12, 2012
+.Dd September 20, 2012
.Dt IP 4
.Os
.Sh NAME
@@ -172,9 +172,7 @@
.Pp
The source address to be used for outgoing
.Tn UDP
-datagrams on a socket that is not bound to a specific
-.Tn IP
-address can be specified as ancillary data with a type code of
+datagrams on a socket can be specified as ancillary data with a type code of
.Dv IP_SENDSRCADDR .
The msg_control field in the msghdr structure should point to a buffer
that contains a
@@ -189,6 +187,20 @@
cmsg_type = IP_SENDSRCADDR
.Ed
.Pp
+The socket should be either bound to
+.Dv INADDR_ANY
+and a local port, and the address supplied with
+.Dv IP_SENDSRCADDR
+should't be
+.Dv INADDR_ANY ,
+or the socket should be bound to a local address and the address supplied with
+.Dv IP_SENDSRCADDR
+should be
+.Dv INADDR_ANY .
+In the latter case bound address is overriden via generic source address
+selection logic, which would choose IP address of interface closest to
+destination.
+.Pp
For convenience,
.Dv IP_SENDSRCADDR
is defined to have the same value as
More information about the Midnightbsd-cvs
mailing list