コード例 #1
0
} rawpost6_initial __initdata = {
    .repl = {
        .name        = "rawpost",
        .valid_hooks = RAWPOST_VALID_HOOKS,
        .num_entries = 2,
        .size        = sizeof(struct ip6t_standard) +
        sizeof(struct ip6t_error),
        .hook_entry  = {
            [NF_INET_POST_ROUTING] = 0,
        },
        .underflow = {
            [NF_INET_POST_ROUTING] = 0,
        },
    },
    .entries = {
        IP6T_STANDARD_INIT(NF_ACCEPT),	/* POST_ROUTING */
    },
    .term = IP6T_ERROR_INIT,		/* ERROR */
};

static struct xt_table *rawpost6_ptable;

static struct xt_table rawpost6_itable = {
    .name        = "rawpost",
    .af          = NFPROTO_IPV6,
    .valid_hooks = RAWPOST_VALID_HOOKS,
    .me          = THIS_MODULE,
};

static unsigned int rawpost6_hook_fn(unsigned int hook, sk_buff_t *skb,
                                     const struct net_device *in, const struct net_device *out,
コード例 #2
0
		.valid_hooks = FILTER_VALID_HOOKS,
		.num_entries = 4,
		.size = sizeof(struct ip6t_standard) * 3 + sizeof(struct ip6t_error),
		.hook_entry = {
			[NF_INET_LOCAL_IN] = 0,
			[NF_INET_FORWARD] = sizeof(struct ip6t_standard),
			[NF_INET_LOCAL_OUT] = sizeof(struct ip6t_standard) * 2
		},
		.underflow = {
			[NF_INET_LOCAL_IN] = 0,
			[NF_INET_FORWARD] = sizeof(struct ip6t_standard),
			[NF_INET_LOCAL_OUT] = sizeof(struct ip6t_standard) * 2
		},
	},
	.entries = {
		IP6T_STANDARD_INIT(NF_ACCEPT),	/* LOCAL_IN */
		IP6T_STANDARD_INIT(NF_ACCEPT),	/* FORWARD */
		IP6T_STANDARD_INIT(NF_ACCEPT),	/* LOCAL_OUT */
	},
	.term = IP6T_ERROR_INIT,		/* ERROR */
};

static struct xt_table packet_filter = {
	.name		= "filter",
	.valid_hooks	= FILTER_VALID_HOOKS,
	.lock		= __RW_LOCK_UNLOCKED(packet_filter.lock),
	.me		= THIS_MODULE,
	.af		= AF_INET6,
};

/* The work comes in here from netfilter.c. */
コード例 #3
0
ファイル: ip6table_mangle.c プロジェクト: 3sOx/asuswrt-merlin
			[NF_IP6_PRE_ROUTING] 	= 0,
			[NF_IP6_LOCAL_IN]	= sizeof(struct ip6t_standard),
			[NF_IP6_FORWARD]	= sizeof(struct ip6t_standard) * 2,
			[NF_IP6_LOCAL_OUT] 	= sizeof(struct ip6t_standard) * 3,
			[NF_IP6_POST_ROUTING]	= sizeof(struct ip6t_standard) * 4,
		},
		.underflow = {
			[NF_IP6_PRE_ROUTING] 	= 0,
			[NF_IP6_LOCAL_IN]	= sizeof(struct ip6t_standard),
			[NF_IP6_FORWARD]	= sizeof(struct ip6t_standard) * 2,
			[NF_IP6_LOCAL_OUT] 	= sizeof(struct ip6t_standard) * 3,
			[NF_IP6_POST_ROUTING]	= sizeof(struct ip6t_standard) * 4,
		},
	},
	.entries = {
		IP6T_STANDARD_INIT(NF_ACCEPT),	/* PRE_ROUTING */
		IP6T_STANDARD_INIT(NF_ACCEPT),	/* LOCAL_IN */
		IP6T_STANDARD_INIT(NF_ACCEPT),	/* FORWARD */
		IP6T_STANDARD_INIT(NF_ACCEPT),	/* LOCAL_OUT */
		IP6T_STANDARD_INIT(NF_ACCEPT),	/* POST_ROUTING */
	},
	.term = IP6T_ERROR_INIT,		/* ERROR */
};

static struct xt_table packet_mangler = {
	.name		= "mangle",
	.valid_hooks	= MANGLE_VALID_HOOKS,
	.me		= THIS_MODULE,
	.af		= AF_INET6,
};
コード例 #4
0
ファイル: ip6table_raw.c プロジェクト: AppEngine/linux-2.6
	.repl = {
		.name = "raw",
		.valid_hooks = RAW_VALID_HOOKS,
		.num_entries = 3,
		.size = sizeof(struct ip6t_standard) * 2 + sizeof(struct ip6t_error),
		.hook_entry = {
			[NF_INET_PRE_ROUTING] = 0,
			[NF_INET_LOCAL_OUT] = sizeof(struct ip6t_standard)
		},
		.underflow = {
			[NF_INET_PRE_ROUTING] = 0,
			[NF_INET_LOCAL_OUT] = sizeof(struct ip6t_standard)
		},
	},
	.entries = {
		IP6T_STANDARD_INIT(NF_ACCEPT),	/* PRE_ROUTING */
		IP6T_STANDARD_INIT(NF_ACCEPT),	/* LOCAL_OUT */
	},
	.term = IP6T_ERROR_INIT,		/* ERROR */
};

static struct xt_table packet_raw = {
	.name = "raw",
	.valid_hooks = RAW_VALID_HOOKS,
	.me = THIS_MODULE,
	.af = AF_INET6,
};

/* The work comes in here from netfilter.c. */
static unsigned int
ip6t_pre_routing_hook(unsigned int hook,