auth_xfer Struct Reference

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_nextprobetask_nextprobe
 task to wait for next-probe-timeout, once timeouted, see if a SOA probe is needed, or already in progress
 
struct auth_probetask_probe
 task for SOA probe. More...
 
struct auth_transfertask_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_masterallow_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...
 

Detailed Description

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.

Field Documentation

◆ lock

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().

◆ dclass

uint16_t auth_xfer::dclass

◆ task_probe

◆ task_transfer

◆ notify_received

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().

◆ allow_notify_list

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().

◆ lease_time

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().


The documentation for this struct was generated from the following file: