1 #ifndef __NET_NAMESPACE_WRAPPER_H
2 #define __NET_NAMESPACE_WRAPPER_H 1
4 #include <linux/version.h>
5 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
6 #include_next <net/net_namespace.h>
9 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
12 struct extended_pernet_operations {
13 struct list_head list;
14 int (*init)(struct net *net);
15 void (*exit)(struct net *net);
19 #define pernet_operations extended_pernet_operations
21 #define register_pernet_device rpl_register_pernet_device
22 int rpl_register_pernet_device(struct extended_pernet_operations *ops);
24 #define unregister_pernet_device rpl_unregister_pernet_device
25 void rpl_unregister_pernet_device(struct extended_pernet_operations *ops);
27 #endif /* linux kernel < 2.6.33 */