Tor
0.4.7.0-alpha-dev
|
Types to handle sets of addresses. More...
Go to the source code of this file.
Macros | |
#define | address_set_free(set) bloomfilt_free(set) |
Functions | |
address_set_t * | address_set_new (int max_addresses_guess) |
void | address_set_add (address_set_t *set, const struct tor_addr_t *addr) |
void | address_set_add_ipv4h (address_set_t *set, uint32_t addr) |
int | address_set_probably_contains (const address_set_t *set, const struct tor_addr_t *addr) |
Types to handle sets of addresses.
Definition in file address_set.h.
void address_set_add | ( | address_set_t * | set, |
const struct tor_addr_t * | addr | ||
) |
Add addr to set.
All future queries for addr in set will return true. Removing items is not possible.
Definition at line 47 of file address_set.c.
Referenced by address_set_add_ipv4h().
void address_set_add_ipv4h | ( | address_set_t * | set, |
uint32_t | addr | ||
) |
As address_set_add(), but take an ipv4 address in host order.
Definition at line 54 of file address_set.c.
address_set_t* address_set_new | ( | int | max_addresses_guess | ) |
Allocate and return an address_set, suitable for holding up to max_address_guess distinct values.
Definition at line 33 of file address_set.c.
int address_set_probably_contains | ( | const address_set_t * | set, |
const struct tor_addr_t * | addr | ||
) |
Return true if addr is a member of set. (And probably, return false if addr is not a member of set.)
Definition at line 66 of file address_set.c.