ISC DHCP  4.3.5
A reference DHCPv4 and DHCPv6 implementation
hash.c File Reference
#include "dhcpd.h"
#include <omapip/omapip_p.h>
#include <limits.h>
#include <ctype.h>

Go to the source code of this file.

Functions

int new_hash_table (struct hash_table **tp, unsigned count, const char *file, int line)
 
void free_hash_table (struct hash_table **tp, const char *file, int line)
 
struct hash_bucketnew_hash_bucket (char *file, int line) const
 
void free_hash_bucket (struct hash_bucket *ptr, const char *file, int line)
 
int new_hash (struct hash_table **rp, hash_reference referencer, hash_dereference dereferencer, unsigned hsize, unsigned(*hasher)(const void *, unsigned, unsigned), const char *file, int line)
 
unsigned do_case_hash (const void *name, unsigned len, unsigned size)
 
unsigned do_string_hash (const void *name, unsigned len, unsigned size)
 
unsigned do_id_hash (const void *name, unsigned len, unsigned size)
 
unsigned do_number_hash (const void *key, unsigned len, unsigned size)
 
unsigned do_ip4_hash (const void *key, unsigned len, unsigned size)
 
unsigned char * hash_report (struct hash_table *table)
 
void add_hash (struct hash_table *table, const void *key, unsigned len, hashed_object_t *pointer, const char *file, int line)
 
void delete_hash_entry (struct hash_table *table, const void *key, unsigned len, const char *file, int line)
 
int hash_lookup (hashed_object_t **vp, struct hash_table *table, const void *key, unsigned len, const char *file, int line)
 
int hash_foreach (struct hash_table *table, hash_foreach_func func)
 
int casecmp (const void *v1, const void *v2, size_t len)
 

Variables

struct hash_bucketfree_hash_buckets
 

Function Documentation

§ add_hash()

void add_hash ( struct hash_table table,
const void *  key,
unsigned  len,
hashed_object_t pointer,
const char *  file,
int  line 
)

Definition at line 398 of file hash.c.

§ casecmp()

int casecmp ( const void *  v1,
const void *  v2,
size_t  len 
)

Definition at line 536 of file hash.c.

§ delete_hash_entry()

void delete_hash_entry ( struct hash_table table,
const void *  key,
unsigned  len,
const char *  file,
int  line 
)

Definition at line 434 of file hash.c.

§ do_case_hash()

unsigned do_case_hash ( const void *  name,
unsigned  len,
unsigned  size 
)

Definition at line 242 of file hash.c.

§ do_id_hash()

unsigned do_id_hash ( const void *  name,
unsigned  len,
unsigned  size 
)

Definition at line 292 of file hash.c.

§ do_ip4_hash()

unsigned do_ip4_hash ( const void *  key,
unsigned  len,
unsigned  size 
)

Definition at line 334 of file hash.c.

§ do_number_hash()

unsigned do_number_hash ( const void *  key,
unsigned  len,
unsigned  size 
)

Definition at line 326 of file hash.c.

§ do_string_hash()

unsigned do_string_hash ( const void *  name,
unsigned  len,
unsigned  size 
)

Definition at line 268 of file hash.c.

§ free_hash_bucket()

void free_hash_bucket ( struct hash_bucket ptr,
const char *  file,
int  line 
)

Definition at line 195 of file hash.c.

§ free_hash_table()

void free_hash_table ( struct hash_table **  tp,
const char *  file,
int  line 
)

Definition at line 100 of file hash.c.

§ hash_foreach()

int hash_foreach ( struct hash_table table,
hash_foreach_func  func 
)

Definition at line 513 of file hash.c.

§ hash_lookup()

int hash_lookup ( hashed_object_t **  vp,
struct hash_table table,
const void *  key,
unsigned  len,
const char *  file,
int  line 
)

Definition at line 476 of file hash.c.

§ hash_report()

unsigned char* hash_report ( struct hash_table table)

Definition at line 346 of file hash.c.

§ new_hash()

int new_hash ( struct hash_table **  rp,
hash_reference  referencer,
hash_dereference  dereferencer,
unsigned  hsize,
unsigned(*)(const void *, unsigned, unsigned)  hasher,
const char *  file,
int  line 
)

Definition at line 214 of file hash.c.

§ new_hash_bucket()

struct hash_bucket* new_hash_bucket ( char *  file,
int  line 
) const

Definition at line 166 of file hash.c.

§ new_hash_table()

int new_hash_table ( struct hash_table **  tp,
unsigned  count,
const char *  file,
int  line 
)

Definition at line 57 of file hash.c.

Variable Documentation

§ free_hash_buckets

struct hash_bucket* free_hash_buckets

Definition at line 130 of file hash.c.