xref: /openbmc/linux/tools/lib/bpf/strset.h (revision 0ad53fe3)
1 /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
2 
3 /* Copyright (c) 2021 Facebook */
4 #ifndef __LIBBPF_STRSET_H
5 #define __LIBBPF_STRSET_H
6 
7 #include <stdbool.h>
8 #include <stddef.h>
9 
10 struct strset;
11 
12 struct strset *strset__new(size_t max_data_sz, const char *init_data, size_t init_data_sz);
13 void strset__free(struct strset *set);
14 
15 const char *strset__data(const struct strset *set);
16 size_t strset__data_size(const struct strset *set);
17 
18 int strset__find_str(struct strset *set, const char *s);
19 int strset__add_str(struct strset *set, const char *s);
20 
21 #endif /* __LIBBPF_STRSET_H */
22