0fc1ec62190e5f2afb596f985943c19abc811068
[librecmc/librecmc.git] / target / linux / generic-2.4 / patches / 622-netfilter_ipset_porthash.patch
1 Index: linux-2.4.35.4/include/linux/netfilter_ipv4/ip_set_ipporthash.h
2 ===================================================================
3 --- /dev/null
4 +++ linux-2.4.35.4/include/linux/netfilter_ipv4/ip_set_ipporthash.h
5 @@ -0,0 +1,34 @@
6 +#ifndef __IP_SET_IPPORTHASH_H
7 +#define __IP_SET_IPPORTHASH_H
8 +
9 +#include <linux/netfilter_ipv4/ip_set.h>
10 +
11 +#define SETTYPE_NAME "ipporthash"
12 +#define MAX_RANGE 0x0000FFFF
13 +#define INVALID_PORT   (MAX_RANGE + 1)
14 +
15 +struct ip_set_ipporthash {
16 +       ip_set_ip_t *members;           /* the ipporthash proper */
17 +       uint32_t elements;              /* number of elements */
18 +       uint32_t hashsize;              /* hash size */
19 +       uint16_t probes;                /* max number of probes  */
20 +       uint16_t resize;                /* resize factor in percent */
21 +       ip_set_ip_t first_ip;           /* host byte order, included in range */
22 +       ip_set_ip_t last_ip;            /* host byte order, included in range */
23 +       void *initval[0];               /* initvals for jhash_1word */
24 +};
25 +
26 +struct ip_set_req_ipporthash_create {
27 +       uint32_t hashsize;
28 +       uint16_t probes;
29 +       uint16_t resize;
30 +       ip_set_ip_t from;
31 +       ip_set_ip_t to;
32 +};
33 +
34 +struct ip_set_req_ipporthash {
35 +       ip_set_ip_t ip;
36 +       ip_set_ip_t port;
37 +};
38 +
39 +#endif /* __IP_SET_IPPORTHASH_H */