|
unbound 0.1
|
Authoritative zone transfer structure. More...
#include <authzone.h>
Data Fields | |
| rbnode_type | node |
| rbtree node, key is name and class | |
| lock_basic_type | lock |
| lock on this structure, and on the workernum elements of the tasks. | |
| uint8_t * | name |
| zone name, in uncompressed wireformat | |
| size_t | namelen |
| length of zone name | |
| int | namelabs |
| number of labels in zone name | |
| uint16_t | dclass |
| the class of this zone, in host byteorder. | |
| struct auth_nextprobe * | task_nextprobe |
| task to wait for next-probe-timeout, once timeouted, see if a SOA probe is needed, or already in progress | |
| struct auth_probe * | task_probe |
| task for SOA probe. | |
| struct auth_transfer * | task_transfer |
| Task for transfer. | |
| int | notify_received |
| a notify was received, but a zone transfer or probe was already acted on. | |
| int | notify_has_serial |
| true if the notify_received has a serial number | |
| uint32_t | notify_serial |
| serial number of the notify | |
| struct auth_master * | allow_notify_list |
| the list of masters for checking notifies. | |
| int | zone_expired |
| is the zone currently considered expired? | |
| int | have_zone |
| do we have a zone (if 0, no zone data at all) | |
| time_t | soa_zone_acquired |
| the time when zone was transferred from upstream | |
| uint32_t | serial |
| current serial (from SOA), if we have no zone, 0 | |
| time_t | retry |
| retry time (from SOA), time to wait with next_probe if no master responds | |
| time_t | refresh |
| refresh time (from SOA), time to wait with next_probe if everything is fine | |
| time_t | expiry |
| expiry time (from SOA), time until zone data is not considered valid any more, if no master responds within this time, either with the current zone or a new zone. | |
| time_t | lease_time |
| zone lease start time (start+expiry is expiration time). | |
| size_t | max_transfer_size |
| The maximum auth zone transfer size, in bytes. | |
| int | max_transfer_time |
| The maximum auth zone transfer time taken, in msec. | |
| int | is_rpz |
| the zone is an rpz zone | |
| int | num_ixfrs |
| the number of IXFRs since the last full transfer. | |
Authoritative zone transfer structure.
Create and destroy needs the auth_zones* biglock. The structure consists of different tasks. Each can be unowned (-1) or owner by a worker (worker-num). A worker can pick up a task and then do it. This means the events (timeouts, sockets) are for that worker.
(move this to tasks). They don't have locks themselves, the worker (that owns it) uses it, also as part of callbacks, hence it has separate zonename pointers for lookup in the main zonetree. If the zone has no transfers, this structure is not created.
| rbnode_type auth_xfer::node |
rbtree node, key is name and class
Referenced by auth_xfer_create(), auth_xfer_find(), auth_xfer_new(), az_delete_deleted_zones(), and fr_worker_auth_del().
| lock_basic_type auth_xfer::lock |
lock on this structure, and on the workernum elements of the tasks.
First hold the tree-lock in auth_zones, find the auth_xfer, lock this lock. Then a worker can reassign itself to fill up one of the tasks. Once it has the task assigned to it, the worker can access the other elements of the task structure without a lock, because that is necessary for the eventloop and callbacks from that. The auth_zone->lock is locked before this lock.
Referenced by auth_xfer_delete(), auth_xfer_new(), auth_xfer_pickup_initial(), auth_xfer_probe_lookup_callback(), auth_xfer_probe_timer_callback(), auth_xfer_probe_udp_callback(), auth_xfer_set_expired(), auth_xfer_timer(), auth_xfer_transfer_http_callback(), auth_xfer_transfer_lookup_callback(), auth_xfer_transfer_tcp_callback(), auth_xfer_transfer_timer_callback(), auth_zones_cfg(), auth_zones_check_changes(), auth_zones_cleanup(), auth_zones_find_or_add_xfer(), auth_zones_notify(), auth_zones_setup_zones(), auth_zones_startprobesequence(), az_xtree_get_mem(), do_auth_zone_reload(), fr_worker_auth_add(), fr_worker_auth_cha(), fr_worker_auth_del(), process_list_end_transfer(), xfr_probe_lookup_host(), xfr_probe_send_or_end(), xfr_process_chunk_list(), xfr_process_notify(), xfr_process_reacquire_locks(), xfr_transfer_init_fetch(), xfr_transfer_lookup_host(), xfr_transfer_nexttarget_or_end(), and xfr_write_after_update().
| uint8_t* auth_xfer::name |
zone name, in uncompressed wireformat
Referenced by apply_http(), auth_xfer_cmp(), auth_xfer_delete(), auth_xfer_find(), auth_xfer_new(), auth_xfer_probe_lookup_callback(), auth_xfer_probe_timer_callback(), auth_xfer_probe_udp_callback(), auth_xfer_set_expired(), auth_xfer_transfer_http_callback(), auth_xfer_transfer_lookup_callback(), auth_xfer_transfer_tcp_callback(), check_packet_ok(), check_xfer_packet(), http_zonefile_syntax_check(), xfr_create_ixfr_packet(), xfr_create_soa_probe_packet(), xfr_probe_lookup_host(), xfr_probe_send_or_end(), xfr_probe_send_probe(), xfr_process_chunk_list(), xfr_process_reacquire_locks(), xfr_set_timeout(), xfr_transfer_init_fetch(), xfr_transfer_lookup_host(), xfr_transfer_nexttarget_or_end(), and xfr_write_after_update().
| size_t auth_xfer::namelen |
length of zone name
Referenced by apply_http(), auth_xfer_find(), auth_xfer_get_mem(), auth_xfer_new(), auth_xfer_set_expired(), auth_xfr_pickup_config(), check_packet_ok(), http_zonefile_syntax_check(), xfr_create_ixfr_packet(), xfr_create_soa_probe_packet(), xfr_process_reacquire_locks(), and xfr_write_after_update().
| int auth_xfer::namelabs |
number of labels in zone name
Referenced by auth_xfer_cmp(), auth_xfer_find(), auth_xfer_new(), and auth_xfr_pickup_config().
| uint16_t auth_xfer::dclass |
the class of this zone, in host byteorder.
uses 'dclass' to not conflict with c++ keyword class.
Referenced by auth_xfer_cmp(), auth_xfer_find(), auth_xfer_new(), auth_xfer_set_expired(), auth_xfr_pickup_config(), auth_zones_startprobesequence(), check_packet_ok(), check_xfer_packet(), http_zonefile_syntax_check(), xfr_create_ixfr_packet(), xfr_create_soa_probe_packet(), xfr_probe_disown(), xfr_probe_lookup_host(), xfr_process_reacquire_locks(), xfr_transfer_disown(), xfr_transfer_lookup_host(), and xfr_write_after_update().
| struct auth_nextprobe* auth_xfer::task_nextprobe |
task to wait for next-probe-timeout, once timeouted, see if a SOA probe is needed, or already in progress
Referenced by auth_xfer_delete(), auth_xfer_get_mem(), auth_xfer_new(), auth_xfer_pickup_initial_zone(), auth_xfer_timer(), auth_zones_cleanup(), fr_worker_auth_del(), process_list_end_transfer(), xfr_disown_tasks(), xfr_nextprobe_disown(), xfr_probe_send_or_end(), xfr_set_timeout(), and xfr_transfer_nexttarget_or_end().
| struct auth_probe* auth_xfer::task_probe |
task for SOA probe.
Check if the zone can be updated
Referenced by auth_xfer_delete(), auth_xfer_get_mem(), auth_xfer_new(), auth_xfer_probe_lookup_callback(), auth_xfer_probe_timer_callback(), auth_xfer_probe_udp_callback(), auth_xfr_pickup_config(), auth_zones_cfg(), auth_zones_cleanup(), check_packet_ok(), fr_worker_auth_add(), fr_worker_auth_del(), probe_copy_masters_for_allow_notify(), xfr_disown_tasks(), xfr_masters_equal(), xfr_probe_current_master(), xfr_probe_disown(), xfr_probe_end_of_list(), xfr_probe_lookup_host(), xfr_probe_move_to_next_lookup(), xfr_probe_nextmaster(), xfr_probe_send_or_end(), xfr_probe_send_probe(), xfr_probe_start_list(), xfr_probe_start_lookups(), xfr_process_notify(), xfr_set_timeout(), and xfr_start_probe().
| struct auth_transfer* auth_xfer::task_transfer |
Task for transfer.
Transferring and updating the zone. This includes trying (potentially) several upstream masters. Downloading and storing the zone
Referenced by apply_http(), auth_xfer_delete(), auth_xfer_get_mem(), auth_xfer_new(), auth_xfer_probe_udp_callback(), auth_xfer_transfer_http_callback(), auth_xfer_transfer_lookup_callback(), auth_xfer_transfer_tcp_callback(), auth_xfer_transfer_time_taken(), auth_xfer_transfer_timer_callback(), auth_xfr_pickup_config(), auth_zones_cfg(), auth_zones_cleanup(), check_xfer_packet(), chunk_rrlist_start(), fr_worker_auth_del(), http_parse_add_rr(), http_zonefile_syntax_check(), probe_copy_masters_for_allow_notify(), process_list_end_transfer(), xfer_link_data(), xfr_create_ixfr_packet(), xfr_disown_tasks(), xfr_masters_equal(), xfr_probe_send_or_end(), xfr_process_chunk_list(), xfr_start_probe(), xfr_start_transfer(), xfr_transfer_current_master(), xfr_transfer_disown(), xfr_transfer_end_of_list(), xfr_transfer_init_fetch(), xfr_transfer_lookup_host(), xfr_transfer_move_to_next_lookup(), xfr_transfer_nextmaster(), xfr_transfer_nexttarget_or_end(), xfr_transfer_start_list(), and xfr_transfer_start_lookups().
| int auth_xfer::notify_received |
a notify was received, but a zone transfer or probe was already acted on.
However, the zone transfer could signal a newer serial number. The serial number of that notify is saved below. The transfer and probe tasks should check this once done to see if they need to restart the transfer task for the newer notify serial. Hold the lock to access this member (and the serial).
Referenced by auth_xfer_new(), process_list_end_transfer(), and xfr_note_notify_serial().
| int auth_xfer::notify_has_serial |
true if the notify_received has a serial number
Referenced by process_list_end_transfer(), and xfr_note_notify_serial().
| uint32_t auth_xfer::notify_serial |
serial number of the notify
Referenced by auth_xfer_new(), process_list_end_transfer(), and xfr_note_notify_serial().
| struct auth_master* auth_xfer::allow_notify_list |
the list of masters for checking notifies.
This list is empty on start, and a copy of the list from the probe_task when it is done looking them up.
Referenced by auth_xfer_delete(), auth_xfer_get_mem(), auth_zones_cfg(), az_xfr_allowed_notify(), and probe_copy_masters_for_allow_notify().
| int auth_xfer::zone_expired |
is the zone currently considered expired?
after expiry also older serial numbers are allowed (not just newer)
Referenced by auth_xfer_new(), auth_xfer_set_expired(), auth_xfer_timer(), do_auth_zone_reload(), xfr_process_chunk_list(), and xfr_serial_means_update().
| int auth_xfer::have_zone |
do we have a zone (if 0, no zone data at all)
Referenced by apply_axfr(), apply_http(), auth_xfer_new(), auth_xfer_pickup_initial_zone(), auth_xfer_timer(), do_auth_zone_reload(), xfr_create_ixfr_packet(), xfr_find_soa(), xfr_probe_send_or_end(), xfr_process_chunk_list(), xfr_serial_means_update(), and xfr_set_timeout().
| time_t auth_xfer::soa_zone_acquired |
the time when zone was transferred from upstream
Referenced by apply_axfr(), apply_http(), auth_xfer_new(), auth_xfer_pickup_initial_zone(), do_auth_zone_reload(), and xfr_process_chunk_list().
| uint32_t auth_xfer::serial |
current serial (from SOA), if we have no zone, 0
Referenced by apply_axfr(), apply_http(), apply_ixfr(), auth_xfer_new(), fr_worker_auth_add(), xfr_create_ixfr_packet(), xfr_find_soa(), xfr_process_chunk_list(), and xfr_serial_means_update().
| time_t auth_xfer::retry |
retry time (from SOA), time to wait with next_probe if no master responds
Referenced by auth_xfer_new(), xfr_find_soa(), and xfr_set_timeout().
| time_t auth_xfer::refresh |
refresh time (from SOA), time to wait with next_probe if everything is fine
Referenced by auth_xfer_new(), xfr_find_soa(), and xfr_set_timeout().
| time_t auth_xfer::expiry |
expiry time (from SOA), time until zone data is not considered valid any more, if no master responds within this time, either with the current zone or a new zone.
Referenced by auth_xfer_new(), auth_xfer_timer(), xfr_find_soa(), and xfr_set_timeout().
| time_t auth_xfer::lease_time |
zone lease start time (start+expiry is expiration time).
this is renewed every SOA probe and transfer. On zone load from zonefile it is also set (with probe set soon to check)
Referenced by auth_xfer_new(), auth_xfer_pickup_initial_zone(), auth_xfer_timer(), do_auth_zone_reload(), xfr_probe_send_or_end(), xfr_process_chunk_list(), and xfr_set_timeout().
| size_t auth_xfer::max_transfer_size |
The maximum auth zone transfer size, in bytes.
Referenced by auth_xfer_new(), auth_xfer_transfer_http_callback(), auth_xfer_transfer_tcp_callback(), auth_xfr_pickup_config(), and xfr_config_equal().
| int auth_xfer::max_transfer_time |
The maximum auth zone transfer time taken, in msec.
Referenced by auth_xfer_new(), auth_xfer_transfer_http_callback(), auth_xfer_transfer_tcp_callback(), auth_xfr_pickup_config(), and xfr_config_equal().
| int auth_xfer::is_rpz |
the zone is an rpz zone
Referenced by auth_xfer_setup(), xfr_create_ixfr_packet(), and xfr_process_chunk_list().
| int auth_xfer::num_ixfrs |
the number of IXFRs since the last full transfer.
Referenced by apply_axfr(), apply_http(), apply_ixfr(), do_auth_zone_reload(), and xfr_create_ixfr_packet().