|
| 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. More...
|
|
isc_result_t | ipv6_pool_reference (struct ipv6_pool **pool, struct ipv6_pool *src, const char *file, int line) |
| reference an IPv6 pool structure. More...
|
|
isc_result_t | ipv6_pool_dereference (struct ipv6_pool **pool, const char *file, int line) |
| de-reference an IPv6 pool structure. More...
|
|
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. More...
|
|
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. More...
|
|
isc_result_t | renew_lease6 (struct ipv6_pool *pool, struct iasubopt *lease) |
| Renew a lease in the pool. More...
|
|
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. More...
|
|
isc_result_t | ipv6_pond_reference (struct ipv6_pond **pond, struct ipv6_pond *src, const char *file, int line) |
| reference an IPv6 pond structure. More...
|
|
isc_result_t | ipv6_pond_dereference (struct ipv6_pond **pond, const char *file, int line) |
| de-reference an IPv6 pond structure. More...
|
|
- 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 1124 of file mdb6.c.
Renew a lease in the pool.
The hard_lifetime_end_time of the lease should be set to the current expiration time. The soft_lifetime_end_time of the lease should be set to the desired expiration time.
This routine will compare the two and call the correct heap routine to move the lease. If the lease is active and the new expiration time is greater (the normal case) then we call isc_heap_decreased() as a larger time is a lower priority. If the new expiration time is less then we call isc_heap_increased().
If the lease is abandoned then it will be on the active list and we will always call isc_heap_increased() as the previous expiration would have been all 1s (as close as we can get to infinite).
If the lease is moving to active we call that routine which will move it from the inactive list to the active list.
- Parameters
-
pool | = a pool the lease belongs to |
lease | = the lease to be renewed |
- Returns
- result of the renew operation (ISC_R_SUCCESS if successful, ISC_R_NOMEMORY when run out of memory)
Definition at line 1415 of file mdb6.c.