dhcpd-pools
3.0
ISC dhcpd lease usage analyser
|
The leases hash functions. More...
Macros | |
#define | HASH_FIND_V6(head, findv6, out) HASH_FIND(hh, head, findv6, 16, out) |
#define | HASH_ADD_V6(head, v6field, add) HASH_ADD(hh, head, v6field, 16, add) |
Functions | |
void | add_lease_init (struct conf_t *state __attribute__((unused)), union ipaddr_t *addr __attribute__((unused)), enum ltype type __attribute__((unused))) |
Add a lease to hash array. More... | |
void | add_lease_v4 (struct conf_t *state, union ipaddr_t *addr, enum ltype type) |
void | add_lease_v6 (struct conf_t *state, union ipaddr_t *addr, enum ltype type) |
struct leases_t * | find_lease_init (struct conf_t *state __attribute__((unused)), union ipaddr_t *addr __attribute__((unused))) |
Find pointer to lease from hash array. More... | |
struct leases_t * | find_lease_v4 (struct conf_t *state, union ipaddr_t *addr) |
struct leases_t * | find_lease_v6 (struct conf_t *state, union ipaddr_t *addr) |
void | delete_lease (struct conf_t *state, struct leases_t *lease) |
Delete a lease from hash array. More... | |
void | delete_all_leases (struct conf_t *state) |
Delete all leases from hash array. More... | |
The leases hash functions.
The hash sorting is key to make analysis happen as quick as possible..
Referenced by add_lease_v6().
#define HASH_FIND_V6 | ( | head, | |
findv6, | |||
out | |||
) | HASH_FIND(hh, head, findv6, 16, out) |
Referenced by find_lease_v6().
void add_lease_init | ( | struct conf_t *state | __attribute__(unused), |
union ipaddr_t *addr | __attribute__(unused), | ||
enum ltype type | __attribute__(unused) | ||
) |
Add a lease to hash array.
addr | Binary IP to be added in leases hash. |
type | Lease state of the IP. |
void delete_all_leases | ( | struct conf_t * | state | ) |
Delete all leases from hash array.
Referenced by clean_up(), and delete_lease().
Delete a lease from hash array.
lease | Pointer to lease hash. |
Referenced by parse_leases().
struct leases_t* find_lease_init | ( | struct conf_t *state | __attribute__(unused), |
union ipaddr_t *addr | __attribute__(unused) | ||
) |
Find pointer to lease from hash array.
addr | Binary IP searched from leases hash. |
Referenced by set_ipv_functions().
Referenced by set_ipv_functions().