netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
hash.h File Reference
#include <unistd.h>
#include "linux_list.h"
#include <stdint.h>
Include dependency graph for hash.h:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  hashtable
 
struct  hashtable_node
 

Functions

struct hashtablehashtable_create (int hashsize, int limit, uint32_t(*hash)(const void *data, const struct hashtable *table), int(*compare)(const void *data1, const void *data2))
 
void hashtable_destroy (struct hashtable *h)
 
int hashtable_hash (const struct hashtable *table, const void *data)
 
struct hashtable_nodehashtable_find (const struct hashtable *table, const void *data, int id)
 
int hashtable_add (struct hashtable *table, struct hashtable_node *n, int id)
 
void hashtable_del (struct hashtable *table, struct hashtable_node *node)
 
int hashtable_flush (struct hashtable *table)
 
int hashtable_iterate (struct hashtable *table, void *data, int(*iterate)(void *data, void *n))
 
int hashtable_iterate_limit (struct hashtable *table, void *data, uint32_t from, uint32_t steps, int(*iterate)(void *data1, void *n))
 
unsigned int hashtable_counter (const struct hashtable *table)
 

Function Documentation

int hashtable_add ( struct hashtable table,
struct hashtable_node n,
int  id 
)

Referenced by ct_filter_add_ip().

Here is the caller graph for this function:

unsigned int hashtable_counter ( const struct hashtable table)

Referenced by cache_stats_extended().

Here is the caller graph for this function:

struct hashtable* hashtable_create ( int  hashsize,
int  limit,
uint32_t(*)(const void *data, const struct hashtable *table hash,
int(*)(const void *data1, const void *data2)  compare 
)

Referenced by cache_create(), and ct_filter_create().

Here is the caller graph for this function:

void hashtable_del ( struct hashtable table,
struct hashtable_node node 
)
void hashtable_destroy ( struct hashtable h)

Referenced by cache_destroy(), and ct_filter_destroy().

Here is the caller graph for this function:

struct hashtable_node* hashtable_find ( const struct hashtable table,
const void *  data,
int  id 
)

Referenced by cache_find(), and ct_filter_add_ip().

Here is the caller graph for this function:

int hashtable_flush ( struct hashtable table)
int hashtable_hash ( const struct hashtable table,
const void *  data 
)

Referenced by cache_find(), and ct_filter_add_ip().

Here is the caller graph for this function:

int hashtable_iterate ( struct hashtable table,
void *  data,
int(*)(void *data, void *n)  iterate 
)

Referenced by cache_dump(), cache_flush(), and cache_iterate().

Here is the caller graph for this function:

int hashtable_iterate_limit ( struct hashtable table,
void *  data,
uint32_t  from,
uint32_t  steps,
int(*)(void *data1, void *n)  iterate 
)

Referenced by cache_iterate_limit().

Here is the caller graph for this function: