[PATCH 08/11] netfilter: add a private member to nf_hook_ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This will be used to store a pointer to the base chain to be invoked
on a specific hook.

(This patch is early in the series, so as to reduce recompilations
during stgit-like commit editing.)

Signed-off-by: Jan Engelhardt <jengelh@xxxxxxx>
---
 include/linux/netfilter.h |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index ee14284..3813e84c 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -48,15 +48,25 @@ typedef unsigned int nf_hookfn(unsigned int hooknum,
 			       const struct net_device *out,
 			       int (*okfn)(struct sk_buff *));
 
+/**
+ * @list:	List anchor for parent (nf_hooks[pf][hooknum])
+ *
+ * To be filled in by user:
+ * @hook:	Function to call
+ * @owner:	Owning module
+ * @priv:	Private data, free for use by op owner
+ * @pf:		Netfilter protocol/subsystem this hook is for (%NFPROTO_*)
+ * @hooknum:	Hook this op is on (%NF_INET_*)
+ * @priority:	Hooks are ordered in ascending priority.
+ */
 struct nf_hook_ops {
 	struct list_head list;
 
-	/* User fills in from here down. */
 	nf_hookfn *hook;
 	struct module *owner;
+	void *priv;
 	u_int8_t pf;
 	unsigned int hooknum;
-	/* Hooks are ordered in ascending priority. */
 	int priority;
 };
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux