ISC DHCP  4.3.3
A reference DHCPv4 and DHCPv6 implementation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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

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

Definition at line 397 of file hash.c.

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

Definition at line 535 of file hash.c.

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

Definition at line 433 of file hash.c.

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

Definition at line 241 of file hash.c.

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

Definition at line 291 of file hash.c.

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

Definition at line 333 of file hash.c.

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

Definition at line 325 of file hash.c.

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

Definition at line 267 of file hash.c.

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

Definition at line 194 of file hash.c.

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

Definition at line 99 of file hash.c.

int hash_foreach ( struct hash_table table,
hash_foreach_func  func 
)

Definition at line 512 of file hash.c.

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

Definition at line 475 of file hash.c.

unsigned char* hash_report ( struct hash_table table)

Definition at line 345 of file hash.c.

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 213 of file hash.c.

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

Definition at line 165 of file hash.c.

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

Definition at line 56 of file hash.c.

Variable Documentation

struct hash_bucket* free_hash_buckets

Definition at line 129 of file hash.c.