|
| HASH_FUNCTIONS (ia, unsigned char *, struct ia_xx, ia_hash_t, ia_reference, ia_dereference, do_string_hash) |
|
isc_result_t | iasubopt_reference (struct iasubopt **iasubopt, struct iasubopt *src, const char *file, int line) |
|
isc_result_t | iasubopt_dereference (struct iasubopt **iasubopt, const char *file, int line) |
|
isc_result_t | ia_make_key (struct data_string *key, u_int32_t iaid, const char *duid, unsigned int duid_len, const char *file, int line) |
|
isc_result_t | ia_allocate (struct ia_xx **ia, u_int32_t iaid, const char *duid, unsigned int duid_len, const char *file, int line) |
|
isc_result_t | ia_reference (struct ia_xx **ia, struct ia_xx *src, const char *file, int line) |
|
isc_result_t | ia_dereference (struct ia_xx **ia, const char *file, int line) |
|
isc_result_t | ia_add_iasubopt (struct ia_xx *ia, struct iasubopt *iasubopt, const char *file, int line) |
|
void | ia_remove_iasubopt (struct ia_xx *ia, struct iasubopt *iasubopt, const char *file, int line) |
|
void | ia_remove_all_lease (struct ia_xx *ia, const char *file, int line) |
|
isc_boolean_t | ia_equal (const struct ia_xx *a, const struct ia_xx *b) |
|
isc_result_t | ipv6_pool_allocate (struct ipv6_pool **pool, u_int16_t type, const struct in6_addr *start_addr, int bits, int units, const char *file, int line) |
| Create a new IPv6 lease pool structure.
|
|
isc_result_t | ipv6_pool_reference (struct ipv6_pool **pool, struct ipv6_pool *src, const char *file, int line) |
| reference an IPv6 pool structure.
|
|
isc_result_t | ipv6_pool_dereference (struct ipv6_pool **pool, const char *file, int line) |
| de-reference an IPv6 pool structure.
|
|
isc_result_t | create_lease6 (struct ipv6_pool *pool, struct iasubopt **addr, unsigned int *attempts, const struct data_string *uid, time_t soft_lifetime_end_time) |
|
isc_result_t | cleanup_lease6 (ia_hash_t *ia_table, struct ipv6_pool *pool, struct iasubopt *lease, struct ia_xx *ia) |
| Cleans up leases when reading from a lease file.
|
|
isc_result_t | add_lease6 (struct ipv6_pool *pool, struct iasubopt *lease, time_t valid_lifetime_end_time) |
|
isc_boolean_t | lease6_exists (const struct ipv6_pool *pool, const struct in6_addr *addr) |
|
isc_boolean_t | lease6_usable (struct iasubopt *lease) |
| Check if address is available to a lease.
|
|
isc_result_t | renew_lease6 (struct ipv6_pool *pool, struct iasubopt *lease) |
| Renew a lease in the pool.
|
|
isc_result_t | expire_lease6 (struct iasubopt **leasep, struct ipv6_pool *pool, time_t now) |
|
isc_result_t | decline_lease6 (struct ipv6_pool *pool, struct iasubopt *lease) |
|
isc_result_t | release_lease6 (struct ipv6_pool *pool, struct iasubopt *lease) |
|
void | build_prefix6 (struct in6_addr *pref, const struct in6_addr *net_start_pref, int pool_bits, int pref_bits, const struct data_string *input) |
|
isc_result_t | create_prefix6 (struct ipv6_pool *pool, struct iasubopt **pref, unsigned int *attempts, const struct data_string *uid, time_t soft_lifetime_end_time) |
|
isc_boolean_t | prefix6_exists (const struct ipv6_pool *pool, const struct in6_addr *pref, u_int8_t plen) |
|
isc_result_t | mark_lease_unavailable (struct ipv6_pool *pool, const struct in6_addr *addr) |
|
isc_result_t | add_ipv6_pool (struct ipv6_pool *pool) |
|
void | schedule_lease_timeout (struct ipv6_pool *pool) |
|
void | schedule_all_ipv6_lease_timeouts (void) |
|
isc_boolean_t | ipv6_in_pool (const struct in6_addr *addr, const struct ipv6_pool *pool) |
|
isc_result_t | find_ipv6_pool (struct ipv6_pool **pool, u_int16_t type, const struct in6_addr *addr) |
|
isc_result_t | renew_leases (struct ia_xx *ia) |
|
isc_result_t | release_leases (struct ia_xx *ia) |
|
isc_result_t | decline_leases (struct ia_xx *ia) |
|
void | mark_hosts_unavailable (void) |
|
void | mark_phosts_unavailable (void) |
|
void | mark_interfaces_unavailable (void) |
|
isc_result_t | ipv6_pond_allocate (struct ipv6_pond **pond, const char *file, int line) |
| Create a new IPv6 pond structure.
|
|
isc_result_t | ipv6_pond_reference (struct ipv6_pond **pond, struct ipv6_pond *src, const char *file, int line) |
| reference an IPv6 pond structure.
|
|
isc_result_t | ipv6_pond_dereference (struct ipv6_pond **pond, const char *file, int line) |
| de-reference an IPv6 pond structure.
|
|
void | report_jumbo_ranges () |
|
int | htype_bounds_check (uint16_t htype) |
|
int | find_hosts_by_haddr6 (struct host_decl **hp, struct packet *packet, struct option_state *opt_state, const char *file, int line) |
| Look for hosts by MAC address if it's available.
|
|
int | find_hosts_by_duid_chaddr (struct host_decl **host, const struct data_string *client_id) |
|
int | find_hosts6 (struct host_decl **host, struct packet *packet, const struct data_string *client_id, char *file, int line) |
|
- Todo
assert()
simplify functions, as pool is now in iaaddr
Definition in file mdb6.c.
Cleans up leases when reading from a lease file.
This function is only expected to be run when reading leases in from a file. It checks to see if a lease already exists for the new leases's address. We don't add expired leases to the structures when reading a lease file which limits what can happen. We have two variables the owners of the leases being the same or different and the new lease being active or non-active: Owners active same no remove old lease and its connections same yes nothing to do, other code will update the structures. diff no nothing to do diff yes this combination shouldn't happen, we should only have a single active lease per address at a time and that lease should move to non-active before any other lease can become active for that address. Currently we delete the previous lease and pass an error to the caller who should log an error.
When we remove a lease we remove it from the hash table and active heap (remember only active leases are in the structures at this time) for the pool, and from the IA's array. If, after we've removed the pointer from IA's array to the lease, the IA has no more pointers we remove it from the appropriate hash table as well.
- Parameters
-
[in] | ia_table | = the hash table for the IA |
[in] | pool | = the pool to update |
[in] | lease | = the new lease we want to add |
[in] | ia | = the new ia we are building |
- Returns
- ISC_R_SUCCESS = the incoming lease and any previous lease were in an expected state - one of the first 3 options above. If necessary the old lease was removed. ISC_R_FAILURE = there is already an active lease for the address in the incoming lease. This shouldn't happen if it does flag an error for the caller to log.
Definition at line 1306 of file mdb6.c.
Look for hosts by MAC address if it's available.
Checks the inbound packet against host declarations which specified:
"hardware ethernet <MAC>;"
For directly connected clients, the function will use the MAC address contained in packet:haddr if it's populated. \TODO - While the logic is in place for this search, the socket layer does not yet populate packet:haddr, this is to be done under rt41523.
For relayed clients, the function will use the MAC address from the client-linklayer-address option if it has been supplied by the relay directly connected to the client.
- Parameters
-
hp[out] | - pointer to storage for the host delcaration if found |
packet | - received packet |
opt_state | - option state to search |
file | - source file |
line | - line number |
- Returns
- non-zero if a matching host was found, zero otherwise
Definition at line 2868 of file mdb6.c.