Tor  0.4.3.0-alpha-dev
Macros | Functions
digestset.h File Reference

Types to handle sets of digests, based on bloom filters. More...

#include "orconfig.h"
#include "lib/cc/torint.h"
#include "lib/container/bloomfilt.h"

Go to the source code of this file.

Macros

#define digestset_free(set)   bloomfilt_free(set)
 

Functions

digestset_t * digestset_new (int max_addresses_guess)
 
void digestset_add (digestset_t *set, const char *addr)
 
int digestset_probably_contains (const digestset_t *set, const char *addr)
 

Detailed Description

Types to handle sets of digests, based on bloom filters.

Definition in file digestset.h.

Function Documentation

◆ digestset_add()

void digestset_add ( digestset_t *  set,
const char *  digest 
)

Add digest to set.

All future queries for digest in set will return true. Removing items is not possible.

Definition at line 44 of file digestset.c.

◆ digestset_new()

digestset_t* digestset_new ( int  max_guess)

Allocate and return an digestset, suitable for holding up to max_guess distinct values.

Definition at line 30 of file digestset.c.

◆ digestset_probably_contains()

int digestset_probably_contains ( const digestset_t *  set,
const char *  digest 
)

Return true if digest is a member of set. (And probably, return false if digest is not a member of set.)

Definition at line 54 of file digestset.c.