Merge to Fedora kernel-2.6.18-1.2260_FC5 patched with stable patch-2.6.18.5-vs2.0...
[linux-2.6.git] / include / linux / netfilter_ipv4 / ip_set_ipporthash.h
1 #ifndef __IP_SET_IPPORTHASH_H
2 #define __IP_SET_IPPORTHASH_H
3
4 #include <linux/netfilter_ipv4/ip_set.h>
5
6 #define SETTYPE_NAME "ipporthash"
7 #define MAX_RANGE 0x0000FFFF
8 #define INVALID_PORT    (MAX_RANGE + 1)
9
10 struct ip_set_ipporthash {
11         ip_set_ip_t *members;           /* the ipporthash proper */
12         uint32_t elements;              /* number of elements */
13         uint32_t hashsize;              /* hash size */
14         uint16_t probes;                /* max number of probes  */
15         uint16_t resize;                /* resize factor in percent */
16         ip_set_ip_t first_ip;           /* host byte order, included in range */
17         ip_set_ip_t last_ip;            /* host byte order, included in range */
18         void *initval[0];               /* initvals for jhash_1word */
19 };
20
21 struct ip_set_req_ipporthash_create {
22         uint32_t hashsize;
23         uint16_t probes;
24         uint16_t resize;
25         ip_set_ip_t from;
26         ip_set_ip_t to;
27 };
28
29 struct ip_set_req_ipporthash {
30         ip_set_ip_t ip;
31         ip_set_ip_t port;
32 };
33
34 #endif  /* __IP_SET_IPPORTHASH_H */