diff options
author | Patrick McHardy <kaber@trash.net> | 2007-03-14 19:40:10 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:46 -0400 |
commit | 010c7d6f867e98c86723f420d485583464fbab45 (patch) | |
tree | 5ee196dbe0709ba70dbf385c5b7cde78ffc7c90a | |
parent | 73c361862c2be2e4ed6019da283fe1b422107f16 (diff) |
[NETFILTER]: nf_conntrack: uninline notifier registration functions
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/netfilter/nf_conntrack_ecache.h | 30 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_ecache.c | 23 |
2 files changed, 29 insertions, 24 deletions
diff --git a/include/net/netfilter/nf_conntrack_ecache.h b/include/net/netfilter/nf_conntrack_ecache.h index b62a8a9ec9d8..811c9073c532 100644 --- a/include/net/netfilter/nf_conntrack_ecache.h +++ b/include/net/netfilter/nf_conntrack_ecache.h | |||
@@ -20,30 +20,8 @@ DECLARE_PER_CPU(struct nf_conntrack_ecache, nf_conntrack_ecache); | |||
20 | #define CONNTRACK_ECACHE(x) (__get_cpu_var(nf_conntrack_ecache).x) | 20 | #define CONNTRACK_ECACHE(x) (__get_cpu_var(nf_conntrack_ecache).x) |
21 | 21 | ||
22 | extern struct atomic_notifier_head nf_conntrack_chain; | 22 | extern struct atomic_notifier_head nf_conntrack_chain; |
23 | extern struct atomic_notifier_head nf_conntrack_expect_chain; | 23 | extern int nf_conntrack_register_notifier(struct notifier_block *nb); |
24 | 24 | extern int nf_conntrack_unregister_notifier(struct notifier_block *nb); | |
25 | static inline int nf_conntrack_register_notifier(struct notifier_block *nb) | ||
26 | { | ||
27 | return atomic_notifier_chain_register(&nf_conntrack_chain, nb); | ||
28 | } | ||
29 | |||
30 | static inline int nf_conntrack_unregister_notifier(struct notifier_block *nb) | ||
31 | { | ||
32 | return atomic_notifier_chain_unregister(&nf_conntrack_chain, nb); | ||
33 | } | ||
34 | |||
35 | static inline int | ||
36 | nf_conntrack_expect_register_notifier(struct notifier_block *nb) | ||
37 | { | ||
38 | return atomic_notifier_chain_register(&nf_conntrack_expect_chain, nb); | ||
39 | } | ||
40 | |||
41 | static inline int | ||
42 | nf_conntrack_expect_unregister_notifier(struct notifier_block *nb) | ||
43 | { | ||
44 | return atomic_notifier_chain_unregister(&nf_conntrack_expect_chain, | ||
45 | nb); | ||
46 | } | ||
47 | 25 | ||
48 | extern void nf_ct_deliver_cached_events(const struct nf_conn *ct); | 26 | extern void nf_ct_deliver_cached_events(const struct nf_conn *ct); |
49 | extern void __nf_ct_event_cache_init(struct nf_conn *ct); | 27 | extern void __nf_ct_event_cache_init(struct nf_conn *ct); |
@@ -71,6 +49,10 @@ static inline void nf_conntrack_event(enum ip_conntrack_events event, | |||
71 | atomic_notifier_call_chain(&nf_conntrack_chain, event, ct); | 49 | atomic_notifier_call_chain(&nf_conntrack_chain, event, ct); |
72 | } | 50 | } |
73 | 51 | ||
52 | extern struct atomic_notifier_head nf_conntrack_expect_chain; | ||
53 | extern int nf_conntrack_expect_register_notifier(struct notifier_block *nb); | ||
54 | extern int nf_conntrack_expect_unregister_notifier(struct notifier_block *nb); | ||
55 | |||
74 | static inline void | 56 | static inline void |
75 | nf_conntrack_expect_event(enum ip_conntrack_expect_events event, | 57 | nf_conntrack_expect_event(enum ip_conntrack_expect_events event, |
76 | struct nf_conntrack_expect *exp) | 58 | struct nf_conntrack_expect *exp) |
diff --git a/net/netfilter/nf_conntrack_ecache.c b/net/netfilter/nf_conntrack_ecache.c index 1a223e0c0856..6bd421df2dbc 100644 --- a/net/netfilter/nf_conntrack_ecache.c +++ b/net/netfilter/nf_conntrack_ecache.c | |||
@@ -91,3 +91,26 @@ void nf_ct_event_cache_flush(void) | |||
91 | } | 91 | } |
92 | } | 92 | } |
93 | 93 | ||
94 | int nf_conntrack_register_notifier(struct notifier_block *nb) | ||
95 | { | ||
96 | return atomic_notifier_chain_register(&nf_conntrack_chain, nb); | ||
97 | } | ||
98 | EXPORT_SYMBOL_GPL(nf_conntrack_register_notifier); | ||
99 | |||
100 | int nf_conntrack_unregister_notifier(struct notifier_block *nb) | ||
101 | { | ||
102 | return atomic_notifier_chain_unregister(&nf_conntrack_chain, nb); | ||
103 | } | ||
104 | EXPORT_SYMBOL_GPL(nf_conntrack_unregister_notifier); | ||
105 | |||
106 | int nf_conntrack_expect_register_notifier(struct notifier_block *nb) | ||
107 | { | ||
108 | return atomic_notifier_chain_register(&nf_conntrack_expect_chain, nb); | ||
109 | } | ||
110 | EXPORT_SYMBOL_GPL(nf_conntrack_expect_register_notifier); | ||
111 | |||
112 | int nf_conntrack_expect_unregister_notifier(struct notifier_block *nb) | ||
113 | { | ||
114 | return atomic_notifier_chain_unregister(&nf_conntrack_expect_chain, nb); | ||
115 | } | ||
116 | EXPORT_SYMBOL_GPL(nf_conntrack_expect_unregister_notifier); | ||