diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-09-19 20:11:27 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-09-19 22:54:25 +0200 |
commit | 628203491deffcf01ee010152419ced8f549e57e (patch) | |
tree | 4df452f38817f1babcfa3b3b368f9d83db8a49b3 /include/libnftables/set.h | |
parent | 8cabd12d31c1f02ab67bd6e2ecf32f005b2a6f87 (diff) |
src: replace size_t by uint32_t in set/get interfaces
This patch breaks the ABI to shrink the size parameter from 8
to 4 bytes in x86_64. The maximum length of netlink attributes
is 2 bytes, so 4 bytes as attribute payload length should be
enough.
After this patch, size_t is only used in the nft_*_snprintf
interfaces.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/libnftables/set.h')
-rw-r--r-- | include/libnftables/set.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/libnftables/set.h b/include/libnftables/set.h index 4c95cf9..e377826 100644 --- a/include/libnftables/set.h +++ b/include/libnftables/set.h @@ -88,11 +88,11 @@ void nft_set_elem_free(struct nft_set_elem *s); void nft_set_elem_add(struct nft_set *s, struct nft_set_elem *elem); void nft_set_elem_attr_unset(struct nft_set_elem *s, uint16_t attr); -void nft_set_elem_attr_set(struct nft_set_elem *s, uint16_t attr, const void *data, size_t data_len); +void nft_set_elem_attr_set(struct nft_set_elem *s, uint16_t attr, const void *data, uint32_t data_len); void nft_set_elem_attr_set_u32(struct nft_set_elem *s, uint16_t attr, uint32_t val); void nft_set_elem_attr_set_str(struct nft_set_elem *s, uint16_t attr, const char *str); -const void *nft_set_elem_attr_get(struct nft_set_elem *s, uint16_t attr, size_t *data_len); +const void *nft_set_elem_attr_get(struct nft_set_elem *s, uint16_t attr, uint32_t *data_len); const char *nft_set_elem_attr_get_str(struct nft_set_elem *s, uint16_t attr); uint32_t nft_set_elem_attr_get_u32(struct nft_set_elem *s, uint16_t attr); |