From 487d1d39b6457a4a3aeb2b9dac3b1925a003a3e1 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 14 Mar 2002 12:22:06 +0000 Subject: add DSCP match --- include/linux/netfilter_ipv4/ipt_DSCP.h | 23 ++++++++++------------- include/linux/netfilter_ipv4/ipt_dscp.h | 23 +++++++++++++++++++++++ 2 files changed, 33 insertions(+), 13 deletions(-) create mode 100644 include/linux/netfilter_ipv4/ipt_dscp.h (limited to 'include') diff --git a/include/linux/netfilter_ipv4/ipt_DSCP.h b/include/linux/netfilter_ipv4/ipt_DSCP.h index 361eb2af..499fca49 100644 --- a/include/linux/netfilter_ipv4/ipt_DSCP.h +++ b/include/linux/netfilter_ipv4/ipt_DSCP.h @@ -1,23 +1,20 @@ -/* Set DSCP field - * - * (C) 2000-2002 by Matthew G. Marsh - * Harald Welte +/* iptables module for setting the IPv4 DSCP field * + * (C) 2002 Harald Welte + * based on ipt_FTOS.c (C) 2000 by Matthew G. Marsh * This software is distributed under GNU GPL v2, 1991 * - * ipt_DSCP.h borrowed heavily from ipt_TOS.h 11/09/2000 + * See RFC2474 for a description of the DSCP field within the IP Header. * - * $Id: ipt_DSCP.h,v 1.3 2002/02/17 19:56:28 laforge Exp $ + * Id: ipt_DSCP.h,v 1.7 2002/03/14 12:03:13 laforge Exp */ -#ifndef _IPT_DSCP_H -#define _IPT_DSCP_H - -#define IPT_DSCP_MASK 0xf4 /* 11111100 */ -#define IPT_DSCP_SHIFT 2 /* shift DSCP two bits for ECN */ -#define IPT_DSCP_MAX 0x3f /* 00111111 */ +#ifndef _IPT_DSCP_TARGET_H +#define _IPT_DSCP_TARGET_H +#include +/* target info */ struct ipt_DSCP_info { u_int8_t dscp; }; -#endif /* _IPT_DSCP_H */ +#endif /* _IPT_DSCP_TARGET_H */ diff --git a/include/linux/netfilter_ipv4/ipt_dscp.h b/include/linux/netfilter_ipv4/ipt_dscp.h new file mode 100644 index 00000000..1d728753 --- /dev/null +++ b/include/linux/netfilter_ipv4/ipt_dscp.h @@ -0,0 +1,23 @@ +/* iptables module for matching the IPv4 DSCP field + * + * (C) 2002 Harald Welte + * This software is distributed under GNU GPL v2, 1991 + * + * See RFC2474 for a description of the DSCP field within the IP Header. + * + * Id: ipt_dscp.h,v 1.1 2002/03/14 12:03:13 laforge Exp +*/ +#ifndef _IPT_DSCP_H +#define _IPT_DSCP_H + +#define IPT_DSCP_MASK 0xfc /* 11111100 */ +#define IPT_DSCP_SHIFT 2 /* shift DSCP two bits for ECN */ +#define IPT_DSCP_MAX 0x3f /* 00111111 */ + +/* match info */ +struct ipt_dscp_info { + u_int8_t dscp; + u_int8_t invert; +}; + +#endif /* _IPT_DSCP_H */ -- cgit v1.2.3