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.h | |
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.h')
-rw-r--r-- | sys/netinet/in_pcb.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index c17213b..4945b0f 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -509,6 +509,7 @@ void inp_4tuple_get(struct inpcb *inp, uint32_t *laddr, uint16_t *lp, #define INP_DONTFRAG 0x00000800 /* don't fragment packet */ #define INP_BINDANY 0x00001000 /* allow bind to any address */ #define INP_INHASHLIST 0x00002000 /* in_pcbinshash() has been called */ +#define INP_RECVTOS 0x00004000 /* receive incoming IP TOS */ #define IN6P_IPV6_V6ONLY 0x00008000 /* restrict AF_INET6 socket for v6 */ #define IN6P_PKTINFO 0x00010000 /* receive IP6 dst and I/F */ #define IN6P_HOPLIMIT 0x00020000 /* receive hoplimit */ @@ -528,7 +529,7 @@ void inp_4tuple_get(struct inpcb *inp, uint32_t *laddr, uint16_t *lp, #define IN6P_MTU 0x80000000 /* receive path MTU */ #define INP_CONTROLOPTS (INP_RECVOPTS|INP_RECVRETOPTS|INP_RECVDSTADDR|\ - INP_RECVIF|INP_RECVTTL|\ + INP_RECVIF|INP_RECVTTL|INP_RECVTOS|\ IN6P_PKTINFO|IN6P_HOPLIMIT|IN6P_HOPOPTS|\ IN6P_DSTOPTS|IN6P_RTHDR|IN6P_RTHDRDSTOPTS|\ IN6P_TCLASS|IN6P_AUTOFLOWLABEL|IN6P_RFC2292|\ |