diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 08:24:23 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 08:24:23 +0000 |
commit | 67c27783d7735af6ba22b9f031d97ca4ea56c29c (patch) | |
tree | 17770fad3c90bf420cb2470e6e51255fcbf31bf9 /src/strset.h | |
parent | Initial commit. (diff) | |
download | libbpf-upstream.tar.xz libbpf-upstream.zip |
Adding upstream version 1.1.0.upstream/1.1.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/strset.h')
-rw-r--r-- | src/strset.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/strset.h b/src/strset.h new file mode 100644 index 0000000..b6ddf77 --- /dev/null +++ b/src/strset.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */ + +/* Copyright (c) 2021 Facebook */ +#ifndef __LIBBPF_STRSET_H +#define __LIBBPF_STRSET_H + +#include <stdbool.h> +#include <stddef.h> + +struct strset; + +struct strset *strset__new(size_t max_data_sz, const char *init_data, size_t init_data_sz); +void strset__free(struct strset *set); + +const char *strset__data(const struct strset *set); +size_t strset__data_size(const struct strset *set); + +int strset__find_str(struct strset *set, const char *s); +int strset__add_str(struct strset *set, const char *s); + +#endif /* __LIBBPF_STRSET_H */ |