]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/netfilter/xt_helper.c
netfilter: xtables: move extension arguments into compound structure (6/6)
[linux-2.6-omap-h63xx.git] / net / netfilter / xt_helper.c
index 5d063e51f889e7f01f1c44de0a412036078851ca..280c984349f3a266e3b968cc9bfeff67ceeec26e 100644 (file)
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Martin Josefsson <gandalf@netfilter.org>");
-MODULE_DESCRIPTION("iptables helper match module");
+MODULE_DESCRIPTION("Xtables: Related connection matching");
 MODULE_ALIAS("ipt_helper");
 MODULE_ALIAS("ip6t_helper");
 
 
 static bool
-helper_mt(const struct sk_buff *skb, const struct net_device *in,
-          const struct net_device *out, const struct xt_match *match,
-          const void *matchinfo, int offset, unsigned int protoff,
-          bool *hotdrop)
+helper_mt(const struct sk_buff *skb, const struct xt_match_param *par)
 {
-       const struct xt_helper_info *info = matchinfo;
+       const struct xt_helper_info *info = par->matchinfo;
        const struct nf_conn *ct;
        const struct nf_conn_help *master_help;
        const struct nf_conntrack_helper *helper;
@@ -57,31 +54,28 @@ helper_mt(const struct sk_buff *skb, const struct net_device *in,
        return ret;
 }
 
-static bool
-helper_mt_check(const char *tablename, const void *inf,
-                const struct xt_match *match, void *matchinfo,
-                unsigned int hook_mask)
+static bool helper_mt_check(const struct xt_mtchk_param *par)
 {
-       struct xt_helper_info *info = matchinfo;
+       struct xt_helper_info *info = par->matchinfo;
 
-       if (nf_ct_l3proto_try_module_get(match->family) < 0) {
+       if (nf_ct_l3proto_try_module_get(par->match->family) < 0) {
                printk(KERN_WARNING "can't load conntrack support for "
-                                   "proto=%u\n", match->family);
+                                   "proto=%u\n", par->match->family);
                return false;
        }
        info->name[29] = '\0';
        return true;
 }
 
-static void helper_mt_destroy(const struct xt_match *match, void *matchinfo)
+static void helper_mt_destroy(const struct xt_mtdtor_param *par)
 {
-       nf_ct_l3proto_module_put(match->family);
+       nf_ct_l3proto_module_put(par->match->family);
 }
 
 static struct xt_match helper_mt_reg[] __read_mostly = {
        {
                .name           = "helper",
-               .family         = AF_INET,
+               .family         = NFPROTO_IPV4,
                .checkentry     = helper_mt_check,
                .match          = helper_mt,
                .destroy        = helper_mt_destroy,
@@ -90,7 +84,7 @@ static struct xt_match helper_mt_reg[] __read_mostly = {
        },
        {
                .name           = "helper",
-               .family         = AF_INET6,
+               .family         = NFPROTO_IPV6,
                .checkentry     = helper_mt_check,
                .match          = helper_mt,
                .destroy        = helper_mt_destroy,