diff options
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r-- | include/net/net_namespace.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index a1202841aadd..bd10a7908993 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -28,6 +28,10 @@ struct ctl_table_header; | |||
28 | struct net_generic; | 28 | struct net_generic; |
29 | struct sock; | 29 | struct sock; |
30 | 30 | ||
31 | |||
32 | #define NETDEV_HASHBITS 8 | ||
33 | #define NETDEV_HASHENTRIES (1 << NETDEV_HASHBITS) | ||
34 | |||
31 | struct net { | 35 | struct 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; |
@@ -76,11 +81,13 @@ struct net { | |||
76 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 81 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
77 | struct netns_ct ct; | 82 | struct netns_ct ct; |
78 | #endif | 83 | #endif |
84 | struct sock *nfnl; | ||
85 | struct sock *nfnl_stash; | ||
79 | #endif | 86 | #endif |
80 | #ifdef CONFIG_XFRM | 87 | #ifdef CONFIG_XFRM |
81 | struct netns_xfrm xfrm; | 88 | struct netns_xfrm xfrm; |
82 | #endif | 89 | #endif |
83 | #ifdef CONFIG_WIRELESS_EXT | 90 | #ifdef CONFIG_WEXT_CORE |
84 | struct sk_buff_head wext_nlevents; | 91 | struct sk_buff_head wext_nlevents; |
85 | #endif | 92 | #endif |
86 | struct net_generic *gen; | 93 | struct net_generic *gen; |
@@ -93,14 +100,9 @@ struct net { | |||
93 | extern struct net init_net; | 100 | extern struct net init_net; |
94 | 101 | ||
95 | #ifdef CONFIG_NET | 102 | #ifdef CONFIG_NET |
96 | #define INIT_NET_NS(net_ns) .net_ns = &init_net, | ||
97 | |||
98 | extern struct net *copy_net_ns(unsigned long flags, struct net *net_ns); | 103 | extern struct net *copy_net_ns(unsigned long flags, struct net *net_ns); |
99 | 104 | ||
100 | #else /* CONFIG_NET */ | 105 | #else /* CONFIG_NET */ |
101 | |||
102 | #define INIT_NET_NS(net_ns) | ||
103 | |||
104 | static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns) | 106 | static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns) |
105 | { | 107 | { |
106 | /* There is nothing to copy so this is a noop */ | 108 | /* There is nothing to copy so this is a noop */ |
@@ -232,6 +234,9 @@ struct pernet_operations { | |||
232 | struct list_head list; | 234 | struct list_head list; |
233 | int (*init)(struct net *net); | 235 | int (*init)(struct net *net); |
234 | void (*exit)(struct net *net); | 236 | void (*exit)(struct net *net); |
237 | void (*exit_batch)(struct list_head *net_exit_list); | ||
238 | int *id; | ||
239 | size_t size; | ||
235 | }; | 240 | }; |
236 | 241 | ||
237 | /* | 242 | /* |
@@ -255,12 +260,8 @@ struct pernet_operations { | |||
255 | */ | 260 | */ |
256 | extern int register_pernet_subsys(struct pernet_operations *); | 261 | extern int register_pernet_subsys(struct pernet_operations *); |
257 | extern void unregister_pernet_subsys(struct pernet_operations *); | 262 | extern void unregister_pernet_subsys(struct pernet_operations *); |
258 | extern int register_pernet_gen_subsys(int *id, struct pernet_operations *); | ||
259 | extern void unregister_pernet_gen_subsys(int id, struct pernet_operations *); | ||
260 | extern int register_pernet_device(struct pernet_operations *); | 263 | extern int register_pernet_device(struct pernet_operations *); |
261 | extern void unregister_pernet_device(struct pernet_operations *); | 264 | extern void unregister_pernet_device(struct pernet_operations *); |
262 | extern int register_pernet_gen_device(int *id, struct pernet_operations *); | ||
263 | extern void unregister_pernet_gen_device(int id, struct pernet_operations *); | ||
264 | 265 | ||
265 | struct ctl_path; | 266 | struct ctl_path; |
266 | struct ctl_table; | 267 | struct ctl_table; |