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. More... | |
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. More... | |
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. More... | |
struct auth_transfer * | task_transfer |
Task for transfer. More... | |
int | notify_received |
a notify was received, but a zone transfer or probe was already acted on. More... | |
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. More... | |
int | zone_expired |
is the zone currently considered expired? after expiry also older serial numbers are allowed (not just newer) | |
int | have_zone |
do we have a zone (if 0, no zone data at all) | |
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). More... | |
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.
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.
Referenced by auth_xfer_delete(), auth_xfer_new(), auth_xfer_pickup_initial(), 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_timer_callback(), auth_zones_cfg(), auth_zones_cleanup(), auth_zones_find_or_add_xfer(), auth_zones_notify(), auth_zones_setup_zones(), auth_zones_startprobesequence(), do_auth_zone_reload(), 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_lookup_host(), xfr_transfer_nexttarget_or_end(), and xfr_write_after_update().
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_zones_startprobesequence(), xfr_create_soa_probe_packet(), xfr_probe_lookup_host(), xfr_process_reacquire_locks(), xfr_transfer_lookup_host(), and xfr_write_after_update().
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_new(), auth_xfer_probe_timer_callback(), auth_xfer_probe_udp_callback(), auth_zones_cleanup(), 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(), 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_new(), auth_xfer_probe_udp_callback(), auth_xfer_transfer_http_callback(), auth_xfer_transfer_timer_callback(), auth_zone_write_chunks(), auth_zones_cleanup(), chunk_rrlist_start(), 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_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(), xfr_transfer_start_lookups(), and xfr_write_after_update().
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().
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(), az_xfr_allowed_notify(), and probe_copy_masters_for_allow_notify().
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(), auth_xfer_timer(), do_auth_zone_reload(), xfr_probe_send_or_end(), xfr_process_chunk_list(), and xfr_set_timeout().