GNUnet  0.10.x
Data Structures | Macros | Typedefs | Functions
container_bloomfilter.c File Reference

data structure used to reduce disk accesses. More...

#include "platform.h"
#include "gnunet_util_lib.h"
Include dependency graph for container_bloomfilter.c:

Go to the source code of this file.

Data Structures

struct  GNUNET_CONTAINER_BloomFilter
 

Macros

#define LOG(kind, ...)   GNUNET_log_from (kind, "util-container-bloomfilter", __VA_ARGS__)
 
#define LOG_STRERROR(kind, syscall)   GNUNET_log_from_strerror (kind, "util-container-bloomfilter", syscall)
 
#define LOG_STRERROR_FILE(kind, syscall, filename)   GNUNET_log_from_strerror_file (kind, "util-container-bloomfilter", syscall, filename)
 
#define BUFFSIZE   65536
 

Typedefs

typedef int(* BitIterator) (void *cls, const struct GNUNET_CONTAINER_BloomFilter *bf, unsigned int bit)
 Iterator (callback) method to be called by the bloomfilter iterator on each bit that is to be set or tested for the key. More...
 

Functions

size_t GNUNET_CONTAINER_bloomfilter_get_element_addresses (const struct GNUNET_CONTAINER_BloomFilter *bf)
 Get the number of the addresses set per element in the bloom filter. More...
 
size_t GNUNET_CONTAINER_bloomfilter_get_size (const struct GNUNET_CONTAINER_BloomFilter *bf)
 Get size of the bloom filter. More...
 
struct GNUNET_CONTAINER_BloomFilterGNUNET_CONTAINER_bloomfilter_copy (const struct GNUNET_CONTAINER_BloomFilter *bf)
 Copy an existing memory. More...
 
static void setBit (char *bitArray, unsigned int bitIdx)
 Sets a bit active in the bitArray. More...
 
static void clearBit (char *bitArray, unsigned int bitIdx)
 Clears a bit from bitArray. More...
 
static int testBit (char *bitArray, unsigned int bitIdx)
 Checks if a bit is active in the bitArray. More...
 
static void incrementBit (char *bitArray, unsigned int bitIdx, const struct GNUNET_DISK_FileHandle *fh)
 Sets a bit active in the bitArray and increments bit-specific usage counter on disk (but only if the counter was below 4 bit max (==15)). More...
 
static void decrementBit (char *bitArray, unsigned int bitIdx, const struct GNUNET_DISK_FileHandle *fh)
 Clears a bit from bitArray if the respective usage counter on the disk hits/is zero. More...
 
static int make_empty_file (const struct GNUNET_DISK_FileHandle *fh, size_t size)
 Creates a file filled with zeroes. More...
 
static void iterateBits (const struct GNUNET_CONTAINER_BloomFilter *bf, BitIterator callback, void *arg, const struct GNUNET_HashCode *key)
 Call an iterator for each bit that the bloomfilter must test or set for this element. More...
 
static int incrementBitCallback (void *cls, const struct GNUNET_CONTAINER_BloomFilter *bf, unsigned int bit)
 Callback: increment bit. More...
 
static int decrementBitCallback (void *cls, const struct GNUNET_CONTAINER_BloomFilter *bf, unsigned int bit)
 Callback: decrement bit. More...
 
static int testBitCallback (void *cls, const struct GNUNET_CONTAINER_BloomFilter *bf, unsigned int bit)
 Callback: test if all bits are set. More...
 
struct GNUNET_CONTAINER_BloomFilterGNUNET_CONTAINER_bloomfilter_load (const char *filename, size_t size, unsigned int k)
 Load a bloom-filter from a file. More...
 
struct GNUNET_CONTAINER_BloomFilterGNUNET_CONTAINER_bloomfilter_init (const char *data, size_t size, unsigned int k)
 Create a bloom filter from raw bits. More...
 
int GNUNET_CONTAINER_bloomfilter_get_raw_data (const struct GNUNET_CONTAINER_BloomFilter *bf, char *data, size_t size)
 Copy the raw data of this bloomfilter into the given data array. More...
 
void GNUNET_CONTAINER_bloomfilter_free (struct GNUNET_CONTAINER_BloomFilter *bf)
 Free the space associated with a filter in memory, flush to drive if needed (do not free the space on the drive) More...
 
