#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "sfmemcap.h"
#include "sfhashfcn.h"
Go to the source code of this file.
|
Definition at line 26 of file sfxhash.h. Referenced by sfxhash_remove(). |
|
Definition at line 28 of file sfxhash.h. Referenced by flowcache_newflow(), Frag3NewTracker(), scoreboard_add(), server_stats_add_ipv4(), sfthd_test_gobject(), sfthd_test_object(), sfxhash_add(), and ut_check(). |
|
Definition at line 25 of file sfxhash.h. Referenced by flowcache_newflow(), scoreboard_add(), server_stats_add_ipv4(), sfxhash_add(), and ut_check(). |
|
Definition at line 27 of file sfxhash.h. Referenced by flowcache_newflow(), Frag3NewTracker(), Frag3RemoveTracker(), ps_tracker_get(), scoreboard_add(), server_stats_add_ipv4(), sfxhash_add(), sfxhash_free_node(), and ut_check(). |
|
|
|
|
|
Add a key + data pair to the hash table 2003-06-06:
This is done because of the successful find.
Definition at line 654 of file sfxhash.c. References _sfxhash::cnode, _sfxhash::count, _sfxhash_node::data, _sfxhash::datasize, index, _sfxhash_node::key, _sfxhash::keysize, memcpy, _sfxhash_node::rindex, sfxhash_find_node_row(), sfxhash_glink_node(), SFXHASH_INTABLE, sfxhash_link_node(), sfxhash_newnode(), SFXHASH_NOMEM, and SFXHASH_OK. Referenced by flowcache_newflow(), Frag3NewTracker(), ps_tracker_get(), scoreboard_add(), server_stats_add_ipv4(), server_stats_load(), sfthd_test_gobject(), sfthd_test_object(), and ut_check(). |
|
Definition at line 95 of file sfxhash.c. References s_malloc(). |
|
Get the # auto recovery
Definition at line 318 of file sfxhash.c. References _sfxhash::anr_count. Referenced by flowcache_stats(), scoreboard_stats(), server_stats(), and ut_stats(). |
|
Get the # of Nodes in HASH the table
Definition at line 307 of file sfxhash.c. References _sfxhash::count. Referenced by CleanHashTable(), flowcache_stats(), Frag3Defrag(), Frag3GetTracker(), PrintSessionCache(), scoreboard_stats(), server_stats(), and ut_stats(). |
|
Delete the hash Table free key's, free node's, and free the users data.
Definition at line 269 of file sfxhash.c. References _sfxhash_node::data, _sfxhash_node::key, _sfxhash_node::next, _sfxhash::nrows, s_free(), _sfxhash::sfhashfcn, sfhashfcn_free(), _sfxhash::table, and _sfxhash::usrfree. Referenced by flowcache_destroy(), flowcache_init(), scoreboard_destroy(), server_stats_destroy(), server_stats_init(), and ut_destroy(). |
|
Find the users data based associated with the key
Definition at line 817 of file sfxhash.c. References _sfxhash_node::data, NULL, and sfxhash_find_node_row(). Referenced by flowcache_find(), Frag3GetTracker(), ps_tracker_get(), scoreboard_find(), and server_stats_hitcount_ipv4(). |
|
Get the # unsucessful finds
Definition at line 340 of file sfxhash.c. References _sfxhash::find_fail. Referenced by scoreboard_stats(), server_stats(), and ut_stats(). |
|
Find a Node based on the key
Definition at line 800 of file sfxhash.c. References sfxhash_find_node_row(). Referenced by GetSessionFromHashTable(). |
|
Get the # sucessful finds
Definition at line 351 of file sfxhash.c. References _sfxhash::find_success. Referenced by scoreboard_stats(), server_stats(), and ut_stats(). |
|
Get the # finds
Definition at line 329 of file sfxhash.c. References _sfxhash::find_fail, and _sfxhash::find_success. Referenced by scoreboard_stats(), server_stats(), and ut_stats(). |
|
Find and return the first hash table node
Definition at line 1079 of file sfxhash.c. References _sfxhash::cnode, _sfxhash::crow, _sfxhash::nrows, NULL, sfxhash_next(), and _sfxhash::table. |
|
Find and return the next hash table node
Definition at line 1108 of file sfxhash.c. References _sfxhash::cnode, NULL, and sfxhash_next(). |
|
Definition at line 99 of file sfxhash.c. References s_free(). |
|
Definition at line 984 of file sfxhash.c. References _sfxhash::count, _sfxhash_node::data, _sfxhash_node::key, _sfxhash::recycle_nodes, s_free(), sfxhash_gunlink_node(), SFXHASH_OK, sfxhash_save_free_node(), sfxhash_unlink_node(), and _sfxhash::usrfree. Referenced by Frag3Expire(), and sfxhash_remove(). |
|
Add a key to the hash table, return the hash node 2003-06-06:
This is done because of the successful find.
Definition at line 733 of file sfxhash.c. References _sfxhash::cnode, _sfxhash::count, _sfxhash_node::data, _sfxhash::datasize, index, _sfxhash_node::key, _sfxhash::keysize, memcpy, NULL, _sfxhash_node::rindex, sfxhash_find_node_row(), sfxhash_glink_node(), sfxhash_link_node(), and sfxhash_newnode(). Referenced by flowcache_newflow(), Frag3NewTracker(), and GetNewSession(). |
|
Get the HEAD of the in use list
Definition at line 837 of file sfxhash.c. References _sfxhash::ghead, and NULL. Referenced by scoreboard_dump(), server_stats_dump(), server_stats_save(), sfxhash_mru(), sfxhash_mru_node(), and unique_tracker_dump(). |
|
Definition at line 462 of file sfxhash.c. References _sfxhash::ghead, sfxhash_glink_node(), and sfxhash_gunlink_node(). Referenced by CleanHashTable(), Frag3Prune(), and movetofront(). |
|
Walk the global list
Definition at line 855 of file sfxhash.c. References _sfxhash_node::gnext, and NULL. Referenced by scoreboard_dump(), server_stats_dump(), server_stats_save(), and unique_tracker_dump(). |
|
Return the least recently used data from the global list
Definition at line 896 of file sfxhash.c. References _sfxhash_node::data, _sfxhash::gtail, and NULL. Referenced by CleanHashTable(), flowcache_lru(), Frag3Expire(), and scoreboard_lru(). |
|
Return the least recently used node from the global list
Definition at line 937 of file sfxhash.c. References _sfxhash::gtail, and NULL. Referenced by CleanHashTable(), Frag3Expire(), and Frag3Prune(). |
|
Get some hash table statistics. NOT FOR REAL TIME USE.
Definition at line 958 of file sfxhash.c. References _sfxhash_node::next, _sfxhash::nrows, NULL, and _sfxhash::table. Referenced by flowcache_stats(). |
|
Return the most recently used data from the global list
Definition at line 875 of file sfxhash.c. References _sfxhash_node::data, NULL, and sfxhash_ghead(). Referenced by flowcache_mru(), ps_tracker_get(), PurgeSessionCache(), scoreboard_mru(), and server_stats_add_ipv4(). |
|
Return the most recently used node from the global list
Definition at line 916 of file sfxhash.c. References NULL, and sfxhash_ghead(). |
|
Create a new hash table By default, this will "splay" nodes to the top of a free list.
Definition at line 175 of file sfxhash.c. References _sfxhash::anr_count, _sfxhash::anr_flag, _sfxhash::anr_tries, _sfxhash::anrfree, calcNextPrime(), _sfxhash::cnode, _sfxhash::count, _sfxhash::crow, _sfxhash::datasize, _sfxhash::find_fail, _sfxhash::find_success, _sfxhash::ghead, _sfxhash::gtail, _sfxhash::keysize, _sfxhash::mc, MEMCAP::memused, MEMCAP::nblocks, _sfxhash::nrows, _sfxhash::overhead_blocks, _sfxhash::overhead_bytes, _sfxhash::recycle_nodes, s_malloc(), _sfxhash::sfhashfcn, sfhashfcn_new(), sfmemcap_init(), _sfxhash::splay, _sfxhash::table, and _sfxhash::usrfree. Referenced by flowcache_init(), Frag3GlobalInit(), InitSessionCache(), ps_init(), scoreboard_init(), server_stats_init(), sfthd_new(), and ut_init(). |
|
Get the # of overhead blocks
Definition at line 376 of file sfxhash.c. References _sfxhash::overhead_blocks. Referenced by flowcache_overhead_blocks(). |
|
Get the # of overhead bytes
Definition at line 365 of file sfxhash.c. References _sfxhash::overhead_bytes. Referenced by flowcache_overhead_bytes(), scoreboard_overhead_bytes(), scoreboard_stats(), server_stats_overhead_bytes(), and ut_overhead_bytes(). |
|
Remove a Key + Data Pair from the table.
Definition at line 1019 of file sfxhash.c. References _SFHASHFCN::hash_fcn, index, _sfxhash_node::key, _SFHASHFCN::keycmp_fcn, _sfxhash::keysize, _sfxhash_node::next, _sfxhash::nrows, _sfxhash::sfhashfcn, SFXHASH_ERR, sfxhash_free_node(), and _sfxhash::table. Referenced by flowcache_releaseflow(), Frag3RemoveTracker(), RemoveSessionFromHashTable(), scoreboard_remove(), and server_stats_remove_ipv4(). |
|
Make sfhashfcn use a separate set of operators for the backend.
Definition at line 1135 of file sfxhash.c. References _sfxhash::sfhashfcn, and sfhashfcn_set_keyops(). Referenced by flowcache_init(). |
|
Set Splay mode : Splays nodes to front of list on each access
Definition at line 255 of file sfxhash.c. References _sfxhash::splay. |