Merge "citrix" branch into "master".
[sliver-openvswitch.git] / datapath / linux-2.6 / compat-2.6 / include / net / net_namespace.h
1 #ifndef __NET_NAMESPACE_WRAPPER_H
2 #define __NET_NAMESPACE_WRAPPER_H 1
3
4 #include <linux/version.h>
5 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
6 #include_next <net/net_namespace.h>
7 #endif
8
9 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
10 struct net;
11
12 struct extended_pernet_operations {
13         struct list_head list;
14         int (*init)(struct net *net);
15         void (*exit)(struct net *net);
16         int *id;
17         size_t size;
18 };
19 #define pernet_operations extended_pernet_operations
20
21 #define register_pernet_device rpl_register_pernet_device
22 int rpl_register_pernet_device(struct extended_pernet_operations *ops);
23
24 #define unregister_pernet_device rpl_unregister_pernet_device
25 void rpl_unregister_pernet_device(struct extended_pernet_operations *ops);
26
27 #endif /* linux kernel < 2.6.33 */
28
29 #endif