summaryrefslogtreecommitdiffstats
path: root/share/man/man4/ip.4
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2012-06-12 14:02:38 +0000
committertuexen <tuexen@FreeBSD.org>2012-06-12 14:02:38 +0000
commit32041f44edbadf78cfaf57b4d6a30f5c41b4732d (patch)
treea867871148d8c6679305e2f7f21287027fb6f717 /share/man/man4/ip.4
parent66a991aeee1041abe4bfaca27b4d3d2ddaee1161 (diff)
downloadFreeBSD-src-32041f44edbadf78cfaf57b4d6a30f5c41b4732d.zip
FreeBSD-src-32041f44edbadf78cfaf57b4d6a30f5c41b4732d.tar.gz
Add a IP_RECVTOS socket option to receive for received UDP/IPv4
packets a cmsg of type IP_RECVTOS which contains the TOS byte. Much like IP_RECVTTL does for TTL. This allows to implement a protocol on top of UDP and implementing ECN. MFC after: 3 days
Diffstat (limited to 'share/man/man4/ip.4')
-rw-r--r--share/man/man4/ip.425
1 files changed, 24 insertions, 1 deletions
diff --git a/share/man/man4/ip.4 b/share/man/man4/ip.4
index 96b17c7..d89b54d 100644
--- a/share/man/man4/ip.4
+++ b/share/man/man4/ip.4
@@ -32,7 +32,7 @@
.\" @(#)ip.4 8.2 (Berkeley) 11/30/93
.\" $FreeBSD$
.\"
-.Dd November 14, 2011
+.Dd June 12, 2012
.Dt IP 4
.Os
.Sh NAME
@@ -286,6 +286,29 @@ cmsg_type = IP_RECVTTL
.\"
.Pp
If the
+.Dv IP_RECVTOS
+option is enabled on a
+.Dv SOCK_DGRAM
+socket, the
+.Xr recvmsg 2
+call will return the
+.Tn IP
+.Tn TOS
+(type of service) field for a
+.Tn UDP
+datagram.
+The msg_control field in the msghdr structure points to a buffer
+that contains a cmsghdr structure followed by the
+.Tn TOS .
+The cmsghdr fields have the following values:
+.Bd -literal
+cmsg_len = CMSG_LEN(sizeof(u_char))
+cmsg_level = IPPROTO_IP
+cmsg_type = IP_RECVTOS
+.Ed
+.\"
+.Pp
+If the
.Dv IP_RECVIF
option is enabled on a
.Dv SOCK_DGRAM
OpenPOWER on IntegriCloud