diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2008-05-09 08:16:36 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2008-05-09 08:16:36 +0000 |
commit | d12ca08a1999b40395c207967c591990fa59a69f (patch) | |
tree | 51cff7e9853547f7b621f4e1d7689eaf4731afa7 /share/man/man4/ip.4 | |
parent | ad8be4dfc7776dbfada366da8b763e899325b0f4 (diff) |
add IP_RECVDSTPORT; ok jmc, beck
Diffstat (limited to 'share/man/man4/ip.4')
-rw-r--r-- | share/man/man4/ip.4 | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/share/man/man4/ip.4 b/share/man/man4/ip.4 index c06268d8e86..d460456924a 100644 --- a/share/man/man4/ip.4 +++ b/share/man/man4/ip.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: ip.4,v 1.27 2008/03/14 15:16:06 jmc Exp $ +.\" $OpenBSD: ip.4,v 1.28 2008/05/09 08:16:35 markus Exp $ .\" $NetBSD: ip.4,v 1.3 1994/11/30 16:22:19 jtc Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)ip.4 8.2 (Berkeley) 11/30/93 .\" -.Dd $Mdocdate: March 14 2008 $ +.Dd $Mdocdate: May 9 2008 $ .Dt IP 4 .Os .Sh NAME @@ -139,6 +139,33 @@ cmsg_type = IP_RECVDSTADDR .Ed .Pp If the +.Dv IP_RECVDSTPORT +option is enabled on a +.Dv SOCK_DGRAM +socket, +the +.Xr recvmsg 2 +call will return the destination +port for a +.Tn UDP +datagram. +The +.Va msg_control +field in the +.Vt msghdr +structure points to a buffer that contains a +.Vt cmsghdr +structure followed by the port in 16-bit network byte order. +The +.Vt cmsghdr +fields have the following values: +.Bd -literal -offset indent +cmsg_len = CMSG_LEN(sizeof(u_int16_t)) +cmsg_level = IPPROTO_IP +cmsg_type = IP_RECVDSTPORT +.Ed +.Pp +If the .Dv IP_RECVTTL option is enabled on a .Dv SOCK_DGRAM |