diff options
author | mdodd <mdodd@FreeBSD.org> | 2003-04-29 08:37:52 +0000 |
---|---|---|
committer | mdodd <mdodd@FreeBSD.org> | 2003-04-29 08:37:52 +0000 |
commit | 373ef8a1bd1e2ee8ff0e405b7e4a9f1e96190950 (patch) | |
tree | c6c7b147285d3838b5be7c0eb5a9051f5488998b /share | |
parent | ac3f359209bac4b38ad477c68283e2f558080df1 (diff) | |
download | FreeBSD-src-373ef8a1bd1e2ee8ff0e405b7e4a9f1e96190950.zip FreeBSD-src-373ef8a1bd1e2ee8ff0e405b7e4a9f1e96190950.tar.gz |
Document the IP_RECVIF socket option.
Submitted by: Bruce M Simpson
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man4/ip.4 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/share/man/man4/ip.4 b/share/man/man4/ip.4 index 7130014..93bf0de 100644 --- a/share/man/man4/ip.4 +++ b/share/man/man4/ip.4 @@ -164,6 +164,22 @@ control message from can be used directly as a control message for .Xr sendmsg 2 . .Pp +If the +.Dv IP_RECVIF +option is enabled on a +.Dv SOCK_DGRAM +socket, the +.Xr recvmsg 2 +call returns a struct sockaddr_dl corresponding to the interface on which the +packet was received. The msg_control field in the msghdr structure points +to a buffer that contains a cmsghdr structure followed by the +struct sockaddr_dl. The cmsghdr fields have the following values: +.Bd -literal +cmsg_len = sizeof(struct sockaddr_dl) +cmsg_level = IPPROTO_IP +cmsg_type = IP_RECVIF +.Ed +.Pp .Dv IP_PORTRANGE may be used to set the port range used for selecting a local port number on a socket with an unspecified (zero) port number. |