summaryrefslogtreecommitdiff
path: root/include/libmnl
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2010-04-30 12:29:17 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2010-04-30 12:29:17 +0200
commitd75ac4598f2f9472dd625d284b912d417b287e1e (patch)
tree7ea83040b33754bc96435d6e1166d5c89a225e6f /include/libmnl
parentc1a946a824a7b870e06b9eff209ad12d11484d1a (diff)
downloadlibmnl-d75ac4598f2f9472dd625d284b912d417b287e1e.tar.gz
libmnl-d75ac4598f2f9472dd625d284b912d417b287e1e.zip
add helpers to nest attributes
Based on code from Jozsef Kadlecsik and its ipset-5 implementation. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/libmnl')
-rw-r--r--include/libmnl/libmnl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/libmnl/libmnl.h b/include/libmnl/libmnl.h
index 95167a3..d4bb7ed 100644
--- a/include/libmnl/libmnl.h
+++ b/include/libmnl/libmnl.h
@@ -85,6 +85,10 @@ extern void mnl_attr_put_u64(struct nlmsghdr *nlh, uint16_t type, uint64_t data)
extern void mnl_attr_put_str(struct nlmsghdr *nlh, uint16_t type, const void *data);
extern void mnl_attr_put_str_null(struct nlmsghdr *nlh, uint16_t type, const void *data);
+/* TLV attribute nesting */
+extern struct nlattr *mnl_attr_nest_start(struct nlmsghdr *nlh, uint16_t type);
+extern void mnl_attr_nest_end(struct nlmsghdr *nlh, struct nlattr *start);
+
/* TLV validation */
extern int mnl_attr_type_valid(const struct nlattr *attr, uint16_t maxtype);