summaryrefslogtreecommitdiffstats
path: root/iptables/nft-shared.h
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2023-03-29 18:26:23 +0200
committerPhil Sutter <phil@nwl.cc>2023-05-03 19:09:29 +0200
commit674e7c0f639f2322dcc7eee67aa9c3d52fa3ee65 (patch)
tree9e9f1c04fa097f015da5a7063905857672b274ea /iptables/nft-shared.h
parent46ed4d264ce44dd0a01723a1e326eedc0da822ba (diff)
nft: Extract rule parsing callbacks from nft_family_ops
Introduce struct nft_ruleparse_ops holding the family-specific expression parsers and integrate it into nft_family_ops for now. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/nft-shared.h')
-rw-r--r--iptables/nft-shared.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/iptables/nft-shared.h b/iptables/nft-shared.h
index 2edee649..a06b263d 100644
--- a/iptables/nft-shared.h
+++ b/iptables/nft-shared.h
@@ -46,15 +46,6 @@ struct nft_family_ops {
const struct iptables_command_state *cs_b);
void (*print_payload)(struct nftnl_expr *e,
struct nftnl_expr_iter *iter);
- void (*parse_meta)(struct nft_xt_ctx *ctx,
- const struct nft_xt_ctx_reg *sreg,
- struct nftnl_expr *e,
- struct iptables_command_state *cs);
- void (*parse_payload)(struct nft_xt_ctx *ctx,
- const struct nft_xt_ctx_reg *sreg,
- struct nftnl_expr *e,
- struct iptables_command_state *cs);
- void (*parse_lookup)(struct nft_xt_ctx *ctx, struct nftnl_expr *e);
void (*set_goto_flag)(struct iptables_command_state *cs);
void (*print_table_header)(const char *tablename);
@@ -67,11 +58,8 @@ struct nft_family_ops {
void (*save_rule)(const struct iptables_command_state *cs,
unsigned int format);
void (*save_chain)(const struct nftnl_chain *c, const char *policy);
+ struct nft_ruleparse_ops *rule_parse;
struct xt_cmd_parse_ops cmd_parse;
- void (*parse_match)(struct xtables_match *m,
- struct iptables_command_state *cs);
- void (*parse_target)(struct xtables_target *t,
- struct iptables_command_state *cs);
void (*init_cs)(struct iptables_command_state *cs);
bool (*rule_to_cs)(struct nft_handle *h, const struct nftnl_rule *r,
struct iptables_command_state *cs);