diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-04-24 22:19:18 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-05-02 13:16:28 +0200 |
commit | 165cafec1d2c1cef3255995d4e610c638dd8bd5b (patch) | |
tree | 76f873ec4102a945e16276431a32acaa1de9566a /iptables/nft-shared.h | |
parent | 94309632a13000e06ed02e08f0bcbed94080abb3 (diff) |
nft: pass handle to helper functions to build netlink payload
Pass struct nft_handle to helper functions in preparation for the
dynamic register allocation.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/nft-shared.h')
-rw-r--r-- | iptables/nft-shared.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/iptables/nft-shared.h b/iptables/nft-shared.h index 092958cd..0bdb6848 100644 --- a/iptables/nft-shared.h +++ b/iptables/nft-shared.h @@ -132,21 +132,21 @@ struct nft_family_ops { int rulenum); }; -void add_meta(struct nftnl_rule *r, uint32_t key); -void add_payload(struct nftnl_rule *r, int offset, int len, uint32_t base); +void add_meta(struct nft_handle *h, struct nftnl_rule *r, uint32_t key); +void add_payload(struct nft_handle *h, struct nftnl_rule *r, int offset, int len, uint32_t base); void add_bitwise(struct nftnl_rule *r, uint8_t *mask, size_t len); void add_bitwise_u16(struct nftnl_rule *r, uint16_t mask, uint16_t xor); void add_cmp_ptr(struct nftnl_rule *r, uint32_t op, void *data, size_t len); void add_cmp_u8(struct nftnl_rule *r, uint8_t val, uint32_t op); void add_cmp_u16(struct nftnl_rule *r, uint16_t val, uint32_t op); void add_cmp_u32(struct nftnl_rule *r, uint32_t val, uint32_t op); -void add_iniface(struct nftnl_rule *r, char *iface, uint32_t op); -void add_outiface(struct nftnl_rule *r, char *iface, uint32_t op); -void add_addr(struct nftnl_rule *r, enum nft_payload_bases base, int offset, +void add_iniface(struct nft_handle *h, struct nftnl_rule *r, char *iface, uint32_t op); +void add_outiface(struct nft_handle *h, struct nftnl_rule *r, char *iface, uint32_t op); +void add_addr(struct nft_handle *h, struct nftnl_rule *r, enum nft_payload_bases base, int offset, void *data, void *mask, size_t len, uint32_t op); -void add_proto(struct nftnl_rule *r, int offset, size_t len, +void add_proto(struct nft_handle *h, struct nftnl_rule *r, int offset, size_t len, uint8_t proto, uint32_t op); -void add_l4proto(struct nftnl_rule *r, uint8_t proto, uint32_t op); +void add_l4proto(struct nft_handle *h, struct nftnl_rule *r, uint8_t proto, uint32_t op); void add_compat(struct nftnl_rule *r, uint32_t proto, bool inv); bool is_same_interfaces(const char *a_iniface, const char *a_outiface, |