/*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2016 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
#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)
#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.
*/
*/
#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 */