void GNUNET_CONTAINER_bloomfilter_clear (struct GNUNET_CONTAINER_BloomFilter *bf)
 Reset a bloom filter to empty. More...
 
int GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter *bf, const struct GNUNET_HashCode *e)
 Test if an element is in the filter. More...
 
void GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter *bf, const struct GNUNET_HashCode *e)
 Add an element to the filter. More...
 
int GNUNET_CONTAINER_bloomfilter_or (struct GNUNET_CONTAINER_BloomFilter *bf, const char *data, size_t size)
 Or the entries of the given raw data array with the data of the given bloom filter. More...
 
int GNUNET_CONTAINER_bloomfilter_or2 (struct GNUNET_CONTAINER_BloomFilter *bf, const struct GNUNET_CONTAINER_BloomFilter *to_or)
 Or the entries of the given raw data array with the data of the given bloom filter. More...
 
void GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter *bf, const struct GNUNET_HashCode *e)
 Remove an element from the filter. More...
 
void GNUNET_CONTAINER_bloomfilter_resize (struct GNUNET_CONTAINER_BloomFilter *bf, GNUNET_CONTAINER_HashCodeIterator iterator, void *iterator_cls, size_t size, unsigned int k)
 Resize a bloom filter. More...
 

Detailed Description

data structure used to reduce disk accesses.

The idea basically: Create a signature for each element in the database. Add those signatures to a bit array. When doing a lookup, check if the bit array matches the signature of the requested element. If yes, address the disk, otherwise return 'not found'.

A property of the bloom filter is that sometimes we will have a match even if the element is not on the disk (then we do an unnecessary disk access), but what's most important is that we never get a single "false negative".

To be able to delete entries from the bloom filter, we maintain a 4 bit counter in the file on the drive (we still use only one bit in memory).

Author
Igor Wronsky
Christian Grothoff

Definition in file container_bloomfilter.c.

Macro Definition Documentation

◆ LOG

#define LOG (   kind,
  ... 
)    GNUNET_log_from (kind, "util-container-bloomfilter", __VA_ARGS__)

Definition at line 45 of file container_bloomfilter.c.

◆ LOG_STRERROR

#define LOG_STRERROR (   kind,
  syscall 
)    GNUNET_log_from_strerror (kind, "util-container-bloomfilter", syscall)

Definition at line 47 of file container_bloomfilter.c.

◆ LOG_STRERROR_FILE

#define LOG_STRERROR_FILE (   kind,
  syscall,
  filename 
)    GNUNET_log_from_strerror_file (kind, "util-container-bloomfilter", syscall, filename)

Definition at line 49 of file container_bloomfilter.c.

Referenced by GNUNET_CONTAINER_bloomfilter_load().

◆ BUFFSIZE

#define BUFFSIZE   65536

Definition at line 296 of file container_bloomfilter.c.

Referenced by GNUNET_CONTAINER_bloomfilter_load(), and make_empty_file().

Typedef Documentation

◆ BitIterator

typedef int(* BitIterator) (void *cls, const struct GNUNET_CONTAINER_BloomFilter *bf, unsigned int bit)

Iterator (callback) method to be called by the bloomfilter iterator on each bit that is to be set or tested for the key.

Parameters
clsclosure
bfthe filter to manipulate
bitthe current bit
Returns
GNUNET_YES to continue, GNUNET_NO to stop early

Definition at line 348 of file container_bloomfilter.c.

Function Documentation

◆ GNUNET_CONTAINER_bloomfilter_get_element_addresses()

size_t GNUNET_CONTAINER_bloomfilter_get_element_addresses ( const struct GNUNET_CONTAINER_BloomFilter bf)

Get the number of the addresses set per element in the bloom filter.

Parameters
bfthe filter
Returns
addresses set per element in the bf

Definition at line 89 of file container_bloomfilter.c.

References GNUNET_CONTAINER_BloomFilter::addressesPerElement.

91 {
92  if (bf == NULL)
93  return 0;
94  return bf->addressesPerElement;
95 }
unsigned int addressesPerElement
How many bits we set for each stored element.

◆ setBit()

static void setBit ( char *  bitArray,
unsigned int  bitIdx 
)
static

