diff options
author | Michael Tuexen <tuexen@FreeBSD.org> | 2012-06-12 14:02:38 +0000 |
---|---|---|
committer | Michael Tuexen <tuexen@FreeBSD.org> | 2012-06-12 14:02:38 +0000 |
commit | 3cca425b2916f7d7b2ed9e757c2ab48b99843044 (patch) | |
tree | a867871148d8c6679305e2f7f21287027fb6f717 /sys/netinet/in_pcb.c | |
parent | b36dcb9a396da984d07e424fc47a7216b74a87c7 (diff) | |
download | src-3cca425b2916f7d7b2ed9e757c2ab48b99843044.tar.gz src-3cca425b2916f7d7b2ed9e757c2ab48b99843044.zip |
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
Notes
Notes:
svn path=/head/; revision=236959
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r-- | sys/netinet/in_pcb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index e509610470cd..dd1460f585b7 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -2295,6 +2295,10 @@ db_print_inpflags(int inp_flags) db_printf("%sINP_DONTFRAG", comma ? ", " : ""); comma = 1; } + if (inp_flags & INP_RECVTOS) { + db_printf("%sINP_RECVTOS", comma ? ", " : ""); + comma = 1; + } if (inp_flags & IN6P_IPV6_V6ONLY) { db_printf("%sIN6P_IPV6_V6ONLY", comma ? ", " : ""); comma = 1; |