netfilter: nf_conntrack: use hlist_add_head_rcu() in nf_conntrack_set_hashsize()
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / linux / netfilter / x_tables.h
index e52ce475d19f13796080ba21f24e4464054f0990..e8e08d03675295ed0c68e2f4c58b880f88185969 100644 (file)
@@ -270,6 +270,7 @@ struct xt_match
        struct list_head list;
 
        const char name[XT_FUNCTION_MAXNAMELEN-1];
+       u_int8_t revision;
 
        /* Return true or false: return FALSE and set *hotdrop = 1 to
            force immediate packet drop. */
@@ -302,7 +303,6 @@ struct xt_match
        unsigned short proto;
 
        unsigned short family;
-       u_int8_t revision;
 };
 
 /* Registration hooks for targets. */
@@ -349,23 +349,22 @@ struct xt_table
 {
        struct list_head list;
 
-       /* A unique name... */
-       const char name[XT_TABLE_MAXNAMELEN];
-
        /* What hooks you will enter on */
        unsigned int valid_hooks;
 
        /* Lock for the curtain */
-       rwlock_t lock;
+       struct mutex lock;
 
        /* Man behind the curtain... */
-       //struct ip6t_table_info *private;
-       void *private;
+       struct xt_table_info *private;
 
        /* Set this to THIS_MODULE if you are a module, otherwise NULL */
        struct module *me;
 
        u_int8_t af;            /* address/protocol family */
+
+       /* A unique name... */
+       const char name[XT_TABLE_MAXNAMELEN];
 };
 
 #include <linux/netfilter_ipv4.h>
@@ -386,7 +385,7 @@ struct xt_table_info
 
        /* ipt_entry tables: one per CPU */
        /* Note : this field MUST be the last one, see XT_TABLE_INFO_SZ */
-       char *entries[1];
+       void *entries[1];
 };
 
 #define XT_TABLE_INFO_SZ (offsetof(struct xt_table_info, entries) \
@@ -433,6 +432,8 @@ extern void xt_proto_fini(struct net *net, u_int8_t af);
 
 extern struct xt_table_info *xt_alloc_table_info(unsigned int size);
 extern void xt_free_table_info(struct xt_table_info *info);
+extern void xt_table_entry_swap_rcu(struct xt_table_info *old,
+                                   struct xt_table_info *new);
 
 #ifdef CONFIG_COMPAT
 #include <net/compat.h>