Sets a bit active in the bitArray.

Increment bit-specific usage counter on disk only if below 4bit max (==15).

Parameters
bitArraymemory area to set the bit in
bitIdxwhich bit to set

Definition at line 137 of file container_bloomfilter.c.

Referenced by GNUNET_CONTAINER_bloomfilter_load(), and incrementBit().

138 {
139  size_t arraySlot;
140  unsigned int targetBit;
141 
142  arraySlot = bitIdx / 8;
143  targetBit = (1L << (bitIdx % 8));
144  bitArray[arraySlot] |= targetBit;
145 }
Here is the caller graph for this function:

◆ clearBit()

static void clearBit ( char *  bitArray,
unsigned int  bitIdx 
)
static

Clears a bit from bitArray.

Bit is cleared from the array only if the respective usage counter on the disk hits/is zero.

Parameters
bitArraymemory area to set the bit in
bitIdxwhich bit to unset

Definition at line 155 of file container_bloomfilter.c.

Referenced by decrementBit().

156 {
157  size_t slot;
158  unsigned int targetBit;
159 
160  slot = bitIdx / 8;
161  targetBit = (1L << (bitIdx % 8));
162  bitArray[slot] = bitArray[slot] & (~targetBit);
163 }
Here is the caller graph for this function:

◆ testBit()

static int testBit ( char *  bitArray,
unsigned int  bitIdx 
)
static

Checks if a bit is active in the bitArray.

Parameters
bitArraymemory area to set the bit in
bitIdxwhich bit to test
Returns
GNUNET_YES if the bit is set, GNUNET_NO if not.

Definition at line 173 of file container_bloomfilter.c.

References GNUNET_NO, and GNUNET_YES.

Referenced by testBitCallback().

174 {
175  size_t slot;
176  unsigned int targetBit;
177 
178  slot = bitIdx / 8;
179  targetBit = (1L << (bitIdx % 8));
180  if (bitArray[slot] & targetBit)
181  return GNUNET_YES;
182  else
183  return GNUNET_NO;
184 }
#define GNUNET_NO
Definition: gnunet_common.h:81
#define GNUNET_YES
Definition: gnunet_common.h:80
Here is the caller graph for this function:

◆ incrementBit()

static void incrementBit ( char *  bitArray,
unsigned int  bitIdx,
const struct GNUNET_DISK_FileHandle fh 
)
static

Sets a bit active in the bitArray and increments bit-specific usage counter on disk (but only if the counter was below 4 bit max (==15)).

Parameters
bitArraymemory area to set the bit in
bitIdxwhich bit to test
fhA file to keep the 4 bit address usage counters in

Definition at line 196 of file container_bloomfilter.c.

References GNUNET_assert, GNUNET_DISK_file_read(), GNUNET_DISK_file_seek(), GNUNET_DISK_file_write(), GNUNET_DISK_handle_invalid(), GNUNET_DISK_SEEK_SET, setBit(), and value.

Referenced by incrementBitCallback().

