summaryrefslogtreecommitdiffstats
path: root/iptables/nft-cmd.h
diff options
context:
space:
mode:
Diffstat (limited to 'iptables/nft-cmd.h')
-rw-r--r--iptables/nft-cmd.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/iptables/nft-cmd.h b/iptables/nft-cmd.h
index ae5908d8..8163b82c 100644
--- a/iptables/nft-cmd.h
+++ b/iptables/nft-cmd.h
@@ -7,6 +7,13 @@
struct nftnl_rule;
+enum {
+ CTR_OP_INC_PKTS = 1 << 0,
+ CTR_OP_DEC_PKTS = 1 << 1,
+ CTR_OP_INC_BYTES = 1 << 2,
+ CTR_OP_DEC_BYTES = 1 << 3,
+};
+
struct nft_cmd {
struct list_head head;
int command;
@@ -22,6 +29,7 @@ struct nft_cmd {
} obj;
const char *policy;
struct xt_counters counters;
+ uint8_t counter_op;
const char *rename;
int counters_save;
struct {
@@ -77,6 +85,10 @@ int nft_cmd_rule_list_save(struct nft_handle *h, const char *chain,
const char *table, int rulenum, int counters);
int ebt_cmd_user_chain_policy(struct nft_handle *h, const char *table,
const char *chain, const char *policy);
+int nft_cmd_rule_change_counters(struct nft_handle *h,
+ const char *chain, const char *table,
+ struct iptables_command_state *cs,
+ int rule_nr, uint8_t counter_op, bool verbose);
void nft_cmd_table_new(struct nft_handle *h, const char *table);
#endif /* _NFT_CMD_H_ */