path: root/include/libnftnl
diff options
authorPhil Sutter <>2019-09-27 14:24:40 +0200
committerPhil Sutter <>2019-10-10 23:43:42 +0200
commit38e70330ee6c6b8ddc805ed2a0eb45531166b658 (patch)
treedfb1128da27840ae973e27f5509f9e99e80db5fb /include/libnftnl
parent609a13fc2999e0f2f6910480ac079f3cfdabbd55 (diff)
set: Export nftnl_set_list_lookup_byname()
Rename and optimize internal function nftnl_set_lookup() for external use. Just like with nftnl_chain_list, use a hash table for fast set name lookups. Signed-off-by: Phil Sutter <> Acked-by: Pablo Neira Ayuso <>
Diffstat (limited to 'include/libnftnl')
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libnftnl/set.h b/include/libnftnl/set.h
index 67c54e9..6640ad9 100644
--- a/include/libnftnl/set.h
+++ b/include/libnftnl/set.h
@@ -75,6 +75,8 @@ void nftnl_set_list_add(struct nftnl_set *s, struct nftnl_set_list *list);
void nftnl_set_list_add_tail(struct nftnl_set *s, struct nftnl_set_list *list);
void nftnl_set_list_del(struct nftnl_set *s);
int nftnl_set_list_foreach(struct nftnl_set_list *set_list, int (*cb)(struct nftnl_set *t, void *data), void *data);
+struct nftnl_set *nftnl_set_list_lookup_byname(struct nftnl_set_list *set_list,
+ const char *set);
struct nftnl_set_list_iter;
struct nftnl_set_list_iter *nftnl_set_list_iter_create(const struct nftnl_set_list *l);