198 {
199  off_t fileSlot;
200  unsigned char value;
201  unsigned int high;
202  unsigned int low;
203  unsigned int targetLoc;
204 
205  setBit (bitArray, bitIdx);
207  return;
208  /* Update the counter file on disk */
209  fileSlot = bitIdx / 2;
210  targetLoc = bitIdx % 2;
211 
212  GNUNET_assert (fileSlot ==
214  if (1 != GNUNET_DISK_file_read (fh, &value, 1))
215  value = 0;
216  low = value & 0xF;
217  high = (value & (~0xF)) >> 4;
218 
219  if (targetLoc == 0)
220  {
221  if (low < 0xF)
222  low++;
223  }
224  else
225  {
226  if (high < 0xF)
227  high++;
228  }
229  value = ((high << 4) | low);
230  GNUNET_assert (fileSlot ==
232  GNUNET_assert (1 == GNUNET_DISK_file_write (fh, &value, 1));
233 }
ssize_t GNUNET_DISK_file_read(const struct GNUNET_DISK_FileHandle *h, void *result, size_t len)
Read the contents of a binary file into a buffer.
Definition: disk.c:881
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
off_t GNUNET_DISK_file_seek(const struct GNUNET_DISK_FileHandle *h, off_t offset, enum GNUNET_DISK_Seek whence)
Move the read/write pointer in a file.
Definition: disk.c:241
int GNUNET_DISK_handle_invalid(const struct GNUNET_DISK_FileHandle *h)
Checks whether a handle is invalid.
Definition: disk.c:191
static char * value
Value of the record to add/remove.
ssize_t GNUNET_DISK_file_write(const struct GNUNET_DISK_FileHandle *h, const void *buffer, size_t n)
Write a buffer to a file.
Definition: disk.c:1049
static void setBit(char *bitArray, unsigned int bitIdx)
Sets a bit active in the bitArray.
Seek an absolute position (from the start of the file).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decrementBit()

static void decrementBit ( char *  bitArray,
unsigned int  bitIdx,
const struct GNUNET_DISK_FileHandle fh 
)
static

Clears a bit from bitArray if the respective usage counter on the disk hits/is zero.

Parameters
bitArraymemory area to set the bit in
bitIdxwhich bit to test
fhA file to keep the 4bit address usage counters in

Definition at line 244 of file container_bloomfilter.c.

References clearBit(), GNUNET_assert, GNUNET_DISK_file_read(), GNUNET_DISK_file_seek(), GNUNET_DISK_file_write(), GNUNET_DISK_handle_invalid(), GNUNET_DISK_SEEK_SET, GNUNET_ERROR_TYPE_ERROR, GNUNET_log_strerror, GNUNET_SYSERR, and value.

Referenced by decrementBitCallback().

246 {
247  off_t fileslot;
248  unsigned char value;
249  unsigned int high;
250  unsigned int low;
251  unsigned int targetLoc;
252 
254  return; /* cannot decrement! */
255  /* Each char slot in the counter file holds two 4 bit counters */
256  fileslot = bitIdx / 2;
257  targetLoc = bitIdx % 2;
259  {
261  return;
262  }
263  if (1 != GNUNET_DISK_file_read (fh, &value, 1))
264  value = 0;
265  low = value & 0xF;
266  high = (value & 0xF0) >> 4;
267 
268  /* decrement, but once we have reached the max, never go back! */
269  if (targetLoc == 0)
270  {
271  if ((low > 0) && (low < 0xF))
272  low--;
273  if (low == 0)
274  {
275  clearBit (bitArray, bitIdx);
276  }
277  }
278  else
279  {
280  if ((high > 0) && (high < 0xF))
281  high--;
282  if (high == 0)
283  {
284  clearBit (bitArray, bitIdx);
285  }
286  }
287  value = ((high << 4) | low);
289  {
291  return;
292  }
293  GNUNET_assert (1 == GNUNET_DISK_file_write (fh, &value, 1));
294 }
ssize_t GNUNET_DISK_file_read(const struct GNUNET_DISK_FileHandle *h, void *result, size_t len)
Read the contents of a binary file into a buffer.
Definition: disk.c:881
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
off_t GNUNET_DISK_file_seek(const struct GNUNET_DISK_FileHandle *h, off_t offset, enum GNUNET_DISK_Seek whence)
Move the read/write pointer in a file.
Definition: disk.c:241
int GNUNET_DISK_handle_invalid(const struct GNUNET_DISK_FileHandle *h)
Checks whether a handle is invalid.
Definition: disk.c:191
#define GNUNET_log_strerror(level, cmd)
Log an error message at log-level &#39;level&#39; that indicates a failure of the command &#39;cmd&#39; with the mess...
static void clearBit(char *bitArray, unsigned int bitIdx)
Clears a bit from bitArray.
static char * value
Value of the record to add/remove.
ssize_t GNUNET_DISK_file_write(const struct GNUNET_DISK_FileHandle *h, const void *buffer, size_t n)
Write a buffer to a file.
Definition: disk.c:1049
#define GNUNET_SYSERR
Definition: gnunet_common.h:79
Seek an absolute position (from the start of the file).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_empty_file()

static int make_empty_file ( const struct GNUNET_DISK_FileHandle fh,
size_t  size 
)
static

Creates a file filled with zeroes.

Parameters
fhthe file handle
sizethe size of the file
Returns
GNUNET_OK if created ok, GNUNET_SYSERR otherwise

Definition at line 306 of file container_bloomfilter.c.

References BUFFSIZE, GNUNET_DISK_file_seek(), GNUNET_DISK_file_write(), GNUNET_DISK_handle_invalid(), GNUNET_DISK_SEEK_SET, GNUNET_OK, GNUNET_SYSERR, res, and size.

Referenced by GNUNET_CONTAINER_bloomfilter_clear(), GNUNET_CONTAINER_bloomfilter_load(), and GNUNET_CONTAINER_bloomfilter_resize().

307 {
308  char buffer[BUFFSIZE];
309  size_t bytesleft = size;
310  int res = 0;
311 
313  return GNUNET_SYSERR;
314  memset (buffer, 0, sizeof (buffer));
316  while (bytesleft > 0)
317  {
318  if (bytesleft > sizeof (buffer))
319  {
320  res = GNUNET_DISK_file_write (fh, buffer, sizeof (buffer));
321  if (res >= 0)
322  bytesleft -= res;
323  }
324  else
325  {
326  res = GNUNET_DISK_file_write (fh, buffer, bytesleft);
327  if (res >= 0)
328  bytesleft -= res;
329  }
330  if (GNUNET_SYSERR == res)
331  return GNUNET_SYSERR;
332  }
333  return GNUNET_OK;
334 }
#define GNUNET_OK
Named constants for return values.
Definition: gnunet_common.h:78
off_t GNUNET_DISK_file_seek(const struct GNUNET_DISK_FileHandle *h, off_t offset, enum GNUNET_DISK_Seek whence)
Move the read/write pointer in a file.
Definition: disk.c:241
int GNUNET_DISK_handle_invalid(const struct GNUNET_DISK_FileHandle *h)
Checks whether a handle is invalid.
Definition: disk.c:191
ssize_t GNUNET_DISK_file_write(const struct GNUNET_DISK_FileHandle *h, const void *buffer, size_t n)
Write a buffer to a file.
Definition: disk.c:1049
static int res
#define GNUNET_SYSERR
Definition: gnunet_common.h:79
static unsigned int size
Size of the "table".
Definition: peer.c:67
Seek an absolute position (from the start of the file).
#define BUFFSIZE
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iterateBits()

static void iterateBits ( const struct GNUNET_CONTAINER_BloomFilter bf,
BitIterator  callback,
void *  arg,
const struct GNUNET_HashCode key 
)
static

Call an iterator for each bit that the bloomfilter must test or set for this element.

Parameters
bfthe filter
callbackthe method to call
argextra argument to callback
keythe key for which we iterate over the BF bits

Definition at line 363 of file container_bloomfilter.c.

References GNUNET_CONTAINER_BloomFilter::addressesPerElement, GNUNET_CONTAINER_BloomFilter::bitArraySize, GNUNET_assert, GNUNET_CRYPTO_hash(), GNUNET_YES, and key.

Referenced by GNUNET_CONTAINER_bloomfilter_add(), GNUNET_CONTAINER_bloomfilter_remove(), and GNUNET_CONTAINER_bloomfilter_test().

365 {
366  struct GNUNET_HashCode tmp[2];
367  int bitCount;
368  unsigned int round;
369  unsigned int slot = 0;
370 
371  bitCount = bf->addressesPerElement;
372  tmp[0] = *key;
373  round = 0;
374  GNUNET_assert (bf->bitArraySize > 0);
375  GNUNET_assert (bf->bitArraySize * 8LL > bf->bitArraySize);
376  while (bitCount > 0)
377  {
378  while (slot < (sizeof (struct GNUNET_HashCode) / sizeof (uint32_t)))
379  {
380  if (GNUNET_YES !=
381  callback (arg, bf,
382  ntohl ((((uint32_t *) & tmp[round & 1])[slot])) %
383  ((bf->bitArraySize * 8LL))))
384  return;
385  slot++;
386  bitCount--;
387  if (bitCount == 0)
388  break;
389  }
390  if (bitCount > 0)
391  {
392  GNUNET_CRYPTO_hash (&tmp[round & 1], sizeof (struct GNUNET_HashCode),
393  &tmp[(round + 1) & 1]);
394  round++;
395  slot = 0;
396  }
397  }
398 }
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
unsigned int addressesPerElement
How many bits we set for each stored element.
void GNUNET_CRYPTO_hash(const void *block, size_t size, struct GNUNET_HashCode *ret)
Compute hash of a given block.
Definition: crypto_hash.c:44
size_t bitArraySize
Size of bitArray in bytes.
A 512-bit hashcode.
struct GNUNET_HashCode key
The key used in the DHT.
#define GNUNET_YES
Definition: gnunet_common.h:80
Here is the call graph for this function:
Here is the caller graph for this function:

◆ incrementBitCallback()

static int incrementBitCallback ( void *  cls,
const struct GNUNET_CONTAINER_BloomFilter bf,
unsigned int  bit 
)
static

Callback: increment bit.

Parameters
clspointer to writeable form of bf
bfthe filter to manipulate
bitthe bit to increment
Returns
GNUNET_YES

Definition at line 410 of file container_bloomfilter.c.

References GNUNET_CONTAINER_BloomFilter::bitArray, GNUNET_CONTAINER_BloomFilter::fh, GNUNET_YES, and incrementBit().

Referenced by GNUNET_CONTAINER_bloomfilter_add().

412 {
413  struct GNUNET_CONTAINER_BloomFilter *b = cls;
414 
415  incrementBit (b->bitArray, bit, bf->fh);
416  return GNUNET_YES;
417 }
char * bitArray
The actual bloomfilter bit array.
struct GNUNET_DISK_FileHandle * fh
The bit counter file on disk.
static void incrementBit(char *bitArray, unsigned int bitIdx, const struct GNUNET_DISK_FileHandle *fh)
Sets a bit active in the bitArray and increments bit-specific usage counter on disk (but only if the ...
#define GNUNET_YES
Definition: gnunet_common.h:80
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decrementBitCallback()

static int decrementBitCallback ( void *  cls,
const struct GNUNET_CONTAINER_BloomFilter bf,
unsigned int  bit 
)
static

Callback: decrement bit.

Parameters
clspointer to writeable form of bf
bfthe filter to manipulate
bitthe bit to decrement
Returns
GNUNET_YES

Definition at line 429 of file container_bloomfilter.c.

References GNUNET_CONTAINER_BloomFilter::bitArray, decrementBit(), GNUNET_CONTAINER_BloomFilter::fh, and GNUNET_YES.

Referenced by GNUNET_CONTAINER_bloomfilter_remove().

431 {
432  struct GNUNET_CONTAINER_BloomFilter *b = cls;
433 
434  decrementBit (b->bitArray, bit, bf->fh);
435  return GNUNET_YES;
436 }
static void decrementBit(char *bitArray, unsigned int bitIdx, const struct GNUNET_DISK_FileHandle *fh)
Clears a bit from bitArray if the respective usage counter on the disk hits/is zero.
char * bitArray
The actual bloomfilter bit array.
struct GNUNET_DISK_FileHandle * fh
The bit counter file on disk.
#define GNUNET_YES
Definition: gnunet_common.h:80
Here is the call graph for this function:
Here is the caller graph for this function:

◆ testBitCallback()

static int testBitCallback ( void *  cls,
const struct GNUNET_CONTAINER_BloomFilter bf,
unsigned int  bit 
)
static

Callback: test if all bits are set.

Parameters
clspointer set to GNUNET_NO if bit is not set
bfthe filter
bitthe bit to test
Returns
YES if the bit is set, NO if not

Definition at line 448 of file container_bloomfilter.c.

References find_typedefs::arg, GNUNET_CONTAINER_BloomFilter::bitArray, GNUNET_NO, GNUNET_YES, and testBit().

Referenced by GNUNET_CONTAINER_bloomfilter_test().

450 {
451  int *arg = cls;
452 
453  if (GNUNET_NO == testBit (bf->bitArray, bit))
454  {
455  *arg = GNUNET_NO;
456  return GNUNET_NO;
457  }
458  return GNUNET_YES;
459 }
#define GNUNET_NO
Definition: gnunet_common.h:81
char * bitArray
The actual bloomfilter bit array.
static int testBit(char *bitArray, unsigned int bitIdx)
Checks if a bit is active in the bitArray.
#define GNUNET_YES
Definition: gnunet_common.h:80
Here is the call graph for this function:
Here is the caller graph for this function: