includes/omapip/hash.h File Reference

Go to the source code of this file.

Data Structures

struct  hashed_object_t
struct  hash_bucket
struct  hash_table
struct  named_hash

Defines

#define DEFAULT_HASH_SIZE   9973
#define KEY_HASH_SIZE   1009
#define HASH_FUNCTIONS_DECL(name, bufarg, type, hashtype)
#define HASH_FUNCTIONS(name, bufarg, type, hashtype, ref, deref, hasher)

Typedefs

typedef isc_result_t(* hash_foreach_func )(const void *, unsigned, void *)
typedef int(* hash_reference )(hashed_object_t **, hashed_object_t *, const char *, int)
typedef int(* hash_dereference )(hashed_object_t **, const char *, int)
typedef int(* hash_comparator_t )(const void *, const void *, size_t)

Functions

void relinquish_hash_bucket_hunks (void)
int new_hash_table (struct hash_table **, unsigned, const char *, int)
void free_hash_table (struct hash_table **, const char *, int)
struct hash_bucketnew_hash_bucket (const char *, int)
void free_hash_bucket (struct hash_bucket *, const char *, int)
int new_hash (struct hash_table **, hash_reference, hash_dereference, unsigned, unsigned(*do_hash)(const void *, unsigned, unsigned), const char *, int)
unsigned do_string_hash (const void *, unsigned, unsigned)
unsigned do_case_hash (const void *, unsigned, unsigned)
unsigned do_id_hash (const void *, unsigned, unsigned)
unsigned do_number_hash (const void *, unsigned, unsigned)
unsigned do_ip4_hash (const void *, unsigned, unsigned)
unsigned char * hash_report (struct hash_table *)
void add_hash (struct hash_table *, const void *, unsigned, hashed_object_t *, const char *, int)
void delete_hash_entry (struct hash_table *, const void *, unsigned, const char *, int)
int hash_lookup (hashed_object_t **, struct hash_table *, const void *, unsigned, const char *, int)
int hash_foreach (struct hash_table *, hash_foreach_func)
int casecmp (const void *s, const void *t, size_t len)

Define Documentation

#define DEFAULT_HASH_SIZE   9973

Definition at line 33 of file hash.h.

#define HASH_FUNCTIONS ( name,
bufarg,
type,
hashtype,
ref,
deref,
hasher   ) 

Definition at line 89 of file hash.h.

#define HASH_FUNCTIONS_DECL ( name,
bufarg,
type,
hashtype   ) 
Value:
void name##_hash_add (hashtype *, bufarg, unsigned, type *,                   \
                      const char *, int);                                     \
void name##_hash_delete (hashtype *, bufarg, unsigned,                        \
                         const char *, int);                                  \
int name##_hash_lookup (type **, hashtype *, bufarg, unsigned,                \
                        const char *, int);                                   \
unsigned char * name##_hash_report(hashtype *);                               \
int name##_hash_foreach (hashtype *, hash_foreach_func);                      \
int name##_new_hash (hashtype **, unsigned, const char *, int);               \
void name##_free_hash_table (hashtype **, const char *, int);

Definition at line 76 of file hash.h.

#define KEY_HASH_SIZE   1009

Definition at line 37 of file hash.h.


Typedef Documentation

typedef int(* hash_comparator_t)(const void *, const void *, size_t)

Definition at line 57 of file hash.h.

typedef int(* hash_dereference)(hashed_object_t **, const char *, int)

Definition at line 48 of file hash.h.

typedef isc_result_t(* hash_foreach_func)(const void *, unsigned, void *)

Definition at line 45 of file hash.h.

typedef int(* hash_reference)(hashed_object_t **, hashed_object_t *, const char *, int)

Definition at line 46 of file hash.h.


Function Documentation

void add_hash ( struct hash_table ,
const void *  ,
unsigned  ,
hashed_object_t ,
const char *  ,
int   
)

Definition at line 397 of file hash.c.

int casecmp ( const void *  s,
const void *  t,
size_t  len 
)

Definition at line 535 of file hash.c.

void delete_hash_entry ( struct hash_table ,
const void *  ,
unsigned  ,
const char *  ,
int   
)

Definition at line 433 of file hash.c.

unsigned do_case_hash ( const void *  ,
unsigned  ,
unsigned   
)

Definition at line 241 of file hash.c.

unsigned do_id_hash ( const void *  ,
unsigned  ,
unsigned   
)

Definition at line 291 of file hash.c.

unsigned do_ip4_hash ( const void *  ,
unsigned  ,
unsigned   
)

Definition at line 333 of file hash.c.

unsigned do_number_hash ( const void *  ,
unsigned  ,
unsigned   
)

Definition at line 325 of file hash.c.

unsigned do_string_hash ( const void *  ,
unsigned  ,
unsigned   
)

Definition at line 267 of file hash.c.

void free_hash_bucket ( struct hash_bucket ,
const char *  ,
int   
)

Definition at line 194 of file hash.c.

void free_hash_table ( struct hash_table **  ,
const char *  ,
int   
)

Definition at line 99 of file hash.c.

int hash_foreach ( struct hash_table ,
hash_foreach_func   
)

Definition at line 512 of file hash.c.

int hash_lookup ( hashed_object_t **  ,
struct hash_table ,
const void *  ,
unsigned  ,
const char *  ,
int   
)

Definition at line 475 of file hash.c.

unsigned char* hash_report ( struct hash_table  ) 

Definition at line 345 of file hash.c.

int new_hash ( struct hash_table **  ,
hash_reference  ,
hash_dereference  ,
unsigned  ,
unsigned(*)(const void *, unsigned, unsigned)  do_hash,
const char *  ,
int   
)

Definition at line 213 of file hash.c.

struct hash_bucket* new_hash_bucket ( const char *  ,
int   
) [read]
int new_hash_table ( struct hash_table **  ,
unsigned  ,
const char *  ,
int   
)

Definition at line 56 of file hash.c.

void relinquish_hash_bucket_hunks ( void   ) 

Generated on 5 Apr 2014 for ISC DHCP by  doxygen 1.6.1