Debian Codegraph @

lib/hashtable-api.h

raw
1 /* SPDX-License-Identifier: LGPL-2.1-only */
2 /*
3 * Private resizable hash table API for libnl.
4 */
5
6 #ifndef NETLINK_HASHTABLE_API_H_
7 #define NETLINK_HASHTABLE_API_H_
8
9 #include "nl-priv-dynamic-core/object-api.h"
10
11 /* Opaque resizable hash table handle. */
12 typedef struct nl_rhash_table nl_rhash_table_t;
13
14 /* Allocation / Deletion */
15 nl_rhash_table_t *nl_rhash_table_alloc(void);
16 void nl_rhash_table_free(nl_rhash_table_t *ht);
17
18 /* Access helpers */
19 struct nl_object *nl_rhash_table_lookup(nl_rhash_table_t *ht,
20 struct nl_object *obj);
21 int nl_rhash_table_add(nl_rhash_table_t *ht, struct nl_object *obj);
22 int nl_rhash_table_del(nl_rhash_table_t *ht, struct nl_object *obj);
23
24 #endif /* NETLINK_HASHTABLE_API_H_ */