bloom.h File Reference

Bloom filters. More...

Go to the source code of this file.

Data Structures

struct  ccn_bloom_wire

Functions

struct ccn_bloom * ccn_bloom_create (int estimated_members, const unsigned char seed[4])
 Create an empty Bloom filter constructor.
struct ccn_bloom * ccn_bloom_from_wire (const void *data, size_t size)
void ccn_bloom_destroy (struct ccn_bloom **)
int ccn_bloom_insert (struct ccn_bloom *b, const void *key, size_t size)
int ccn_bloom_match (struct ccn_bloom *b, const void *key, size_t size)
int ccn_bloom_n (struct ccn_bloom *b)
int ccn_bloom_wiresize (struct ccn_bloom *b)
int ccn_bloom_store_wire (struct ccn_bloom *b, unsigned char *dest, size_t destsize)
struct ccn_bloom_wireccn_bloom_validate_wire (const void *buf, size_t size)
int ccn_bloom_match_wire (const struct ccn_bloom_wire *f, const void *key, size_t size)


Detailed Description

Bloom filters.

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 bloom.h.


Function Documentation

struct ccn_bloom* ccn_bloom_create ( int  estimated_members,
const unsigned char  seed[4] 
) [read]

Create an empty Bloom filter constructor.

Parameters:
estimated_members is an estimate of the number of elements that will be inserted into the filter
seed is used to seed the hash functions
Returns:
a new, empty Bloom filter constructor

Definition at line 38 of file ccn_bloom.c.

Referenced by main().

void ccn_bloom_destroy ( struct ccn_bloom **   ) 

Definition at line 104 of file ccn_bloom.c.

Referenced by ccn_bloom_create(), ccn_bloom_from_wire(), and main().

struct ccn_bloom* ccn_bloom_from_wire ( const void *  data,
size_t  size 
) [read]

Definition at line 86 of file ccn_bloom.c.

Referenced by make_partition().

int ccn_bloom_insert ( struct ccn_bloom *  b,
const void *  key,
size_t  size 
)

Definition at line 142 of file ccn_bloom.c.

Referenced by main().

int ccn_bloom_match ( struct ccn_bloom *  b,
const void *  key,
size_t  size 
)

Definition at line 189 of file ccn_bloom.c.

Referenced by main().

int ccn_bloom_match_wire ( const struct ccn_bloom_wire f,
const void *  key,
size_t  size 
)

int ccn_bloom_n ( struct ccn_bloom *  b  ) 

Definition at line 195 of file ccn_bloom.c.

int ccn_bloom_store_wire ( struct ccn_bloom *  b,
unsigned char *  dest,
size_t  destsize 
)

Definition at line 211 of file ccn_bloom.c.

Referenced by append_bloom_element().

struct ccn_bloom_wire* ccn_bloom_validate_wire ( const void *  buf,
size_t  size 
) [read]

int ccn_bloom_wiresize ( struct ccn_bloom *  b  ) 

Definition at line 201 of file ccn_bloom.c.

Referenced by append_bloom_element(), ccn_bloom_store_wire(), and main().


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