aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorHans Schillstrom <hans.schillstrom@ericsson.com>2011-01-03 08:44:42 -0500
committerSimon Horman <horms@verge.net.au>2011-01-12 20:30:26 -0500
commit61b1ab4583e275af216c8454b9256de680499b19 (patch)
tree43e7cd6c71030c4d94c4e02dd34de77e57943a2d /include/net
parentfee1cc0895fd7bde875a86bbc3a1e82089e540b8 (diff)
IPVS: netns, add basic init per netns.
Preparation for network name-space init, in this stage some empty functions exists. In most files there is a check if it is root ns i.e. init_net if (!net_eq(net, &init_net)) return ... this will be removed by the last patch, when enabling name-space. *v3 ip_vs_conn.c merge error corrected. net_ipvs #ifdef removed as sugested by Jan Engelhardt [ horms@verge.net.au: Removed whitespace-change-only hunks ] Signed-off-by: Hans Schillstrom <hans.schillstrom@ericsson.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ip_vs.h11
-rw-r--r--include/net/net_namespace.h2
-rw-r--r--include/net/netns/ip_vs.h25
3 files changed, 38 insertions, 0 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index d858264217ba..c1c2ece3ed94 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -28,6 +28,15 @@
28#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) 28#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
29#include <net/netfilter/nf_conntrack.h> 29#include <net/netfilter/nf_conntrack.h>
30#endif 30#endif
31#include <net/net_namespace.h> /* Netw namespace */
32
33/*
34 * Generic access of ipvs struct
35 */
36static inline struct netns_ipvs *net_ipvs(struct net* net)
37{
38 return net->ipvs;
39}
31 40
32/* Connections' size value needed by ip_vs_ctl.c */ 41/* Connections' size value needed by ip_vs_ctl.c */
33extern int ip_vs_conn_tab_size; 42extern int ip_vs_conn_tab_size;
@@ -922,6 +931,8 @@ extern char ip_vs_backup_mcast_ifn[IP_VS_IFNAME_MAXLEN];
922extern int start_sync_thread(int state, char *mcast_ifn, __u8 syncid); 931extern int start_sync_thread(int state, char *mcast_ifn, __u8 syncid);
923extern int stop_sync_thread(int state); 932extern int stop_sync_thread(int state);
924extern void ip_vs_sync_conn(struct ip_vs_conn *cp); 933extern void ip_vs_sync_conn(struct ip_vs_conn *cp);
934extern int ip_vs_sync_init(void);
935extern void ip_vs_sync_cleanup(void);
925 936
926 937
927/* 938/*
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 1bf812b21fb7..b3b4a34cb2cc 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -20,6 +20,7 @@
20#include <net/netns/conntrack.h> 20#include <net/netns/conntrack.h>
21#endif 21#endif
22#include <net/netns/xfrm.h> 22#include <net/netns/xfrm.h>
23#include <net/netns/ip_vs.h>
23 24
24struct proc_dir_entry; 25struct proc_dir_entry;
25struct net_device; 26struct net_device;
@@ -94,6 +95,7 @@ struct net {
94#ifdef CONFIG_XFRM 95#ifdef CONFIG_XFRM
95 struct netns_xfrm xfrm; 96 struct netns_xfrm xfrm;
96#endif 97#endif
98 struct netns_ipvs *ipvs;
97}; 99};
98 100
99 101
diff --git a/include/net/netns/ip_vs.h b/include/net/netns/ip_vs.h
new file mode 100644
index 000000000000..12fe84087cec
--- /dev/null
+++ b/include/net/netns/ip_vs.h
@@ -0,0 +1,25 @@
1/*
2 * IP Virtual Server
3 * Data structure for network namspace
4 *
5 */
6
7#ifndef IP_VS_H_
8#define IP_VS_H_
9
10#include <linux/list.h>
11#include <linux/mutex.h>
12#include <linux/list_nulls.h>
13#include <linux/ip_vs.h>
14#include <asm/atomic.h>
15#include <linux/in.h>
16
17struct ip_vs_stats;
18struct ip_vs_sync_buff;
19struct ctl_table_header;
20
21struct netns_ipvs {
22 int gen; /* Generation */
23};
24
25#endif /* IP_VS_H_ */