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
This commit is contained in:
Kevin Lo 2015-07-18 06:48:30 +00:00
parent c6d48c8752
commit ddee45244d

View File

@ -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