hashtb.h File Reference

Hash table. More...

Go to the source code of this file.

Data Structures

struct  hashtb_param
struct  hashtb_enumerator

Defines

#define HT_OLD_ENTRY   0
#define HT_NEW_ENTRY   1

Typedefs

typedef void(* hashtb_finalize_proc )(struct hashtb_enumerator *)

Functions

struct hashtb * hashtb_create (size_t item_size, const struct hashtb_param *param)
void * hashtb_get_param (struct hashtb *ht, struct hashtb_param *param)
void hashtb_destroy (struct hashtb **ht)
int hashtb_n (struct hashtb *ht)
void * hashtb_lookup (struct hashtb *ht, const void *key, size_t keysize)
struct hashtb_enumeratorhashtb_start (struct hashtb *, struct hashtb_enumerator *)
void hashtb_end (struct hashtb_enumerator *)
void hashtb_next (struct hashtb_enumerator *)
int hashtb_seek (struct hashtb_enumerator *hte, const void *key, size_t keysize, size_t extsize)
void hashtb_delete (struct hashtb_enumerator *)
void hashtb_rehash (struct hashtb *ht, unsigned n_buckets)


Detailed Description

Hash table.

Part of the CCNx C Library.

Copyright (C) 2008, 2009 Palo Alto Research Center, Inc.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Definition in file hashtb.h.


Define Documentation

#define HT_NEW_ENTRY   1

#define HT_OLD_ENTRY   0


Typedef Documentation

typedef void(* hashtb_finalize_proc)(struct hashtb_enumerator *)

Definition at line 29 of file hashtb.h.


Function Documentation

struct hashtb* hashtb_create ( size_t  item_size,
const struct hashtb_param param 
) [read]

void hashtb_delete ( struct hashtb_enumerator  ) 

void hashtb_destroy ( struct hashtb **  ht  ) 

Definition at line 90 of file hashtb.c.

Referenced by ccn_btree_destroy(), ccn_destroy(), ccnd_destroy(), main(), and r_init_destroy().

void hashtb_end ( struct hashtb_enumerator  ) 

void* hashtb_get_param ( struct hashtb *  ht,
struct hashtb_param param 
)

void* hashtb_lookup ( struct hashtb *  ht,
const void *  key,
size_t  keysize 
)

int hashtb_n ( struct hashtb *  ht  ) 

void hashtb_next ( struct hashtb_enumerator  ) 

void hashtb_rehash ( struct hashtb *  ht,
unsigned  n_buckets 
)

Definition at line 286 of file hashtb.c.

Referenced by hashtb_seek().

int hashtb_seek ( struct hashtb_enumerator hte,
const void *  key,
size_t  keysize,
size_t  extsize 
)

struct hashtb_enumerator* hashtb_start ( struct hashtb *  ,
struct hashtb_enumerator  
) [read]


Generated on Thu Feb 16 00:44:16 2012 for Content-Centric Networking in C by  doxygen 1.5.6