#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "sfhashfcn.h"
Go to the source code of this file.
Defines | |
#define | SFGHASH_NOMEM -2 |
#define | SFGHASH_ERR -1 |
#define | SFGHASH_OK 0 |
#define | SFGHASH_INTABLE 1 |
#define | GH_COPYKEYS 0 |
#define | GH_USERKEYS 1 |
Typedefs | |
typedef _sfghash_node | SFGHASH_NODE |
typedef _sfghash | SFGHASH |
typedef _sfghash | SFDICT |
Functions | |
SFGHASH * | sfghash_new (int nrows, int keysize, int userkeys, void(*userfree)(void *p)) |
void | sfghash_delete (SFGHASH *h) |
int | sfghash_add (SFGHASH *h, void *key, void *data) |
int | sfghash_remove (SFGHASH *h, void *key) |
int | sfghash_count (SFGHASH *h) |
void * | sfghash_find (SFGHASH *h, void *key) |
SFGHASH_NODE * | sfghash_findfirst (SFGHASH *h) |
SFGHASH_NODE * | sfghash_findnext (SFGHASH *h) |
int | sfatom_setsize (int n) |
int | sfatom_init () |
int | sfatom_reset () |
int | sfatom_add (char *str, void *data) |
int | sfatom_remove (char *str) |
int | sfatom_count () |
void * | sfatom_find (char *str) |
SFGHASH_NODE * | sfatom_findfirst () |
SFGHASH_NODE * | sfatom_findnext () |
|
Definition at line 31 of file sfghash.h. Referenced by sfatom_init(), and sfdict_new(). |
|
|
|
Definition at line 24 of file sfghash.h. Referenced by sfatom_add(), sfatom_init(), sfatom_reset(), and sfghash_remove(). |
|
Definition at line 26 of file sfghash.h. Referenced by sfghash_add(). |
|
Definition at line 23 of file sfghash.h. Referenced by sfghash_add(). |
|
Definition at line 25 of file sfghash.h. Referenced by sfatom_add(), sfatom_init(), sfatom_reset(), sfghash_add(), and sfghash_free_node(). |
|
|
|
|
|
|
|
Definition at line 700 of file sfghash.c. References sfatom_init(), sfghash_add(), SFGHASH_ERR, and SFGHASH_OK. |
|
Definition at line 736 of file sfghash.c. References _sfghash::count. |
|
Definition at line 729 of file sfghash.c. References sfghash_find(). |
|
Definition at line 743 of file sfghash.c. References NULL, and sfghash_findfirst(). |
|
Definition at line 754 of file sfghash.c. References NULL, and sfghash_findnext(). |
|
Definition at line 665 of file sfghash.c. References GH_COPYKEYS, NULL, SFGHASH_ERR, sfghash_new(), and SFGHASH_OK. Referenced by sfatom_add(), and sfatom_reset(). |
|
Definition at line 722 of file sfghash.c. References sfghash_remove(). |
|
Definition at line 684 of file sfghash.c. References sfatom_init(), sfghash_delete(), SFGHASH_ERR, and SFGHASH_OK. |
|
|
|
Definition at line 257 of file sfghash.c. References _sfghash::cnode, _sfghash::count, _sfghash_node::data, _SFHASHFCN::hash_fcn, index, _sfghash_node::key, _SFHASHFCN::keycmp_fcn, _sfghash::keysize, memcpy, _sfghash_node::next, _sfghash::nrows, _sfghash_node::prev, s_malloc(), SFGHASH_INTABLE, SFGHASH_NOMEM, SFGHASH_OK, _sfghash::sfhashfcn, _sfghash::table, and _sfghash::userkey. Referenced by FlowBitsParse(), sfatom_add(), sfdict_add(), and sfthd_create_threshold_local(). |
|
Definition at line 225 of file sfghash.c. References _sfghash::count. |
|
Definition at line 188 of file sfghash.c. References _sfghash_node::data, _sfghash_node::key, _sfghash_node::next, _sfghash::nrows, s_free(), _sfghash::sfhashfcn, sfhashfcn_free(), _sfghash::table, _sfghash::userfree, and _sfghash::userkey. Referenced by sfatom_reset(), and sfdict_delete(). |
|
Definition at line 429 of file sfghash.c. References _sfghash_node::data, NULL, and sfghash_find_node(). Referenced by FlowBitsParse(), sfatom_find(), sfthd_create_threshold_local(), and sfthd_test_threshold(). |
|
Definition at line 595 of file sfghash.c. References _sfghash::cnode, _sfghash::crow, _sfghash::nrows, NULL, sfghash_next(), and _sfghash::table. Referenced by FlowBitsVerify(), print_thd_local(), sfatom_findfirst(), and sfthd_show_objects(). |
|
Definition at line 620 of file sfghash.c. References _sfghash::cnode, NULL, and sfghash_next(). Referenced by FlowBitsVerify(), print_thd_local(), sfatom_findnext(), and sfthd_show_objects(). |
|
Definition at line 116 of file sfghash.c. References calcNextPrime(), _sfghash::cnode, _sfghash::count, _sfghash::crow, _sfghash::keysize, memset, _sfghash::nrows, s_malloc(), _sfghash::sfhashfcn, sfhashfcn_new(), _sfghash::table, _sfghash::userfree, and _sfghash::userkey. Referenced by SetupFlowBits(), sfatom_init(), sfdict_new(), and sfthd_create_threshold_local(). |
|
Definition at line 476 of file sfghash.c. References _SFHASHFCN::hash_fcn, index, _sfghash_node::key, _SFHASHFCN::keycmp_fcn, _sfghash::keysize, _sfghash_node::next, _sfghash::nrows, SFGHASH_ERR, sfghash_free_node(), _sfghash::sfhashfcn, and _sfghash::table. Referenced by sfatom_remove(), and sfdict_remove(). |