Jan Engelhardt | 370786f | 2007-07-14 20:47:26 -0700 | [diff] [blame] | 1 | #ifndef _XT_CONNLIMIT_H |
| 2 | #define _XT_CONNLIMIT_H |
| 3 | |
Jan Engelhardt | 06988b0 | 2011-01-20 17:50:17 +0100 | [diff] [blame] | 4 | #include <linux/types.h> |
Ben Hutchings | 5740bb5 | 2011-08-24 18:45:42 +0000 | [diff] [blame] | 5 | #include <linux/netfilter.h> |
Jan Engelhardt | 06988b0 | 2011-01-20 17:50:17 +0100 | [diff] [blame] | 6 | |
Jan Engelhardt | 370786f | 2007-07-14 20:47:26 -0700 | [diff] [blame] | 7 | struct xt_connlimit_data; |
| 8 | |
Jan Engelhardt | cc4fc02 | 2011-01-18 17:32:40 +0100 | [diff] [blame] | 9 | enum { |
| 10 | XT_CONNLIMIT_INVERT = 1 << 0, |
| 11 | XT_CONNLIMIT_DADDR = 1 << 1, |
| 12 | }; |
| 13 | |
Jan Engelhardt | 370786f | 2007-07-14 20:47:26 -0700 | [diff] [blame] | 14 | struct xt_connlimit_info { |
| 15 | union { |
Jan Engelhardt | 22c2d8b | 2007-12-17 22:44:47 -0800 | [diff] [blame] | 16 | union nf_inet_addr mask; |
| 17 | #ifndef __KERNEL__ |
| 18 | union { |
| 19 | __be32 v4_mask; |
| 20 | __be32 v6_mask[4]; |
| 21 | }; |
| 22 | #endif |
Jan Engelhardt | 370786f | 2007-07-14 20:47:26 -0700 | [diff] [blame] | 23 | }; |
Jan Engelhardt | ba12b13 | 2011-01-20 14:01:12 +0100 | [diff] [blame] | 24 | unsigned int limit; |
Jan Engelhardt | cc4fc02 | 2011-01-18 17:32:40 +0100 | [diff] [blame] | 25 | union { |
| 26 | /* revision 0 */ |
| 27 | unsigned int inverse; |
| 28 | |
| 29 | /* revision 1 */ |
| 30 | __u32 flags; |
| 31 | }; |
Jan Engelhardt | 370786f | 2007-07-14 20:47:26 -0700 | [diff] [blame] | 32 | |
Jan Engelhardt | 8b6f3f6 | 2008-01-14 23:33:14 -0800 | [diff] [blame] | 33 | /* Used internally by the kernel */ |
Jan Engelhardt | 370786f | 2007-07-14 20:47:26 -0700 | [diff] [blame] | 34 | struct xt_connlimit_data *data __attribute__((aligned(8))); |
| 35 | }; |
| 36 | |
| 37 | #endif /* _XT_CONNLIMIT_H */ |