path: root/include/libnftables/expr.h
diff options
authorPablo Neira Ayuso <>2013-09-19 20:11:27 +0200
committerPablo Neira Ayuso <>2013-09-19 22:54:25 +0200
commit628203491deffcf01ee010152419ced8f549e57e (patch)
tree4df452f38817f1babcfa3b3b368f9d83db8a49b3 /include/libnftables/expr.h
parent8cabd12d31c1f02ab67bd6e2ecf32f005b2a6f87 (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 <>
Diffstat (limited to 'include/libnftables/expr.h')
1 files changed, 2 insertions, 2 deletions
diff --git a/include/libnftables/expr.h b/include/libnftables/expr.h
index 65ca1f0..b8f1d1e 100644
--- a/include/libnftables/expr.h
+++ b/include/libnftables/expr.h
@@ -19,14 +19,14 @@ struct nft_rule_expr *nft_rule_expr_alloc(const char *name);
void nft_rule_expr_free(struct nft_rule_expr *expr);
bool nft_rule_expr_is_set(const struct nft_rule_expr *expr, uint16_t type);
-void nft_rule_expr_set(struct nft_rule_expr *expr, uint16_t type, const void *data, size_t data_len);
+void nft_rule_expr_set(struct nft_rule_expr *expr, uint16_t type, const void *data, uint32_t data_len);
void nft_rule_expr_set_u8(struct nft_rule_expr *expr, uint16_t type, uint8_t data);
void nft_rule_expr_set_u16(struct nft_rule_expr *expr, uint16_t type, uint16_t data);
void nft_rule_expr_set_u32(struct nft_rule_expr *expr, uint16_t type, uint32_t data);
void nft_rule_expr_set_u64(struct nft_rule_expr *expr, uint16_t type, uint64_t data);
void nft_rule_expr_set_str(struct nft_rule_expr *expr, uint16_t type, const char *str);
-const void *nft_rule_expr_get(const struct nft_rule_expr *expr, uint16_t type, size_t *data_len);
+const void *nft_rule_expr_get(const struct nft_rule_expr *expr, uint16_t type, uint32_t *data_len);
uint8_t nft_rule_expr_get_u8(const struct nft_rule_expr *expr, uint16_t type);
uint16_t nft_rule_expr_get_u16(const struct nft_rule_expr *expr, uint16_t type);
uint32_t nft_rule_expr_get_u32(const struct nft_rule_expr *expr, uint16_t type);