diff options
author | Szabolcs Nagy <nsz@port70.net> | 2015-04-21 22:33:33 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-05-01 13:38:44 -0400 |
commit | 7561ac45ed94743c259c636cd15c048f492ffec1 (patch) | |
tree | cbf7e1a54f696016f87adfbef86903784239a891 /include/netinet/ip.h | |
parent | b02eed9c4841913d690a2d0029737d72615384fe (diff) | |
download | musl-7561ac45ed94743c259c636cd15c048f492ffec1.zip musl-7561ac45ed94743c259c636cd15c048f492ffec1.tar.gz musl-7561ac45ed94743c259c636cd15c048f492ffec1.tar.bz2 |
add IPTOS_CLASS_* macros to netinet/ip.h
These macros were introduced in glibc 2.12 to follow RFC 2474 which
deprecates "IP Precedence" in favor of "Class Selector Codepoints".
Diffstat (limited to 'include/netinet/ip.h')
-rw-r--r-- | include/netinet/ip.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/netinet/ip.h b/include/netinet/ip.h index 4118741..d7fa8d5 100644 --- a/include/netinet/ip.h +++ b/include/netinet/ip.h @@ -104,6 +104,18 @@ struct ip_timestamp { #define IPTOS_DSCP_AF43 0x98 #define IPTOS_DSCP_EF 0xb8 +#define IPTOS_CLASS_MASK 0xe0 +#define IPTOS_CLASS(x) ((x) & IPTOS_CLASS_MASK) +#define IPTOS_CLASS_CS0 0x00 +#define IPTOS_CLASS_CS1 0x20 +#define IPTOS_CLASS_CS2 0x40 +#define IPTOS_CLASS_CS3 0x60 +#define IPTOS_CLASS_CS4 0x80 +#define IPTOS_CLASS_CS5 0xa0 +#define IPTOS_CLASS_CS6 0xc0 +#define IPTOS_CLASS_CS7 0xe0 +#define IPTOS_CLASS_DEFAULT IPTOS_CLASS_CS0 + #define IPTOS_TOS_MASK 0x1E #define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK) #define IPTOS_LOWDELAY 0x10 |