Skip to content

Commit a5d440a

Browse files
add it
1 parent b368226 commit a5d440a

14 files changed

Lines changed: 406 additions & 807 deletions

File tree

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,37 @@
1-
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2-
#ifndef _XT_CONNMARK_H_target
3-
#define _XT_CONNMARK_H_target
1+
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2+
/* Copyright (C) 2002,2004 MARA Systems AB <https://www.marasystems.com>
3+
* by Henrik Nordstrom <hno@marasystems.com>
4+
*/
45

5-
#include <linux/netfilter/xt_connmark.h>
6+
#ifndef _XT_CONNMARK_H
7+
#define _XT_CONNMARK_H
68

7-
#endif /*_XT_CONNMARK_H_target*/
9+
#include <linux/types.h>
10+
11+
enum {
12+
XT_CONNMARK_SET = 0,
13+
XT_CONNMARK_SAVE,
14+
XT_CONNMARK_RESTORE
15+
};
16+
17+
enum {
18+
D_SHIFT_LEFT = 0,
19+
D_SHIFT_RIGHT,
20+
};
21+
22+
struct xt_connmark_tginfo1 {
23+
__u32 ctmark, ctmask, nfmask;
24+
__u8 mode;
25+
};
26+
27+
struct xt_connmark_tginfo2 {
28+
__u32 ctmark, ctmask, nfmask;
29+
__u8 shift_dir, shift_bits, mode;
30+
};
31+
32+
struct xt_connmark_mtinfo1 {
33+
__u32 mark, mask;
34+
__u8 invert;
35+
};
36+
37+
#endif /*_XT_CONNMARK_H*/
Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2-
/* x_tables module for setting the IPv4/IPv6 DSCP field
2+
/* x_tables module for matching the IPv4/IPv6 DSCP field
33
*
44
* (C) 2002 Harald Welte <laforge@gnumonks.org>
5-
* based on ipt_FTOS.c (C) 2000 by Matthew G. Marsh <mgm@paktronix.com>
65
* This software is distributed under GNU GPL v2, 1991
76
*
87
* See RFC2474 for a description of the DSCP field within the IP Header.
98
*
10-
* xt_DSCP.h,v 1.7 2002/03/14 12:03:13 laforge Exp
9+
* xt_dscp.h,v 1.3 2002/08/05 19:00:21 laforge Exp
1110
*/
12-
#ifndef _XT_DSCP_TARGET_H
13-
#define _XT_DSCP_TARGET_H
14-
#include <linux/netfilter/xt_dscp.h>
11+
#ifndef _XT_DSCP_H
12+
#define _XT_DSCP_H
13+
1514
#include <linux/types.h>
1615

