summaryrefslogtreecommitdiffstats
path: root/include/libnftnl/udata.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2019-12-16 13:44:46 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2019-12-17 18:15:42 +0100
commit7e15d9dc8c6cda0e49720500bec74d2534c30d0d (patch)
tree16604671ea33f3c3b9fbba35dc367f7916d99786 /include/libnftnl/udata.h
parent7f72b5c2d8b1a3e1ebf3a02d2d2a7afcc67a50e5 (diff)
udata: support for TLV attribute nesting
This patch adds nftnl_udata_nest_start() and nftnl_udata_nest_end() to build attribute nests. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/libnftnl/udata.h')
-rw-r--r--include/libnftnl/udata.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/libnftnl/udata.h b/include/libnftnl/udata.h
index 591fa77..8044041 100644
--- a/include/libnftnl/udata.h
+++ b/include/libnftnl/udata.h
@@ -75,6 +75,11 @@ bool nftnl_udata_put_u32(struct nftnl_udata_buf *buf, uint8_t type,
bool nftnl_udata_put_strz(struct nftnl_udata_buf *buf, uint8_t type,
const char *strz);
+/* nest */
+struct nftnl_udata *nftnl_udata_nest_start(struct nftnl_udata_buf *buf,
+ uint8_t type);
+void nftnl_udata_nest_end(struct nftnl_udata_buf *buf, struct nftnl_udata *ud);
+
/* nftnl_udata_attr */
uint8_t nftnl_udata_type(const struct nftnl_udata *attr);
uint8_t nftnl_udata_len(const struct nftnl_udata *attr);