]> err.no Git - linux-2.6/blobdiff - include/net/netfilter/nf_conntrack_helper.h
[IPV4]: Use ctl paths to register net/ipv4/ table
[linux-2.6] / include / net / netfilter / nf_conntrack_helper.h
index 8c72ac9f0ab8cae417992a85a8f88d6fea8a10a9..d7b2d5483a7128702fdd81ac914908eba8b15e23 100644 (file)
 #ifndef _NF_CONNTRACK_HELPER_H
 #define _NF_CONNTRACK_HELPER_H
 #include <net/netfilter/nf_conntrack.h>
+#include <net/netfilter/nf_conntrack_extend.h>
 
 struct module;
 
 struct nf_conntrack_helper
-{      
-       struct list_head list;          /* Internal use. */
+{
+       struct hlist_node hnode;        /* Internal use. */
 
        const char *name;               /* name of the module */
        struct module *me;              /* pointer to self */
@@ -23,20 +24,19 @@ struct nf_conntrack_helper
                                         * expected connections */
        unsigned int timeout;           /* timeout for expecteds */
 
-       /* Mask of things we will help (compared against server response) */
+       /* Tuple of things we will help (compared against server response) */
        struct nf_conntrack_tuple tuple;
-       struct nf_conntrack_tuple mask;
-       
+
        /* Function to call when data passes; return verdict, or -1 to
            invalidate. */
-       int (*help)(struct sk_buff **pskb,
+       int (*help)(struct sk_buff *skb,
                    unsigned int protoff,
                    struct nf_conn *ct,
                    enum ip_conntrack_info conntrackinfo);
 
        void (*destroy)(struct nf_conn *ct);
 
-       int (*to_nfattr)(struct sk_buff *skb, const struct nf_conn *ct);
+       int (*to_nlattr)(struct sk_buff *skb, const struct nf_conn *ct);
 };
 
 extern struct nf_conntrack_helper *
@@ -52,4 +52,10 @@ extern void nf_ct_helper_put(struct nf_conntrack_helper *helper);
 extern int nf_conntrack_helper_register(struct nf_conntrack_helper *);
 extern void nf_conntrack_helper_unregister(struct nf_conntrack_helper *);
 
+extern struct nf_conn_help *nf_ct_helper_ext_add(struct nf_conn *ct, gfp_t gfp);
+
+static inline struct nf_conn_help *nfct_help(const struct nf_conn *ct)
+{
+       return nf_ct_ext_find(ct, NF_CT_EXT_HELPER);
+}
 #endif /*_NF_CONNTRACK_HELPER_H*/