9 TAILQ_ENTRY(hnode
) hn_next
;
12 typedef struct htable
{
13 size_t ht_size
; /* size must be a power of 2 */
15 u_int (*ht_hashf
)(const void *key
);
16 int (*ht_cmpf
)(const void *arg1
, const void *arg2
);
17 void (*ht_printf
)(const void *key
, const void *data
);
18 TAILQ_HEAD(htablehead
, hnode
) *ht_table
;
21 /* Function prototypes */
22 void htable_init(htable_t
*htable
, size_t size
);
23 void htable_insert(htable_t
*htable
, const void *key
, void *data
);
24 void htable_remove(htable_t
*htable
, const void *key
);
25 void *htable_search(const htable_t
*htable
, const void *key
);
26 void htable_print(const htable_t
*htable
);