diff options
author | kevlo <kevlo@FreeBSD.org> | 2015-07-18 06:48:30 +0000 |
---|---|---|
committer | kevlo <kevlo@FreeBSD.org> | 2015-07-18 06:48:30 +0000 |
commit | cad9ad69e50ec0e79836106ef79f5c6e37973b3d (patch) | |
tree | 7f164ff145858dd36e6077ab804409232cd7d760 | |
parent | 45306b6c484a040d225399e95a368b03c17efc08 (diff) | |
download | FreeBSD-src-cad9ad69e50ec0e79836106ef79f5c6e37973b3d.zip FreeBSD-src-cad9ad69e50ec0e79836106ef79f5c6e37973b3d.tar.gz |
Since the IETF has redefined the meaning of the tos field to accommodate
a set of differentiated services, set IPTOS_PREC_* macros using
IPTOS_DSCP_* macro definitions.
While here, add IPTOS_DSCP_VA macro according to RFC 5865.
Differential Revision: https://reviews.freebsd.org/D3119
Reviewed by: gnn
-rw-r--r-- | sys/netinet/ip.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/sys/netinet/ip.h b/sys/netinet/ip.h index 8487037..9269396 100644 --- a/sys/netinet/ip.h +++ b/sys/netinet/ip.h @@ -80,19 +80,19 @@ struct ip { #define IPTOS_MINCOST 0x02 /* - * Definitions for IP precedence (also in ip_tos) (hopefully unused). + * Definitions for IP precedence (also in ip_tos) (deprecated). */ -#define IPTOS_PREC_NETCONTROL 0xe0 -#define IPTOS_PREC_INTERNETCONTROL 0xc0 -#define IPTOS_PREC_CRITIC_ECP 0xa0 -#define IPTOS_PREC_FLASHOVERRIDE 0x80 -#define IPTOS_PREC_FLASH 0x60 -#define IPTOS_PREC_IMMEDIATE 0x40 -#define IPTOS_PREC_PRIORITY 0x20 -#define IPTOS_PREC_ROUTINE 0x00 +#define IPTOS_PREC_NETCONTROL IPTOS_DSCP_CS7 +#define IPTOS_PREC_INTERNETCONTROL IPTOS_DSCP_CS6 +#define IPTOS_PREC_CRITIC_ECP IPTOS_DSCP_CS5 +#define IPTOS_PREC_FLASHOVERRIDE IPTOS_DSCP_CS4 +#define IPTOS_PREC_FLASH IPTOS_DSCP_CS3 +#define IPTOS_PREC_IMMEDIATE IPTOS_DSCP_CS2 +#define IPTOS_PREC_PRIORITY IPTOS_DSCP_CS1 +#define IPTOS_PREC_ROUTINE IPTOS_DSCP_CS0 /* - * Definitions for DiffServ Codepoints as per RFC2474 + * Definitions for DiffServ Codepoints as per RFC2474 and RFC5865. */ #define IPTOS_DSCP_CS0 0x00 #define IPTOS_DSCP_CS1 0x20 @@ -112,6 +112,7 @@ struct ip { #define IPTOS_DSCP_AF42 0x90 #define IPTOS_DSCP_AF43 0x98 #define IPTOS_DSCP_CS5 0xa0 +#define IPTOS_DSCP_VA 0xb0 #define IPTOS_DSCP_EF 0xb8 #define IPTOS_DSCP_CS6 0xc0 #define IPTOS_DSCP_CS7 0xe0 |