X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/21362eb3e66fd2c787aee132bce100a44d71a99c..593a1d5fd87cdf5b46dd5fcb84467b432cea0f91:/bsd/netinet/ip.h?ds=sidebyside diff --git a/bsd/netinet/ip.h b/bsd/netinet/ip.h index 0bcda2140..c21698f61 100644 --- a/bsd/netinet/ip.h +++ b/bsd/netinet/ip.h @@ -64,7 +64,7 @@ #ifndef _NETINET_IP_H_ #define _NETINET_IP_H_ #include -#include > /* XXX temporary hack to get u_ types */ +#include /* XXX temporary hack to get u_ types */ #include #include @@ -121,10 +121,21 @@ 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 +/* + * 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)