diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-core/uclibc/uclibc-git/0001-Define-IPTOS_CLASS_-macros-according-to-RFC-2474.patch | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-core/uclibc/uclibc-git/0001-Define-IPTOS_CLASS_-macros-according-to-RFC-2474.patch')
-rw-r--r-- | meta/recipes-core/uclibc/uclibc-git/0001-Define-IPTOS_CLASS_-macros-according-to-RFC-2474.patch | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/meta/recipes-core/uclibc/uclibc-git/0001-Define-IPTOS_CLASS_-macros-according-to-RFC-2474.patch b/meta/recipes-core/uclibc/uclibc-git/0001-Define-IPTOS_CLASS_-macros-according-to-RFC-2474.patch new file mode 100644 index 0000000000..d613823695 --- /dev/null +++ b/meta/recipes-core/uclibc/uclibc-git/0001-Define-IPTOS_CLASS_-macros-according-to-RFC-2474.patch | |||
@@ -0,0 +1,75 @@ | |||
1 | From be8ed13a90c528adfbe3c8543946bb2c5a2ad713 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 25 Aug 2014 15:50:36 -0700 | ||
4 | Subject: [PATCH] Define IPTOS_CLASS_* macros according to RFC 2474 | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | Upstream-status: Pending | ||
8 | --- | ||
9 | include/netinet/ip.h | 42 ++++++++++++++++++++++++++++++------------ | ||
10 | 1 file changed, 30 insertions(+), 12 deletions(-) | ||
11 | |||
12 | diff --git a/include/netinet/ip.h b/include/netinet/ip.h | ||
13 | index 19e1249..3fe58b9 100644 | ||
14 | --- a/include/netinet/ip.h | ||
15 | +++ b/include/netinet/ip.h | ||
16 | @@ -188,7 +188,25 @@ struct ip_timestamp | ||
17 | #define IPTOS_DSCP_EF 0xb8 | ||
18 | |||
19 | /* | ||
20 | - * Definitions for IP type of service (ip_tos) | ||
21 | + * In RFC 2474, Section 4.2.2.1, the Class Selector Codepoints subsume | ||
22 | + * the old ToS Precedence values. | ||
23 | + */ | ||
24 | +#define IPTOS_CLASS_MASK 0xe0 | ||
25 | +#define IPTOS_CLASS(class) ((class) & IPTOS_CLASS_MASK) | ||
26 | +#define IPTOS_CLASS_CS0 0x00 | ||
27 | +#define IPTOS_CLASS_CS1 0x20 | ||
28 | +#define IPTOS_CLASS_CS2 0x40 | ||
29 | +#define IPTOS_CLASS_CS3 0x60 | ||
30 | +#define IPTOS_CLASS_CS4 0x80 | ||
31 | +#define IPTOS_CLASS_CS5 0xa0 | ||
32 | +#define IPTOS_CLASS_CS6 0xc0 | ||
33 | +#define IPTOS_CLASS_CS7 0xe0 | ||
34 | + | ||
35 | +#define IPTOS_CLASS_DEFAULT IPTOS_CLASS_CS0 | ||
36 | + | ||
37 | +/* | ||
38 | + * Definitions for IP type of service (ip_tos) [deprecated; use DSCP | ||
39 | + * and CS definitions above instead.] | ||
40 | */ | ||
41 | #define IPTOS_TOS_MASK 0x1E | ||
42 | #define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK) | ||
43 | @@ -199,18 +217,18 @@ struct ip_timestamp | ||
44 | #define IPTOS_MINCOST IPTOS_LOWCOST | ||
45 | |||
46 | /* | ||
47 | - * Definitions for IP precedence (also in ip_tos) (hopefully unused) | ||
48 | + * Definitions for IP precedence (also in ip_tos) [also deprecated.] | ||
49 | */ | ||
50 | -#define IPTOS_PREC_MASK 0xe0 | ||
51 | -#define IPTOS_PREC(tos) ((tos) & IPTOS_PREC_MASK) | ||
52 | -#define IPTOS_PREC_NETCONTROL 0xe0 | ||
53 | -#define IPTOS_PREC_INTERNETCONTROL 0xc0 | ||
54 | -#define IPTOS_PREC_CRITIC_ECP 0xa0 | ||
55 | -#define IPTOS_PREC_FLASHOVERRIDE 0x80 | ||
56 | -#define IPTOS_PREC_FLASH 0x60 | ||
57 | -#define IPTOS_PREC_IMMEDIATE 0x40 | ||
58 | -#define IPTOS_PREC_PRIORITY 0x20 | ||
59 | -#define IPTOS_PREC_ROUTINE 0x00 | ||
60 | +#define IPTOS_PREC_MASK IPTOS_CLASS_MASK | ||
61 | +#define IPTOS_PREC(tos) IPTOS_CLASS(tos) | ||
62 | +#define IPTOS_PREC_NETCONTROL IPTOS_CLASS_CS7 | ||
63 | +#define IPTOS_PREC_INTERNETCONTROL IPTOS_CLASS_CS6 | ||
64 | +#define IPTOS_PREC_CRITIC_ECP IPTOS_CLASS_CS5 | ||
65 | +#define IPTOS_PREC_FLASHOVERRIDE IPTOS_CLASS_CS4 | ||
66 | +#define IPTOS_PREC_FLASH IPTOS_CLASS_CS3 | ||
67 | +#define IPTOS_PREC_IMMEDIATE IPTOS_CLASS_CS2 | ||
68 | +#define IPTOS_PREC_PRIORITY IPTOS_CLASS_CS1 | ||
69 | +#define IPTOS_PREC_ROUTINE IPTOS_CLASS_CS0 | ||
70 | |||
71 | /* | ||
72 | * Definitions for options. | ||
73 | -- | ||
74 | 2.1.0 | ||
75 | |||