Author: kevlo
Date: Sat Jul 18 06:48:30 2015
New Revision: 285669
URL: https://svnweb.freebsd.org/changeset/base/285669

Log:
  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

Modified:
  head/sys/netinet/ip.h

Modified: head/sys/netinet/ip.h
==============================================================================
--- head/sys/netinet/ip.h       Sat Jul 18 04:49:36 2015        (r285668)
+++ head/sys/netinet/ip.h       Sat Jul 18 06:48:30 2015        (r285669)
@@ -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
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to