aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-11-28 20:35:17 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:31:17 -0500
commitd62f9ed4a490309bd9e5df0b42ba5d096e7b5902 (patch)
tree8d0791c4e4d711c7ae0c259d80553a85dbfe62bd /include
parentf8eb24a89afa12b48fa7e39775faea6d64b8e538 (diff)
[NETFILTER]: nf_conntrack: automatic sysctl registation for conntrack protocols
Add helper functions for sysctl registration with optional instantiating of common path elements (like net/netfilter) and use it for support for automatic registation of conntrack protocol sysctls. Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netfilter.h10
-rw-r--r--include/net/netfilter/nf_conntrack_l3proto.h6
-rw-r--r--include/net/netfilter/nf_conntrack_l4proto.h6
3 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index 6ab5e2d6133e..f6f3fcbd70ed 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -117,6 +117,16 @@ void nf_unregister_hooks(struct nf_hook_ops *reg, unsigned int n);
117int nf_register_sockopt(struct nf_sockopt_ops *reg); 117int nf_register_sockopt(struct nf_sockopt_ops *reg);
118void nf_unregister_sockopt(struct nf_sockopt_ops *reg); 118void nf_unregister_sockopt(struct nf_sockopt_ops *reg);
119 119
120#ifdef CONFIG_SYSCTL
121/* Sysctl registration */
122struct ctl_table_header *nf_register_sysctl_table(struct ctl_table *path,
123 struct ctl_table *table);
124void nf_unregister_sysctl_table(struct ctl_table_header *header,
125 struct ctl_table *table);
126extern struct ctl_table nf_net_netfilter_sysctl_path[];
127extern struct ctl_table nf_net_ipv4_netfilter_sysctl_path[];
128#endif /* CONFIG_SYSCTL */
129
120extern struct list_head nf_hooks[NPROTO][NF_MAX_HOOKS]; 130extern struct list_head nf_hooks[NPROTO][NF_MAX_HOOKS];
121 131
122/* those NF_LOG_* defines and struct nf_loginfo are legacy definitios that will 132/* those NF_LOG_* defines and struct nf_loginfo are legacy definitios that will
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h
index 6364df059422..664ddcffe00d 100644
--- a/include/net/netfilter/nf_conntrack_l3proto.h
+++ b/include/net/netfilter/nf_conntrack_l3proto.h
@@ -75,6 +75,12 @@ struct nf_conntrack_l3proto
75 int (*nfattr_to_tuple)(struct nfattr *tb[], 75 int (*nfattr_to_tuple)(struct nfattr *tb[],
76 struct nf_conntrack_tuple *t); 76 struct nf_conntrack_tuple *t);
77 77
78#ifdef CONFIG_SYSCTL
79 struct ctl_table_header *ctl_table_header;
80 struct ctl_table *ctl_table_path;
81 struct ctl_table *ctl_table;
82#endif /* CONFIG_SYSCTL */
83
78 /* Module (if any) which this is connected to. */ 84 /* Module (if any) which this is connected to. */
79 struct module *me; 85 struct module *me;
80}; 86};
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h
index c22804aa227e..fe1e8fa30d2f 100644
--- a/include/net/netfilter/nf_conntrack_l4proto.h
+++ b/include/net/netfilter/nf_conntrack_l4proto.h
@@ -76,6 +76,12 @@ struct nf_conntrack_l4proto
76 int (*nfattr_to_tuple)(struct nfattr *tb[], 76 int (*nfattr_to_tuple)(struct nfattr *tb[],
77 struct nf_conntrack_tuple *t); 77 struct nf_conntrack_tuple *t);
78 78
79#ifdef CONFIG_SYSCTL
80 struct ctl_table_header **ctl_table_header;
81 struct ctl_table *ctl_table;
82 unsigned int *ctl_table_users;
83#endif /* CONFIG_SYSCTL */
84
79 /* Module (if any) which this is connected to. */ 85 /* Module (if any) which this is connected to. */
80 struct module *me; 86 struct module *me;
81}; 87};