17-
/* target info */
18-
struct xt_DSCP_info {
16+
#define XT_DSCP_MASK 0xfc /* 11111100 */
17+
#define XT_DSCP_SHIFT 2
18+
#define XT_DSCP_MAX 0x3f /* 00111111 */
19+
20+
/* match info */
21+
struct xt_dscp_info {
1922
__u8 dscp;
23+
__u8 invert;
2024
};
2125

22-
struct xt_tos_target_info {
23-
__u8 tos_value;
26+
struct xt_tos_match_info {
2427
__u8 tos_mask;
28+
__u8 tos_value;
29+
__u8 invert;
2530
};
2631

27-
#endif /* _XT_DSCP_TARGET_H */
32+
#endif /* _XT_DSCP_H */
Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2-
#ifndef _XT_MARK_H_target
3-
#define _XT_MARK_H_target
2+
#ifndef _XT_MARK_H
3+
#define _XT_MARK_H
44

5-
#include <linux/netfilter/xt_mark.h>
5+
#include <linux/types.h>
66

7-
#endif /*_XT_MARK_H_target */
7+
struct xt_mark_tginfo2 {
8+
__u32 mark, mask;
9+
};
10+
11+
struct xt_mark_mtinfo1 {
12+
__u32 mark, mask;
13+
__u8 invert;
14+
};
15+
16+
#endif /*_XT_MARK_H*/
Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,39 @@
11
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2-
#ifndef _XT_RATEEST_TARGET_H
3-
#define _XT_RATEEST_TARGET_H
2+
#ifndef _XT_RATEEST_MATCH_H
3+
#define _XT_RATEEST_MATCH_H
44

55
#include <linux/types.h>
66
#include <linux/if.h>
77

8-
struct xt_rateest_target_info {
9-
char name[IFNAMSIZ];
10-
__s8 interval;
11-
__u8 ewma_log;
8+
enum xt_rateest_match_flags {
9+
XT_RATEEST_MATCH_INVERT = 1<<0,
10+
XT_RATEEST_MATCH_ABS = 1<<1,
11+
XT_RATEEST_MATCH_REL = 1<<2,
12+
XT_RATEEST_MATCH_DELTA = 1<<3,
13+
XT_RATEEST_MATCH_BPS = 1<<4,
14+
XT_RATEEST_MATCH_PPS = 1<<5,
15+
};
16+
17+
enum xt_rateest_match_mode {
18+
XT_RATEEST_MATCH_NONE,
19+
XT_RATEEST_MATCH_EQ,
20+
XT_RATEEST_MATCH_LT,
21+
XT_RATEEST_MATCH_GT,
22+
};
23+
24+
struct xt_rateest_match_info {
25+
char name1[IFNAMSIZ];
26+
char name2[IFNAMSIZ];
27+
__u16 flags;
28+
__u16 mode;
29+
__u32 bps1;
30+
__u32 pps1;
31+
__u32 bps2;
32+
__u32 pps2;
1233

1334
/* Used internally by the kernel */
14-
struct xt_rateest *est __attribute__((aligned(8)));
35+
struct xt_rateest *est1 __attribute__((aligned(8)));
36+
struct xt_rateest *est2 __attribute__((aligned(8)));
1537
};
1638

17-
#endif /* _XT_RATEEST_TARGET_H */
39+
#endif /* _XT_RATEEST_MATCH_H */
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2-
#ifndef _XT_TCPMSS_H
3-
#define _XT_TCPMSS_H
2+
#ifndef _XT_TCPMSS_MATCH_H
3+
#define _XT_TCPMSS_MATCH_H
44

55
#include <linux/types.h>
66

7-
struct xt_tcpmss_info {
8-
__u16 mss;
7+
struct xt_tcpmss_match_info {
8+
__u16 mss_min, mss_max;
9+
__u8 invert;
910
};
1011

11-
#define XT_TCPMSS_CLAMP_PMTU 0xffff
12-
13-
#endif /* _XT_TCPMSS_H */
12+
#endif /*_XT_TCPMSS_MATCH_H*/
Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,16 @@
11
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2-
/* Header file for iptables ipt_ECN target
3-
*
4-
* (C) 2002 by Harald Welte <laforge@gnumonks.org>
5-
*
6-
* This software is distributed under GNU GPL v2, 1991
7-
*
8-
* ipt_ECN.h,v 1.3 2002/05/29 12:17:40 laforge Exp
9-
*/
10-
#ifndef _IPT_ECN_TARGET_H
11-
#define _IPT_ECN_TARGET_H
2+
#ifndef _IPT_ECN_H
3+
#define _IPT_ECN_H
124

13-
#include <linux/types.h>
14-
#include <linux/netfilter/xt_DSCP.h>
5+
#include <linux/netfilter/xt_ecn.h>
6+
#define ipt_ecn_info xt_ecn_info
157

16-
#define IPT_ECN_IP_MASK (~XT_DSCP_MASK)
17-
18-
#define IPT_ECN_OP_SET_IP 0x01 /* set ECN bits of IPv4 header */
19-
#define IPT_ECN_OP_SET_ECE 0x10 /* set ECE bit of TCP header */
20-
#define IPT_ECN_OP_SET_CWR 0x20 /* set CWR bit of TCP header */
21-
22-
#define IPT_ECN_OP_MASK 0xce
23-
24-
struct ipt_ECN_info {
25-
__u8 operation; /* bitset of operations */
26-
__u8 ip_ect; /* ECT codepoint of IPv4 header, pre-shifted */
27-
union {
28-
struct {
29-
__u8 ece:1, cwr:1; /* TCP ECT bits */
30-
} tcp;
31-
} proto;
8+
enum {
9+
IPT_ECN_IP_MASK = XT_ECN_IP_MASK,
10+
IPT_ECN_OP_MATCH_IP = XT_ECN_OP_MATCH_IP,
11+
IPT_ECN_OP_MATCH_ECE = XT_ECN_OP_MATCH_ECE,
12+
IPT_ECN_OP_MATCH_CWR = XT_ECN_OP_MATCH_CWR,
13+
IPT_ECN_OP_MATCH_MASK = XT_ECN_OP_MATCH_MASK,
3214
};
3315

34-
#endif /* _IPT_ECN_TARGET_H */
16+
#endif /* IPT_ECN_H */

linux-6.14/include/uapi/linux/netfilter_ipv4/ipt_TTL.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2-
/* TTL modification module for IP tables
3-
* (C) 2000 by Harald Welte <laforge@netfilter.org> */
2+
/* IP tables module for matching the value of the TTL
3+
* (C) 2000 by Harald Welte <laforge@gnumonks.org> */
44

55
#ifndef _IPT_TTL_H
66
#define _IPT_TTL_H
77

88
#include <linux/types.h>
99

1010
enum {
11-
IPT_TTL_SET = 0,
12-
IPT_TTL_INC,
13-
IPT_TTL_DEC
11+
IPT_TTL_EQ = 0, /* equals */
12+
IPT_TTL_NE, /* not equals */
13+
IPT_TTL_LT, /* less than */
14+
IPT_TTL_GT, /* greater than */
1415
};
1516

16-
#define IPT_TTL_MAXMODE IPT_TTL_DEC
1717

18-
struct ipt_TTL_info {
18+
struct ipt_ttl_info {
1919
__u8 mode;
2020
__u8 ttl;
2121
};

linux-6.14/include/uapi/linux/netfilter_ipv6/ip6t_HL.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2-
/* Hop Limit modification module for ip6tables
2+
/* ip6tables module for matching the Hop Limit value
33
* Maciej Soltysiak <solt@dns.toxicfilms.tv>
4-
* Based on HW's TTL module */
4+
* Based on HW's ttl module */
55

66
#ifndef _IP6T_HL_H
77
#define _IP6T_HL_H
88

99
#include <linux/types.h>
1010

1111
enum {
12-
IP6T_HL_SET = 0,
13-
IP6T_HL_INC,
14-
IP6T_HL_DEC
12+
IP6T_HL_EQ = 0, /* equals */
13+
IP6T_HL_NE, /* not equals */
14+
IP6T_HL_LT, /* less than */
15+
IP6T_HL_GT, /* greater than */
1516
};
1617

17-
#define IP6T_HL_MAXMODE IP6T_HL_DEC
1818

19-
struct ip6t_HL_info {
19+
struct ip6t_hl_info {
2020
__u8 mode;
2121
__u8 hop_limit;
2222
};

0 commit comments

Comments
 (0)