diff options
author | Damien Miller <djm@mindrot.org> | 2010-11-24 10:50:04 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2010-11-24 10:50:04 +1100 |
commit | 73de86ac5a1f8a82439dca4988288182ffd11489 (patch) | |
tree | 70dcdf425e3ed92e90e5996e8a76fbfd8084f50f | |
parent | 4b6cbf7aabbcbe170a69e9780e7c4ec06a3224e0 (diff) |
- (djm) [defines.h] Add IP DSCP defines
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | defines.h | 39 |
2 files changed, 39 insertions, 1 deletions
@@ -4,6 +4,7 @@ | |||
4 | - (djm) [loginrec.c] Relax permission requirement on btmp logs to allow | 4 | - (djm) [loginrec.c] Relax permission requirement on btmp logs to allow |
5 | group read/write. ok dtucker@ | 5 | group read/write. ok dtucker@ |
6 | - (dtucker) [packet.c] Remove redundant local declaration of "int tos". | 6 | - (dtucker) [packet.c] Remove redundant local declaration of "int tos". |
7 | - (djm) [defines.h] Add IP DSCP defines | ||
7 | 8 | ||
8 | 20101122 | 9 | 20101122 |
9 | - (dtucker) Bug #1840: fix warning when configuring --with-ssl-engine, patch | 10 | - (dtucker) Bug #1840: fix warning when configuring --with-ssl-engine, patch |
@@ -25,7 +25,7 @@ | |||
25 | #ifndef _DEFINES_H | 25 | #ifndef _DEFINES_H |
26 | #define _DEFINES_H | 26 | #define _DEFINES_H |
27 | 27 | ||
28 | /* $Id: defines.h,v 1.162 2010/10/25 05:54:28 dtucker Exp $ */ | 28 | /* $Id: defines.h,v 1.163 2010/11/23 23:50:05 djm Exp $ */ |
29 | 29 | ||
30 | 30 | ||
31 | /* Constants */ | 31 | /* Constants */ |
@@ -42,6 +42,9 @@ enum | |||
42 | # define SHUT_RDWR SHUT_RDWR | 42 | # define SHUT_RDWR SHUT_RDWR |
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | /* | ||
46 | * Definitions for IP type of service (ip_tos) | ||
47 | */ | ||
45 | #ifndef IPTOS_LOWDELAY | 48 | #ifndef IPTOS_LOWDELAY |
46 | # define IPTOS_LOWDELAY 0x10 | 49 | # define IPTOS_LOWDELAY 0x10 |
47 | # define IPTOS_THROUGHPUT 0x08 | 50 | # define IPTOS_THROUGHPUT 0x08 |
@@ -50,6 +53,40 @@ enum | |||
50 | # define IPTOS_MINCOST IPTOS_LOWCOST | 53 | # define IPTOS_MINCOST IPTOS_LOWCOST |
51 | #endif /* IPTOS_LOWDELAY */ | 54 | #endif /* IPTOS_LOWDELAY */ |
52 | 55 | ||
56 | /* | ||
57 | * Definitions for DiffServ Codepoints as per RFC2474 | ||
58 | */ | ||
59 | #include <netinet/in_systm.h> | ||
60 | #include <netinet/ip.h> | ||
61 | #ifndef IPTOS_DSCP_AF11 | ||
62 | # define IPTOS_DSCP_AF11 0x28 | ||
63 | # define IPTOS_DSCP_AF12 0x30 | ||
64 | # define IPTOS_DSCP_AF13 0x38 | ||
65 | # define IPTOS_DSCP_AF21 0x48 | ||
66 | # define IPTOS_DSCP_AF22 0x50 | ||
67 | # define IPTOS_DSCP_AF23 0x58 | ||
68 | # define IPTOS_DSCP_AF31 0x68 | ||
69 | # define IPTOS_DSCP_AF32 0x70 | ||
70 | # define IPTOS_DSCP_AF33 0x78 | ||
71 | # define IPTOS_DSCP_AF41 0x88 | ||
72 | # define IPTOS_DSCP_AF42 0x90 | ||
73 | # define IPTOS_DSCP_AF43 0x98 | ||
74 | # define IPTOS_DSCP_EF 0xb8 | ||
75 | #endif /* IPTOS_DSCP_AF11 */ | ||
76 | #ifndef IPTOS_DSCP_CS0 | ||
77 | # define IPTOS_DSCP_CS0 0x00 | ||
78 | # define IPTOS_DSCP_CS1 0x20 | ||
79 | # define IPTOS_DSCP_CS2 0x40 | ||
80 | # define IPTOS_DSCP_CS3 0x60 | ||
81 | # define IPTOS_DSCP_CS4 0x80 | ||
82 | # define IPTOS_DSCP_CS5 0xa0 | ||
83 | # define IPTOS_DSCP_CS6 0xc0 | ||
84 | # define IPTOS_DSCP_CS7 0xe0 | ||
85 | #endif /* IPTOS_DSCP_CS0 */ | ||
86 | #ifndef IPTOS_DSCP_EF | ||
87 | # define IPTOS_DSCP_EF 0xb8 | ||
88 | #endif /* IPTOS_DSCP_EF */ | ||
89 | |||
53 | #ifndef MAXPATHLEN | 90 | #ifndef MAXPATHLEN |
54 | # ifdef PATH_MAX | 91 | # ifdef PATH_MAX |
55 | # define MAXPATHLEN PATH_MAX | 92 | # define MAXPATHLEN PATH_MAX |