]>
Commit | Line | Data |
---|---|---|
6f52b16c | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
2e4e6a17 HW |
2 | #ifndef _XT_TCPUDP_H |
3 | #define _XT_TCPUDP_H | |
4 | ||
60c195c7 AB |
5 | #include <linux/types.h> |
6 | ||
2e4e6a17 | 7 | /* TCP matching stuff */ |
d94d9fee | 8 | struct xt_tcp { |
60c195c7 AB |
9 | __u16 spts[2]; /* Source port range. */ |
10 | __u16 dpts[2]; /* Destination port range. */ | |
11 | __u8 option; /* TCP Option iff non-zero*/ | |
12 | __u8 flg_mask; /* TCP flags mask byte */ | |
13 | __u8 flg_cmp; /* TCP flags compare byte */ | |
14 | __u8 invflags; /* Inverse flags */ | |
2e4e6a17 HW |
15 | }; |
16 | ||
17 | /* Values for "inv" field in struct ipt_tcp. */ | |
18 | #define XT_TCP_INV_SRCPT 0x01 /* Invert the sense of source ports. */ | |
19 | #define XT_TCP_INV_DSTPT 0x02 /* Invert the sense of dest ports. */ | |
20 | #define XT_TCP_INV_FLAGS 0x04 /* Invert the sense of TCP flags. */ | |
21 | #define XT_TCP_INV_OPTION 0x08 /* Invert the sense of option test. */ | |
22 | #define XT_TCP_INV_MASK 0x0F /* All possible flags. */ | |
23 | ||
24 | /* UDP matching stuff */ | |
d94d9fee | 25 | struct xt_udp { |
60c195c7 AB |
26 | __u16 spts[2]; /* Source port range. */ |
27 | __u16 dpts[2]; /* Destination port range. */ | |
28 | __u8 invflags; /* Inverse flags */ | |
2e4e6a17 HW |
29 | }; |
30 | ||
31 | /* Values for "invflags" field in struct ipt_udp. */ | |
32 | #define XT_UDP_INV_SRCPT 0x01 /* Invert the sense of source ports. */ | |
33 | #define XT_UDP_INV_DSTPT 0x02 /* Invert the sense of dest ports. */ | |
34 | #define XT_UDP_INV_MASK 0x03 /* All possible flags. */ | |
35 | ||
36 | ||
37 | #endif |