|
void | ibf_write_slice (const struct InvertibleBloomFilter *ibf, uint32_t start, uint32_t count, void *buf) |
| Write buckets from an ibf to a buffer. More...
|
|
void | ibf_read_slice (const void *buf, uint32_t start, uint32_t count, struct InvertibleBloomFilter *ibf) |
| Read buckets from a buffer into an ibf. More...
|
|
struct IBF_Key | ibf_key_from_hashcode (const struct GNUNET_HashCode *hash) |
| Create a key from a hashcode. More...
|
|
void | ibf_hashcode_from_key (struct IBF_Key key, struct GNUNET_HashCode *dst) |
| Create a hashcode from a key, by replicating the key until the hascode is filled. More...
|
|
struct InvertibleBloomFilter * | ibf_create (uint32_t size, uint8_t hash_num) |
| Create an invertible bloom filter. More...
|
|
void | ibf_insert (struct InvertibleBloomFilter *ibf, struct IBF_Key key) |
| Insert a key into an IBF. More...
|
|
void | ibf_remove (struct InvertibleBloomFilter *ibf, struct IBF_Key key) |
| Remove a key from an IBF. More...
|
|
void | ibf_subtract (struct InvertibleBloomFilter *ibf1, const struct InvertibleBloomFilter *ibf2) |
| Subtract ibf2 from ibf1, storing the result in ibf1. More...
|
|
int | ibf_decode (struct InvertibleBloomFilter *ibf, int *ret_side, struct IBF_Key *ret_id) |
| Decode and remove an element from the IBF, if possible. More...
|
|
struct InvertibleBloomFilter * | ibf_dup (const struct InvertibleBloomFilter *ibf) |
| Create a copy of an IBF, the copy has to be destroyed properly. More...
|
|
void | ibf_destroy (struct InvertibleBloomFilter *ibf) |
| Destroy all resources associated with the invertible bloom filter. More...
|
|
invertible bloom filter
- Author
- Florian Dold
-
Florian Dold
-
Elias Summermatter
Definition in file ibf.h.
void ibf_write_slice |
( |
const struct InvertibleBloomFilter * |
ibf, |
|
|
uint32_t |
start, |
|
|
uint32_t |
count, |
|
|
void * |
buf |
|
) |
| |
Write buckets from an ibf to a buffer.
Exactly (IBF_BUCKET_SIZE*ibf->size) bytes are written to buf.
- Parameters
-
ibf | the ibf to write |
start | with which bucket to start |
count | how many buckets to write |
buf | buffer to write the data to |
Definition at line 291 of file ibf.c.
307 *
sizeof *key_hash_dst);
308 key_hash_dst += count;
310 count_dst = (
struct IBF_Count *) key_hash_dst;
static int start
Set if we are to start default services (including ARM).
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
static unsigned int size
Size of the "table".
struct IBF_KeyHash * key_hash_sum
Xor sums of the hashes of the keys of inserted elements.
struct IBF_Count * count
How many times has a bucket been hit? Can be negative, as a result of IBF subtraction.
struct IBF_Key * key_sum
Xor sums of the elements' keys, used to identify the elements.
References buf, InvertibleBloomFilter::count, GNUNET_assert, GNUNET_memcpy, InvertibleBloomFilter::key_hash_sum, InvertibleBloomFilter::key_sum, size, and start.
Referenced by send_ibf(), and strata_estimator_write().
void ibf_read_slice |
( |
const void * |
buf, |
|
|
uint32_t |
start, |
|
|
uint32_t |
count, |
|
|
struct InvertibleBloomFilter * |
ibf |
|
) |
| |