ISC DHCP 4.4.3-P1
A reference DHCPv4 and DHCPv6 implementation
 
Loading...
Searching...
No Matches
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 396 of file hash.c.

◆ casecmp()

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

Definition at line 534 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 432 of file hash.c.

◆ do_case_hash()

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

Definition at line 240 of file hash.c.

◆ do_id_hash()

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

Definition at line 290 of file hash.c.

◆ do_ip4_hash()

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

Definition at line 332 of file hash.c.

◆ do_number_hash()

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

Definition at line 324 of file hash.c.

◆ do_string_hash()

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

Definition at line 266 of file hash.c.

◆ free_hash_bucket()

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

Definition at line 193 of file hash.c.

◆ free_hash_table()

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

Definition at line 98 of file hash.c.

◆ hash_foreach()

int hash_foreach ( struct hash_table * table,
hash_foreach_func func )

Definition at line 511 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 474 of file hash.c.

◆ hash_report()

unsigned char * hash_report ( struct hash_table * table)

Definition at line 344 of file hash.c.

◆ new_hash()

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 )

Definition at line 212 of file hash.c.

◆ new_hash_bucket()

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

Definition at line 164 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 55 of file hash.c.

Variable Documentation

◆ free_hash_buckets

struct hash_bucket* free_hash_buckets

Definition at line 128 of file hash.c.