diff options
author | Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> | 2006-08-22 03:29:37 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 17:55:21 -0400 |
commit | 9ba1627617d396135a4d679542a3623d5819e628 (patch) | |
tree | 4a0a72bca0e4a6ad91ae89b572ac58a074ba4eab /include | |
parent | 131852176c1f5b4350b4af811d1836db387d0c61 (diff) |
[NETFILTER]: x_tables: replace IPv4 dscp match by address family independent version
This replaces IPv4 dscp match by address family independent version.
This also
- utilizes dsfield.h to get the DS field in IPv4/IPv6 header, and
- checks for the DSCP value from user space.
- fixes Kconfig help text.
Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netfilter/xt_dscp.h | 23 | ||||
-rw-r--r-- | include/linux/netfilter_ipv4/ipt_dscp.h | 14 |
2 files changed, 29 insertions, 8 deletions
diff --git a/include/linux/netfilter/xt_dscp.h b/include/linux/netfilter/xt_dscp.h new file mode 100644 index 000000000000..1da61e6acaf7 --- /dev/null +++ b/include/linux/netfilter/xt_dscp.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* x_tables module for matching the IPv4/IPv6 DSCP field | ||
2 | * | ||
3 | * (C) 2002 Harald Welte <laforge@gnumonks.org> | ||
4 | * This software is distributed under GNU GPL v2, 1991 | ||
5 | * | ||
6 | * See RFC2474 for a description of the DSCP field within the IP Header. | ||
7 | * | ||
8 | * xt_dscp.h,v 1.3 2002/08/05 19:00:21 laforge Exp | ||
9 | */ | ||
10 | #ifndef _XT_DSCP_H | ||
11 | #define _XT_DSCP_H | ||
12 | |||
13 | #define XT_DSCP_MASK 0xfc /* 11111100 */ | ||
14 | #define XT_DSCP_SHIFT 2 | ||
15 | #define XT_DSCP_MAX 0x3f /* 00111111 */ | ||
16 | |||
17 | /* match info */ | ||
18 | struct xt_dscp_info { | ||
19 | u_int8_t dscp; | ||
20 | u_int8_t invert; | ||
21 | }; | ||
22 | |||
23 | #endif /* _XT_DSCP_H */ | ||
diff --git a/include/linux/netfilter_ipv4/ipt_dscp.h b/include/linux/netfilter_ipv4/ipt_dscp.h index 2fa6dfe92894..4b82ca912b0e 100644 --- a/include/linux/netfilter_ipv4/ipt_dscp.h +++ b/include/linux/netfilter_ipv4/ipt_dscp.h | |||
@@ -10,14 +10,12 @@ | |||
10 | #ifndef _IPT_DSCP_H | 10 | #ifndef _IPT_DSCP_H |
11 | #define _IPT_DSCP_H | 11 | #define _IPT_DSCP_H |
12 | 12 | ||
13 | #define IPT_DSCP_MASK 0xfc /* 11111100 */ | 13 | #include <linux/netfilter/xt_dscp.h> |
14 | #define IPT_DSCP_SHIFT 2 | ||
15 | #define IPT_DSCP_MAX 0x3f /* 00111111 */ | ||
16 | 14 | ||
17 | /* match info */ | 15 | #define IPT_DSCP_MASK XT_DSCP_MASK |
18 | struct ipt_dscp_info { | 16 | #define IPT_DSCP_SHIFT XT_DSCP_SHIFT |
19 | u_int8_t dscp; | 17 | #define IPT_DSCP_MAX XT_DSCP_MAX |
20 | u_int8_t invert; | 18 | |
21 | }; | 19 | #define ipt_dscp_info xt_dscp_info |
22 | 20 | ||
23 | #endif /* _IPT_DSCP_H */ | 21 | #endif /* _IPT_DSCP_H */ |