aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/net_namespace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r--include/net/net_namespace.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index a1202841aadd..f307e133d14c 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -28,6 +28,10 @@ struct ctl_table_header;
28struct net_generic; 28struct net_generic;
29struct sock; 29struct sock;
30 30
31
32#define NETDEV_HASHBITS 8
33#define NETDEV_HASHENTRIES (1 << NETDEV_HASHBITS)
34
31struct net { 35struct net {
32 atomic_t count; /* To decided when the network 36 atomic_t count; /* To decided when the network
33 * namespace should be freed. 37 * namespace should be freed.
@@ -38,7 +42,8 @@ struct net {
38 */ 42 */
39#endif 43#endif
40 struct list_head list; /* list of network namespaces */ 44 struct list_head list; /* list of network namespaces */
41 struct work_struct work; /* work struct for freeing */ 45 struct list_head cleanup_list; /* namespaces on death row */
46 struct list_head exit_list; /* Use only net_mutex */
42 47
43 struct proc_dir_entry *proc_net; 48 struct proc_dir_entry *proc_net;
44 struct proc_dir_entry *proc_net_stat; 49 struct proc_dir_entry *proc_net_stat;
@@ -80,7 +85,7 @@ struct net {
80#ifdef CONFIG_XFRM 85#ifdef CONFIG_XFRM
81 struct netns_xfrm xfrm; 86 struct netns_xfrm xfrm;
82#endif 87#endif
83#ifdef CONFIG_WIRELESS_EXT 88#ifdef CONFIG_WEXT_CORE
84 struct sk_buff_head wext_nlevents; 89 struct sk_buff_head wext_nlevents;
85#endif 90#endif
86 struct net_generic *gen; 91 struct net_generic *gen;
@@ -232,6 +237,9 @@ struct pernet_operations {
232 struct list_head list; 237 struct list_head list;
233 int (*init)(struct net *net); 238 int (*init)(struct net *net);
234 void (*exit)(struct net *net); 239 void (*exit)(struct net *net);
240 void (*exit_batch)(struct list_head *net_exit_list);
241 int *id;
242 size_t size;
235}; 243};
236 244
237/* 245/*
@@ -255,12 +263,8 @@ struct pernet_operations {
255 */ 263 */
256extern int register_pernet_subsys(struct pernet_operations *); 264extern int register_pernet_subsys(struct pernet_operations *);
257extern void unregister_pernet_subsys(struct pernet_operations *); 265extern void unregister_pernet_subsys(struct pernet_operations *);
258extern int register_pernet_gen_subsys(int *id, struct pernet_operations *);
259extern void unregister_pernet_gen_subsys(int id, struct pernet_operations *);
260extern int register_pernet_device(struct pernet_operations *); 266extern int register_pernet_device(struct pernet_operations *);
261extern void unregister_pernet_device(struct pernet_operations *); 267extern void unregister_pernet_device(struct pernet_operations *);
262extern int register_pernet_gen_device(int *id, struct pernet_operations *);
263extern void unregister_pernet_gen_device(int id, struct pernet_operations *);
264 268
265struct ctl_path; 269struct ctl_path;
266struct ctl_table; 270struct ctl_table;