mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
[NETFILTER]: nf_nat: move NAT declarations from nf_conntrack_ipv4.h to nf_nat.h
Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9f15c5302d
commit
4ba887790c
4 changed files with 21 additions and 22 deletions
|
@ -9,29 +9,8 @@
|
||||||
#ifndef _NF_CONNTRACK_IPV4_H
|
#ifndef _NF_CONNTRACK_IPV4_H
|
||||||
#define _NF_CONNTRACK_IPV4_H
|
#define _NF_CONNTRACK_IPV4_H
|
||||||
|
|
||||||
#ifdef CONFIG_NF_NAT_NEEDED
|
|
||||||
#include <net/netfilter/nf_nat.h>
|
|
||||||
#include <linux/netfilter/nf_conntrack_pptp.h>
|
|
||||||
|
|
||||||
/* per conntrack: nat application helper private data */
|
|
||||||
union nf_conntrack_nat_help {
|
|
||||||
/* insert nat helper private data here */
|
|
||||||
struct nf_nat_pptp nat_pptp_info;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct nf_conn_nat {
|
|
||||||
struct nf_nat_info info;
|
|
||||||
union nf_conntrack_nat_help help;
|
|
||||||
#if defined(CONFIG_IP_NF_TARGET_MASQUERADE) || \
|
|
||||||
defined(CONFIG_IP_NF_TARGET_MASQUERADE_MODULE)
|
|
||||||
int masq_index;
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
#endif /* CONFIG_NF_NAT_NEEDED */
|
|
||||||
|
|
||||||
/* Returns new sk_buff, or NULL */
|
/* Returns new sk_buff, or NULL */
|
||||||
struct sk_buff *
|
struct sk_buff *nf_ct_ipv4_ct_gather_frags(struct sk_buff *skb);
|
||||||
nf_ct_ipv4_ct_gather_frags(struct sk_buff *skb);
|
|
||||||
|
|
||||||
extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4;
|
extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4;
|
||||||
extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4;
|
extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4;
|
||||||
|
|
|
@ -280,6 +280,7 @@ nf_conntrack_unregister_cache(u_int32_t features);
|
||||||
* nat: nf_conn .. nf_conn_nat, nf_conn .. nf_conn_nat .. nf_conn help
|
* nat: nf_conn .. nf_conn_nat, nf_conn .. nf_conn_nat .. nf_conn help
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_NF_NAT_NEEDED
|
#ifdef CONFIG_NF_NAT_NEEDED
|
||||||
|
#include <net/netfilter/nf_nat.h>
|
||||||
static inline struct nf_conn_nat *nfct_nat(const struct nf_conn *ct)
|
static inline struct nf_conn_nat *nfct_nat(const struct nf_conn *ct)
|
||||||
{
|
{
|
||||||
unsigned int offset = sizeof(struct nf_conn);
|
unsigned int offset = sizeof(struct nf_conn);
|
||||||
|
|
|
@ -51,6 +51,7 @@ struct nf_nat_multi_range_compat
|
||||||
|
|
||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
|
#include <linux/netfilter/nf_conntrack_pptp.h>
|
||||||
|
|
||||||
/* The structure embedded in the conntrack structure. */
|
/* The structure embedded in the conntrack structure. */
|
||||||
struct nf_nat_info
|
struct nf_nat_info
|
||||||
|
@ -59,6 +60,23 @@ struct nf_nat_info
|
||||||
struct nf_nat_seq seq[IP_CT_DIR_MAX];
|
struct nf_nat_seq seq[IP_CT_DIR_MAX];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* per conntrack: nat application helper private data */
|
||||||
|
union nf_conntrack_nat_help
|
||||||
|
{
|
||||||
|
/* insert nat helper private data here */
|
||||||
|
struct nf_nat_pptp nat_pptp_info;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct nf_conn_nat
|
||||||
|
{
|
||||||
|
struct nf_nat_info info;
|
||||||
|
union nf_conntrack_nat_help help;
|
||||||
|
#if defined(CONFIG_IP_NF_TARGET_MASQUERADE) || \
|
||||||
|
defined(CONFIG_IP_NF_TARGET_MASQUERADE_MODULE)
|
||||||
|
int masq_index;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
struct nf_conn;
|
struct nf_conn;
|
||||||
|
|
||||||
/* Set up the info structure to map into this range. */
|
/* Set up the info structure to map into this range. */
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#define _NF_NAT_CORE_H
|
#define _NF_NAT_CORE_H
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
#include <net/netfilter/nf_conntrack.h>
|
#include <net/netfilter/nf_conntrack.h>
|
||||||
|
#include <net/netfilter/nf_nat.h>
|
||||||
|
|
||||||
/* This header used to share core functionality between the standalone
|
/* This header used to share core functionality between the standalone
|
||||||
NAT module, and the compatibility layer's use of NAT for masquerading. */
|
NAT module, and the compatibility layer's use of NAT for masquerading. */
|
||||||
|
|
Loading…
Reference in a new issue