12 #ifndef NETLINK_HASHTABLE_H_
13 #define NETLINK_HASHTABLE_H_
22 struct nl_object * obj;
32 #define NL_MAX_HASH_ENTRIES 1024
39 struct nl_object *obj);
41 struct nl_object *obj);
44 struct nl_object *obj);
45 extern uint32_t nl_hash(
void *k,
size_t length,
void nl_hash_table_free(nl_hash_table_t *ht)
Free hashtable including all nodes.
nl_hash_table_t * nl_hash_table_alloc(int size)
Allocate hashtable.
struct nl_object * nl_hash_table_lookup(nl_hash_table_t *ht, struct nl_object *obj)
Lookup identical object in hashtable.
int nl_hash_table_add(nl_hash_table_t *ht, struct nl_object *obj)
Add object to hashtable.
int nl_hash_table_del(nl_hash_table_t *ht, struct nl_object *obj)
Remove object from hashtable.