File: hashtable-api.h

package info (click to toggle)
libnl3 3.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,376 kB
  • sloc: ansic: 76,548; sh: 5,210; python: 3,735; makefile: 1,136; cpp: 957; yacc: 487; lex: 218
file content (24 lines) | stat: -rw-r--r-- 716 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* SPDX-License-Identifier: LGPL-2.1-only */
/*
 * Private resizable hash table API for libnl.
 */

#ifndef NETLINK_HASHTABLE_API_H_
#define NETLINK_HASHTABLE_API_H_

#include "nl-priv-dynamic-core/object-api.h"

/* Opaque resizable hash table handle. */
typedef struct nl_rhash_table nl_rhash_table_t;

/* Allocation / Deletion */
nl_rhash_table_t *nl_rhash_table_alloc(void);
void nl_rhash_table_free(nl_rhash_table_t *ht);

/* Access helpers */
struct nl_object *nl_rhash_table_lookup(nl_rhash_table_t *ht,
					struct nl_object *obj);
int nl_rhash_table_add(nl_rhash_table_t *ht, struct nl_object *obj);
int nl_rhash_table_del(nl_rhash_table_t *ht, struct nl_object *obj);

#endif /* NETLINK_HASHTABLE_API_H_ */