path: root/include
diff options
authorPablo Neira Ayuso <>2013-08-17 12:40:32 +0200
committerPablo Neira Ayuso <>2013-08-17 12:40:32 +0200
commit7c24c00fe03318a4b95a0b9cf02257604c954937 (patch)
tree1731cec67b5d750c39775986afcdecd4e03f7afd /include
parent522b47f1944d53c87bde973e3e67a383a78577df (diff)
expr: add nft_rule_expr_get_u16 and nft_rule_expr_set_u16
Now required since log has two u16 fields. Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include')
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libnftables/expr.h b/include/libnftables/expr.h
index 02f38d0..65ca1f0 100644
--- a/include/libnftables/expr.h
+++ b/include/libnftables/expr.h
@@ -21,12 +21,14 @@ 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_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);
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);
uint64_t nft_rule_expr_get_u64(const struct nft_rule_expr *expr, uint16_t type);
const char *nft_rule_expr_get_str(const struct nft_rule_expr *expr, uint16_t type);