[BACK]Return to xt_policy.h CVS log [TXT][DIR] Up to [Development] / linux-2.6-xfs / include / linux / netfilter

File: [Development] / linux-2.6-xfs / include / linux / netfilter / xt_policy.h (download)

Revision 1.3, Tue Feb 26 16:44:40 2008 UTC (9 years, 7 months ago) by lachlan.longdrop.melbourne.sgi.com
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +19 -4 lines

Merge up to 2.6.25-rc3
Merge of 2.6.x-xfs-melb:linux:30555a by kenmcd.

#ifndef _XT_POLICY_H
#define _XT_POLICY_H

#define XT_POLICY_MAX_ELEM	4

enum xt_policy_flags
{
	XT_POLICY_MATCH_IN	= 0x1,
	XT_POLICY_MATCH_OUT	= 0x2,
	XT_POLICY_MATCH_NONE	= 0x4,
	XT_POLICY_MATCH_STRICT	= 0x8,
};

enum xt_policy_modes
{
	XT_POLICY_MODE_TRANSPORT,
	XT_POLICY_MODE_TUNNEL
};

struct xt_policy_spec
{
	u_int8_t	saddr:1,
			daddr:1,
			proto:1,
			mode:1,
			spi:1,
			reqid:1;
};

#ifndef __KERNEL__
union xt_policy_addr
{
	struct in_addr	a4;
	struct in6_addr	a6;
};
#endif

struct xt_policy_elem
{
	union {
#ifdef __KERNEL__
		struct {
			union nf_inet_addr saddr;
			union nf_inet_addr smask;
			union nf_inet_addr daddr;
			union nf_inet_addr dmask;
		};
#else
		struct {
			union xt_policy_addr saddr;
			union xt_policy_addr smask;
			union xt_policy_addr daddr;
			union xt_policy_addr dmask;
		};
#endif
	};
	__be32			spi;
	u_int32_t		reqid;
	u_int8_t		proto;
	u_int8_t		mode;

	struct xt_policy_spec	match;
	struct xt_policy_spec	invert;
};

struct xt_policy_info
{
	struct xt_policy_elem pol[XT_POLICY_MAX_ELEM];
	u_int16_t flags;
	u_int16_t len;
};

#endif /* _XT_POLICY_H */