aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/ip.h
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2003-10-29 15:07:04 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2003-10-29 15:07:04 +0000
commit59dfcba4aab31c6484d99cac4075c55a61c99a6a (patch)
treeff2af6160ee3c3b0bf6e218dc2107ae003e82cde /sys/netinet/ip.h
parent3c0173a6666abfe554dc054d41ef90b6608ba3d4 (diff)
downloadsrc-59dfcba4aab31c6484d99cac4075c55a61c99a6a.tar.gz
src-59dfcba4aab31c6484d99cac4075c55a61c99a6a.zip
add ECN support in layer-3.
- implement the tunnel egress rule in ip_ecn_egress() in ip_ecn.c. make ip{,6}_ecn_egress() return integer to tell the caller that this packet should be dropped. - handle ECN at fragment reassembly in ip_input.c and frag6.c. Obtained from: KAME
Notes
Notes: svn path=/head/; revision=121684
Diffstat (limited to 'sys/netinet/ip.h')
-rw-r--r--sys/netinet/ip.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/sys/netinet/ip.h b/sys/netinet/ip.h
index 24f66ceb24db..025ad085d146 100644
--- a/sys/netinet/ip.h
+++ b/sys/netinet/ip.h
@@ -84,10 +84,11 @@ CTASSERT(sizeof (struct ip) == 20);
#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
/*
* Definitions for IP precedence (also in ip_tos) (hopefully unused)
@@ -102,6 +103,16 @@ CTASSERT(sizeof (struct ip) == 20);
#define IPTOS_PREC_ROUTINE 0x00
/*
+ * 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 options.
*/
#define IPOPT_COPIED(o) ((o)&0x80)