x86: arch/x86/mm/init_32.c cleanup
[wrt350n-kernel.git] / include / linux / netfilter / xt_policy.h
blob053d8cc6546401988b13d8fb613d818a7a913deb
1 #ifndef _XT_POLICY_H
2 #define _XT_POLICY_H
4 #define XT_POLICY_MAX_ELEM 4
6 enum xt_policy_flags
8 XT_POLICY_MATCH_IN = 0x1,
9 XT_POLICY_MATCH_OUT = 0x2,
10 XT_POLICY_MATCH_NONE = 0x4,
11 XT_POLICY_MATCH_STRICT = 0x8,
14 enum xt_policy_modes
16 XT_POLICY_MODE_TRANSPORT,
17 XT_POLICY_MODE_TUNNEL
20 struct xt_policy_spec
22 u_int8_t saddr:1,
23 daddr:1,
24 proto:1,
25 mode:1,
26 spi:1,
27 reqid:1;
30 #ifndef __KERNEL__
31 union xt_policy_addr
33 struct in_addr a4;
34 struct in6_addr a6;
36 #endif
38 struct xt_policy_elem
40 union {
41 #ifdef __KERNEL__
42 struct {
43 union nf_inet_addr saddr;
44 union nf_inet_addr smask;
45 union nf_inet_addr daddr;
46 union nf_inet_addr dmask;
48 #else
49 struct {
50 union xt_policy_addr saddr;
51 union xt_policy_addr smask;
52 union xt_policy_addr daddr;
53 union xt_policy_addr dmask;
55 #endif
57 __be32 spi;
58 u_int32_t reqid;
59 u_int8_t proto;
60 u_int8_t mode;
62 struct xt_policy_spec match;
63 struct xt_policy_spec invert;
66 struct xt_policy_info
68 struct xt_policy_elem pol[XT_POLICY_MAX_ELEM];
69 u_int16_t flags;
70 u_int16_t len;
73 #endif /* _XT_POLICY_H */