path: root/include
diff options
authorAna Rey <>2013-11-19 13:01:56 +0100
committerPablo Neira Ayuso <>2013-11-20 23:55:02 +0100
commit2fad0c845c6dee51d8756a4f558783d8a2344784 (patch)
tree11c9c5cd16440a52c56817dc259b16e95653ab4d /include
parent8fc4d4bd2cec463e296c9efd9a2d3bb99d6b3d0b (diff)
table/chain: add u8 setter and getter for family values
These are needed to set the family value for chain and table. Signed-off-by: Ana Rey <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include')
2 files changed, 4 insertions, 0 deletions
diff --git a/include/libnftables/chain.h b/include/libnftables/chain.h
index c26b348..7dee88a 100644
--- a/include/libnftables/chain.h
+++ b/include/libnftables/chain.h
@@ -34,6 +34,7 @@ enum {
bool nft_chain_attr_is_set(const struct nft_chain *c, uint16_t attr);
void nft_chain_attr_unset(struct nft_chain *c, uint16_t attr);
void nft_chain_attr_set(struct nft_chain *t, uint16_t attr, const void *data);
+void nft_chain_attr_set_u8(struct nft_chain *t, uint16_t attr, uint8_t data);
void nft_chain_attr_set_u32(struct nft_chain *t, uint16_t attr, uint32_t data);
void nft_chain_attr_set_s32(struct nft_chain *t, uint16_t attr, int32_t data);
void nft_chain_attr_set_u64(struct nft_chain *t, uint16_t attr, uint64_t data);
@@ -41,6 +42,7 @@ void nft_chain_attr_set_str(struct nft_chain *t, uint16_t attr, const char *str)
const void *nft_chain_attr_get(struct nft_chain *c, uint16_t attr);
const char *nft_chain_attr_get_str(struct nft_chain *c, uint16_t attr);
+uint8_t nft_chain_attr_get_u8(struct nft_chain *c, uint16_t attr);
uint32_t nft_chain_attr_get_u32(struct nft_chain *c, uint16_t attr);
int32_t nft_chain_attr_get_s32(struct nft_chain *c, uint16_t attr);
uint64_t nft_chain_attr_get_u64(struct nft_chain *c, uint16_t attr);
diff --git a/include/libnftables/table.h b/include/libnftables/table.h
index 4902a1d..9228cec 100644
--- a/include/libnftables/table.h
+++ b/include/libnftables/table.h
@@ -28,8 +28,10 @@ void nft_table_attr_unset(struct nft_table *t, uint16_t attr);
void nft_table_attr_set(struct nft_table *t, uint16_t attr, const void *data);
const void *nft_table_attr_get(struct nft_table *t, uint16_t attr);
+void nft_table_attr_set_u8(struct nft_table *t, uint16_t attr, uint8_t data);
void nft_table_attr_set_u32(struct nft_table *t, uint16_t attr, uint32_t data);
void nft_table_attr_set_str(struct nft_table *t, uint16_t attr, const char *str);
+uint8_t nft_table_attr_get_u8(struct nft_table *t, uint16_t attr);
uint32_t nft_table_attr_get_u32(struct nft_table *t, uint16_t attr);
const char *nft_table_attr_get_str(struct nft_table *t, uint16_t attr);