linux/tools/lib/bpf/strset.h
<<
>>
Prefs
   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
  10struct strset;
  11
  12struct strset *strset__new(size_t max_data_sz, const char *init_data, size_t init_data_sz);
  13void strset__free(struct strset *set);
  14
  15const char *strset__data(const struct strset *set);
  16size_t strset__data_size(const struct strset *set);
  17
  18int strset__find_str(struct strset *set, const char *s);
  19int strset__add_str(struct strset *set, const char *s);
  20
  21#endif /* __LIBBPF_STRSET_H */
  22