mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-29 20:30:35 +00:00
![Patrick McHardy](/assets/img/avatar_default.png)
The IPv4 and IPv6 version of the policy match are identical besides address comparison and the data structure used for userspace communication. Unify the data structures to break compatiblity now (before it is released), so we can port it to x_tables in 2.6.17. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
58 lines
928 B
C
58 lines
928 B
C
#ifndef _IP6T_POLICY_H
|
|
#define _IP6T_POLICY_H
|
|
|
|
#define IP6T_POLICY_MAX_ELEM 4
|
|
|
|
enum ip6t_policy_flags
|
|
{
|
|
IP6T_POLICY_MATCH_IN = 0x1,
|
|
IP6T_POLICY_MATCH_OUT = 0x2,
|
|
IP6T_POLICY_MATCH_NONE = 0x4,
|
|
IP6T_POLICY_MATCH_STRICT = 0x8,
|
|
};
|
|
|
|
enum ip6t_policy_modes
|
|
{
|
|
IP6T_POLICY_MODE_TRANSPORT,
|
|
IP6T_POLICY_MODE_TUNNEL
|
|
};
|
|
|
|
struct ip6t_policy_spec
|
|
{
|
|
u_int8_t saddr:1,
|
|
daddr:1,
|
|
proto:1,
|
|
mode:1,
|
|
spi:1,
|
|
reqid:1;
|
|
};
|
|
|
|
union ip6t_policy_addr
|
|
{
|
|
struct in_addr a4;
|
|
struct in6_addr a6;
|
|
};
|
|
|
|
struct ip6t_policy_elem
|
|
{
|
|
union ip6t_policy_addr saddr;
|
|
union ip6t_policy_addr smask;
|
|
union ip6t_policy_addr daddr;
|
|
union ip6t_policy_addr dmask;
|
|
u_int32_t spi;
|
|
u_int32_t reqid;
|
|
u_int8_t proto;
|
|
u_int8_t mode;
|
|
|
|
struct ip6t_policy_spec match;
|
|
struct ip6t_policy_spec invert;
|
|
};
|
|
|
|
struct ip6t_policy_info
|
|
{
|
|
struct ip6t_policy_elem pol[IP6T_POLICY_MAX_ELEM];
|
|
u_int16_t flags;
|
|
u_int16_t len;
|
|
};
|
|
|
|
#endif /* _IP6T_POLICY_H */
|