summaryrefslogtreecommitdiffstats
path: root/iptables/nft.h
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2023-05-05 16:01:29 +0200
committerPhil Sutter <phil@nwl.cc>2023-08-11 15:56:38 +0200
commit402b9b3c07c8192be3bfc0191fbf56401e26a003 (patch)
treee9ad98d8b47a739f314931e82436b05248ed192d /iptables/nft.h
parent2d6221641d66b502b1a49d3267bd8126b0448a1d (diff)
nft: Pass nft_handle to add_{target,action}()
Prepare for varying rule content based on a global flag. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/nft.h')
-rw-r--r--iptables/nft.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/iptables/nft.h b/iptables/nft.h
index 5acbbf82..a89aff0a 100644
--- a/iptables/nft.h
+++ b/iptables/nft.h
@@ -192,9 +192,11 @@ int add_counters(struct nftnl_rule *r, uint64_t packets, uint64_t bytes);
int add_verdict(struct nftnl_rule *r, int verdict);
int add_match(struct nft_handle *h, struct nft_rule_ctx *ctx,
struct nftnl_rule *r, struct xt_entry_match *m);
-int add_target(struct nftnl_rule *r, struct xt_entry_target *t);
+int add_target(struct nft_handle *h, struct nftnl_rule *r,
+ struct xt_entry_target *t);
int add_jumpto(struct nftnl_rule *r, const char *name, int verdict);
-int add_action(struct nftnl_rule *r, struct iptables_command_state *cs, bool goto_set);
+int add_action(struct nft_handle *h, struct nftnl_rule *r,
+ struct iptables_command_state *cs, bool goto_set);
int add_log(struct nftnl_rule *r, struct iptables_command_state *cs);
char *get_comment(const void *data, uint32_t data_len);