summaryrefslogtreecommitdiffstats
path: root/include/libnftables/set.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2013-06-17 00:39:38 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-06-17 21:07:43 +0200
commite0f0f01c249ce659947fb8ca592da3c7062b7fa6 (patch)
treedb6023ef87941dc8e6f5d24ec4585d993c4e6e47 /include/libnftables/set.h
parent283ea9e229fa362836992c61e4dcef4aef1a8564 (diff)
src: add nft_*_attr_is_set
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/libnftables/set.h')
-rw-r--r--include/libnftables/set.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/libnftables/set.h b/include/libnftables/set.h
index f337f60..bcd4db7 100644
--- a/include/libnftables/set.h
+++ b/include/libnftables/set.h
@@ -1,6 +1,9 @@
#ifndef _NFT_SET_H_
#define _NFT_SET_H_
+#include <stdint.h>
+#include <stdbool.h>
+
enum {
NFT_SET_ATTR_TABLE,
NFT_SET_ATTR_NAME,
@@ -16,6 +19,7 @@ struct nft_set;
struct nft_set *nft_set_alloc(void);
void nft_set_free(struct nft_set *s);
+bool nft_set_attr_is_set(struct nft_set *s, uint16_t attr);
void nft_set_attr_unset(struct nft_set *s, uint16_t attr);
void nft_set_attr_set(struct nft_set *s, uint16_t attr, const void *data);
void nft_set_attr_set_u32(struct nft_set *s, uint16_t attr, uint32_t val);
@@ -73,6 +77,8 @@ void *nft_set_elem_attr_get(struct nft_set_elem *s, uint16_t attr, size_t *data_
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);
+bool nft_set_elem_attr_is_set(struct nft_set_elem *s, uint16_t attr);
+
struct nlmsghdr *nft_set_elem_nlmsg_build_hdr(char *buf, uint16_t cmd, uint16_t family, uint16_t type, uint32_t seq);
void nft_set_elems_nlmsg_build_payload(struct nlmsghdr *nlh, struct nft_set *s);
void nft_set_elem_nlmsg_build_payload(struct nlmsghdr *nlh, struct nft_set_elem *e);