]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netinet/ip.h
xnu-3789.1.32.tar.gz
[apple/xnu.git] / bsd / netinet / ip.h
index cc5131a0ac68dd58d5a374aa95e4f95b2794dc1f..0574f5c23689110be997c55be7bc28962f099740 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2016 Apple Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
@@ -121,10 +121,23 @@ struct ip {
 #define        IPTOS_THROUGHPUT        0x08
 #define        IPTOS_RELIABILITY       0x04
 #define        IPTOS_MINCOST           0x02
-/* ECN bits proposed by Sally Floyd */
-#define        IPTOS_CE                0x01    /* congestion experienced */
-#define        IPTOS_ECT               0x02    /* ECN-capable transport */
+#if 1
+/* ECN RFC3168 obsoletes RFC2481, and these will be deprecated soon. */
+#define        IPTOS_CE                0x01
+#define        IPTOS_ECT               0x02
+#endif
+
+#define        IPTOS_DSCP_SHIFT        2
 
+/*
+ * ECN (Explicit Congestion Notification) codepoints in RFC3168
+ * mapped to the lower 2 bits of the TOS field.
+ */
+#define        IPTOS_ECN_NOTECT        0x00    /* not-ECT */
+#define        IPTOS_ECN_ECT1          0x01    /* ECN-capable transport (1) */
+#define        IPTOS_ECN_ECT0          0x02    /* ECN-capable transport (0) */
+#define        IPTOS_ECN_CE            0x03    /* congestion experienced */
+#define        IPTOS_ECN_MASK          0x03    /* ECN field mask */
 
 /*
  * Definitions for IP precedence (also in ip_tos) (hopefully unused)
@@ -138,6 +151,17 @@ struct ip {
 #define        IPTOS_PREC_PRIORITY             0x20
 #define        IPTOS_PREC_ROUTINE              0x00
 
+#ifdef PRIVATE
+/*
+ * Definitions of traffic class for use within wireless LAN. 
+ * Mainly used by AFP for backup. Not recommended for general use.
+ */
+#define IP_TCLASS_BE                   0x00    /* standard, best effort */
+#define IP_TCLASS_BK                   0x20    /* Background, low priority */
+#define IP_TCLASS_VI                   0x80    /* Interactive */
+#define IP_TCLASS_VO                   0xc0    /* Signalling */
+
+#endif
 /*
  * Definitions for options.
  */
@@ -212,7 +236,7 @@ struct      ip_timestamp {
  */
 #define        MAXTTL          255             /* maximum time to live (seconds) */
 #define        IPDEFTTL        64              /* default ttl, from RFC 1340 */
-#define        IPFRAGTTL       60              /* time to live for frags, slowhz */
+#define        IPFRAGTTL       30              /* time to live for frags (seconds) */
 #define        IPTTLDEC        1               /* subtracted when forwarding */
 
 #define        IP_MSS          576             /* default maximum segment size */