5 #ifndef _NF_CONNTRACK_ECACHE_H
6 #define _NF_CONNTRACK_ECACHE_H
11 #include <linux/netfilter/nf_conntrack_common.h>
25 nf_ct_ecache_find(
const struct nf_conn *
ct)
27 #ifdef CONFIG_NF_CONNTRACK_EVENTS
37 #ifdef CONFIG_NF_CONNTRACK_EVENTS
38 struct net *
net = nf_ct_net(ct);
41 if (!ctmask && !expmask && net->ct.sysctl_events) {
45 if (!ctmask && !expmask)
59 #ifdef CONFIG_NF_CONNTRACK_EVENTS
67 struct nf_ct_event_notifier {
79 struct net *net = nf_ct_net(ct);
85 e = nf_ct_ecache_find(ct);
93 nf_conntrack_eventmask_report(
unsigned int eventmask,
99 struct net *net = nf_ct_net(ct);
100 struct nf_ct_event_notifier *
notify;
108 e = nf_ct_ecache_find(ct);
112 if (nf_ct_is_confirmed(ct) && !nf_ct_is_dying(ct)) {
113 struct nf_ct_event
item = {
121 if (!((eventmask | missed) & e->
ctmask))
124 ret = notify->fcn(eventmask | missed, &item);
126 spin_lock_bh(&ct->
lock);
132 e->
portid == 0 && portid != 0)
138 spin_unlock_bh(&ct->
lock);
148 u32 portid,
int report)
150 return nf_conntrack_eventmask_report(1 << event, ct, portid, report);
156 return nf_conntrack_eventmask_report(1 << event, ct, 0, 0);
159 struct nf_exp_event {
165 struct nf_exp_event_notifier {
178 struct net *net = nf_ct_exp_net(exp);
179 struct nf_exp_event_notifier *notify;
187 e = nf_ct_ecache_find(exp->
master);
191 if (e->
expmask & (1 << event)) {
192 struct nf_exp_event item = {
197 notify->fcn(1 << event, &item);
207 nf_ct_expect_event_report(event, exp, 0, 0);
217 static inline int nf_conntrack_eventmask_report(
unsigned int eventmask,
220 int report) {
return 0; }
222 struct nf_conn *ct) {
return 0; }
226 int report) {
return 0; }