diff options
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r-- | include/net/net_namespace.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 3ae491932bc8..aef430d779bd 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <asm/atomic.h> | 7 | #include <asm/atomic.h> |
8 | #include <linux/workqueue.h> | 8 | #include <linux/workqueue.h> |
9 | #include <linux/list.h> | 9 | #include <linux/list.h> |
10 | #include <linux/sysctl.h> | ||
10 | 11 | ||
11 | #include <net/netns/core.h> | 12 | #include <net/netns/core.h> |
12 | #include <net/netns/mib.h> | 13 | #include <net/netns/mib.h> |
@@ -34,8 +35,11 @@ struct netns_ipvs; | |||
34 | #define NETDEV_HASHENTRIES (1 << NETDEV_HASHBITS) | 35 | #define NETDEV_HASHENTRIES (1 << NETDEV_HASHBITS) |
35 | 36 | ||
36 | struct net { | 37 | struct net { |
38 | atomic_t passive; /* To decided when the network | ||
39 | * namespace should be freed. | ||
40 | */ | ||
37 | atomic_t count; /* To decided when the network | 41 | atomic_t count; /* To decided when the network |
38 | * namespace should be freed. | 42 | * namespace should be shut down. |
39 | */ | 43 | */ |
40 | #ifdef NETNS_REFCNT_DEBUG | 44 | #ifdef NETNS_REFCNT_DEBUG |
41 | atomic_t use_count; /* To track references we | 45 | atomic_t use_count; /* To track references we |
@@ -119,6 +123,7 @@ static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns) | |||
119 | extern struct list_head net_namespace_list; | 123 | extern struct list_head net_namespace_list; |
120 | 124 | ||
121 | extern struct net *get_net_ns_by_pid(pid_t pid); | 125 | extern struct net *get_net_ns_by_pid(pid_t pid); |
126 | extern struct net *get_net_ns_by_fd(int pid); | ||
122 | 127 | ||
123 | #ifdef CONFIG_NET_NS | 128 | #ifdef CONFIG_NET_NS |
124 | extern void __put_net(struct net *net); | 129 | extern void __put_net(struct net *net); |
@@ -152,6 +157,9 @@ int net_eq(const struct net *net1, const struct net *net2) | |||
152 | { | 157 | { |
153 | return net1 == net2; | 158 | return net1 == net2; |
154 | } | 159 | } |
160 | |||
161 | extern void net_drop_ns(void *); | ||
162 | |||
155 | #else | 163 | #else |
156 | 164 | ||
157 | static inline struct net *get_net(struct net *net) | 165 | static inline struct net *get_net(struct net *net) |
@@ -173,6 +181,8 @@ int net_eq(const struct net *net1, const struct net *net2) | |||
173 | { | 181 | { |
174 | return 1; | 182 | return 1; |
175 | } | 183 | } |
184 | |||
185 | #define net_drop_ns NULL | ||
176 | #endif | 186 | #endif |
177 | 187 | ||
178 | 188 | ||