diff options
author | tuexen <tuexen@FreeBSD.org> | 2012-06-12 14:02:38 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2012-06-12 14:02:38 +0000 |
commit | 32041f44edbadf78cfaf57b4d6a30f5c41b4732d (patch) | |
tree | a867871148d8c6679305e2f7f21287027fb6f717 /sys/netinet/in_pcb.c | |
parent | 66a991aeee1041abe4bfaca27b4d3d2ddaee1161 (diff) | |
download | FreeBSD-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 '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 e509610..dd1460f 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; |