summaryrefslogtreecommitdiff
path: root/include/linux/netfilter
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-04-23 00:17:12 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-04-26 18:16:56 +0200
commit50f2db9e368f73ecbbaa92da365183fa953aaba7 (patch)
tree1612d211b6a782ac164d1ec6f6e7bc1b1d60e60b /include/linux/netfilter
parent7dab8ee3b6e7ec856a616d07ebb9ebd736c92520 (diff)
netfilter: nfnetlink: consolidate callback types
Add enum nfnl_callback_type to identify the callback type to provide one single callback. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/linux/netfilter')
-rw-r--r--include/linux/netfilter/nfnetlink.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h
index df0e3254c57b..515ce53aa20d 100644
--- a/include/linux/netfilter/nfnetlink.h
+++ b/include/linux/netfilter/nfnetlink.h
@@ -14,15 +14,19 @@ struct nfnl_info {
struct netlink_ext_ack *extack;
};
+enum nfnl_callback_type {
+ NFNL_CB_UNSPEC = 0,
+ NFNL_CB_MUTEX,
+ NFNL_CB_RCU,
+ NFNL_CB_BATCH,
+};
+
struct nfnl_callback {
int (*call)(struct sk_buff *skb, const struct nfnl_info *info,
const struct nlattr * const cda[]);
- int (*call_rcu)(struct sk_buff *skb, const struct nfnl_info *info,
- const struct nlattr * const cda[]);
- int (*call_batch)(struct sk_buff *skb, const struct nfnl_info *info,
- const struct nlattr * const cda[]);
- const struct nla_policy *policy; /* netlink attribute policy */
- const u_int16_t attr_count; /* number of nlattr's */
+ const struct nla_policy *policy;
+ enum nfnl_callback_type type;
+ __u16 attr_count;
};
enum nfnl_abort_action {