aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-03-31 22:41:14 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-31 22:41:14 -0400
commit8efa6e93cb2666dceafc4844057fdcb9aa324fb7 (patch)
tree3fbf8da25edf1b942411d89896400effd5a83419 /include/net
parent3edf8fa5ccf10688a9280b5cbca8ed3947c42866 (diff)
[NETNS]: Introduce a netns_core structure.
There's already some stuff on the struct net, that should better be folded into netns_core structure. I'm making the per-proto inuse counter be per-net also, which is also a candidate for this, so introduce this structure and populate it a bit. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/net_namespace.h6
-rw-r--r--include/net/netns/core.h13
2 files changed, 15 insertions, 4 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index f8f3d1a5fc35..c01d45fe08c3 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -8,6 +8,7 @@
8#include <linux/workqueue.h> 8#include <linux/workqueue.h>
9#include <linux/list.h> 9#include <linux/list.h>
10 10
11#include <net/netns/core.h>
11#include <net/netns/unix.h> 12#include <net/netns/unix.h>
12#include <net/netns/packet.h> 13#include <net/netns/packet.h>
13#include <net/netns/ipv4.h> 14#include <net/netns/ipv4.h>
@@ -46,10 +47,7 @@ struct net {
46 47
47 struct sock *rtnl; /* rtnetlink socket */ 48 struct sock *rtnl; /* rtnetlink socket */
48 49
49 /* core sysctls */ 50 struct netns_core core;
50 struct ctl_table_header *sysctl_core_hdr;
51 int sysctl_somaxconn;
52
53 struct netns_packet packet; 51 struct netns_packet packet;
54 struct netns_unix unx; 52 struct netns_unix unx;
55 struct netns_ipv4 ipv4; 53 struct netns_ipv4 ipv4;
diff --git a/include/net/netns/core.h b/include/net/netns/core.h
new file mode 100644
index 000000000000..0e8c0f8435d4
--- /dev/null
+++ b/include/net/netns/core.h
@@ -0,0 +1,13 @@
1#ifndef __NETNS_CORE_H__
2#define __NETNS_CORE_H__
3
4struct ctl_table_header;
5
6struct netns_core {
7 /* core sysctls */
8 struct ctl_table_header *sysctl_hdr;
9
10 int sysctl_somaxconn;
11};
12
13#endif