gre: Simplify net namespace operations.
[sliver-openvswitch.git] / datapath / linux-2.6 / compat-2.6 / include / net / net_namespace.h
index 9b66c91..92a4e02 100644 (file)
@@ -2,25 +2,28 @@
 #define __NET_NAMESPACE_WRAPPER_H 1
 
 #include <linux/version.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,24)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
 #include_next <net/net_namespace.h>
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
 struct net;
 
-struct pernet_operations {
+struct extended_pernet_operations {
        struct list_head list;
        int (*init)(struct net *net);
        void (*exit)(struct net *net);
+       int *id;
+       size_t size;
 };
-#endif /* linux kernel < 2.6.24 */
+#define pernet_operations extended_pernet_operations
+
+#define register_pernet_device rpl_register_pernet_device
+int rpl_register_pernet_device(struct extended_pernet_operations *ops);
 
-extern int register_pernet_gen_device(int *id, struct pernet_operations *);
-extern void unregister_pernet_gen_device(int id, struct pernet_operations *);
+#define unregister_pernet_device rpl_unregister_pernet_device
+void rpl_unregister_pernet_device(struct extended_pernet_operations *ops);
 
-#endif /* linux kernel < 2.6.26 */
+#endif /* linux kernel < 2.6.33 */
 
 #endif