Harald Welte | 2e4e6a1 | 2006-01-12 13:30:04 -0800 | [diff] [blame] | 1 | #ifndef _XT_TCPUDP_H |
| 2 | #define _XT_TCPUDP_H |
| 3 | |
Arnd Bergmann | 60c195c | 2009-02-26 00:51:43 +0100 | [diff] [blame] | 4 | #include <linux/types.h> |
| 5 | |
Harald Welte | 2e4e6a1 | 2006-01-12 13:30:04 -0800 | [diff] [blame] | 6 | /* TCP matching stuff */ |
Eric Dumazet | d94d9fe | 2009-11-04 09:50:58 -0800 | [diff] [blame] | 7 | struct xt_tcp { |
Arnd Bergmann | 60c195c | 2009-02-26 00:51:43 +0100 | [diff] [blame] | 8 | __u16 spts[2]; /* Source port range. */ |
| 9 | __u16 dpts[2]; /* Destination port range. */ |
| 10 | __u8 option; /* TCP Option iff non-zero*/ |
| 11 | __u8 flg_mask; /* TCP flags mask byte */ |
| 12 | __u8 flg_cmp; /* TCP flags compare byte */ |
| 13 | __u8 invflags; /* Inverse flags */ |
Harald Welte | 2e4e6a1 | 2006-01-12 13:30:04 -0800 | [diff] [blame] | 14 | }; |
| 15 | |
| 16 | /* Values for "inv" field in struct ipt_tcp. */ |
| 17 | #define XT_TCP_INV_SRCPT 0x01 /* Invert the sense of source ports. */ |
| 18 | #define XT_TCP_INV_DSTPT 0x02 /* Invert the sense of dest ports. */ |
| 19 | #define XT_TCP_INV_FLAGS 0x04 /* Invert the sense of TCP flags. */ |
| 20 | #define XT_TCP_INV_OPTION 0x08 /* Invert the sense of option test. */ |
| 21 | #define XT_TCP_INV_MASK 0x0F /* All possible flags. */ |
| 22 | |
| 23 | /* UDP matching stuff */ |
Eric Dumazet | d94d9fe | 2009-11-04 09:50:58 -0800 | [diff] [blame] | 24 | struct xt_udp { |
Arnd Bergmann | 60c195c | 2009-02-26 00:51:43 +0100 | [diff] [blame] | 25 | __u16 spts[2]; /* Source port range. */ |
| 26 | __u16 dpts[2]; /* Destination port range. */ |
| 27 | __u8 invflags; /* Inverse flags */ |
Harald Welte | 2e4e6a1 | 2006-01-12 13:30:04 -0800 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | /* Values for "invflags" field in struct ipt_udp. */ |
| 31 | #define XT_UDP_INV_SRCPT 0x01 /* Invert the sense of source ports. */ |
| 32 | #define XT_UDP_INV_DSTPT 0x02 /* Invert the sense of dest ports. */ |
| 33 | #define XT_UDP_INV_MASK 0x03 /* All possible flags. */ |
| 34 | |
| 35 | |
| 36 | #endif |