Electroneum
auth_xfer Struct Reference

#include <authzone.h>

Collaboration diagram for auth_xfer:

Public Attributes

rbnode_type node
 
lock_basic_type lock
 
uint8_tname
 
size_t namelen
 
int namelabs
 
uint16_t dclass
 
struct auth_nextprobetask_nextprobe
 
struct auth_probetask_probe
 
struct auth_transfertask_transfer
 
int notify_received
 
int notify_has_serial
 
uint32_t notify_serial
 
struct auth_masterallow_notify_list
 
int zone_expired
 
int have_zone
 
uint32_t serial
 
time_t retry
 
time_t refresh
 
time_t expiry
 
time_t lease_time
 

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.

Definition at line 180 of file authzone.h.

Member Data Documentation

◆ 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.

Definition at line 232 of file authzone.h.

◆ dclass

uint16_t auth_xfer::dclass

the class of this zone, in host byteorder. uses 'dclass' to not conflict with c++ keyword class.

Definition at line 201 of file authzone.h.

◆ expiry

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.

Definition at line 253 of file authzone.h.

◆ have_zone

int auth_xfer::have_zone

do we have a zone (if 0, no zone data at all)

Definition at line 240 of file authzone.h.

◆ 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)

Definition at line 258 of file authzone.h.

◆ 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.

Definition at line 191 of file authzone.h.

◆ name

uint8_t* auth_xfer::name

zone name, in uncompressed wireformat

Definition at line 194 of file authzone.h.

◆ namelabs

int auth_xfer::namelabs

number of labels in zone name

Definition at line 198 of file authzone.h.

◆ namelen

size_t auth_xfer::namelen

length of zone name

Definition at line 196 of file authzone.h.

◆ node

rbnode_type auth_xfer::node

rbtree node, key is name and class

Definition at line 182 of file authzone.h.

◆ notify_has_serial

int auth_xfer::notify_has_serial

true if the notify_received has a serial number

Definition at line 226 of file authzone.h.

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

Definition at line 224 of file authzone.h.

◆ notify_serial

uint32_t auth_xfer::notify_serial

serial number of the notify

Definition at line 228 of file authzone.h.

◆ refresh

time_t auth_xfer::refresh

refresh time (from SOA), time to wait with next_probe if everything is fine

Definition at line 249 of file authzone.h.

◆ retry

time_t auth_xfer::retry

retry time (from SOA), time to wait with next_probe if no master responds

Definition at line 246 of file authzone.h.

◆ serial

uint32_t auth_xfer::serial

current serial (from SOA), if we have no zone, 0

Definition at line 243 of file authzone.h.

◆ task_nextprobe

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

Definition at line 206 of file authzone.h.

◆ task_probe

struct auth_probe* auth_xfer::task_probe

task for SOA probe. Check if the zone can be updated

Definition at line 209 of file authzone.h.

◆ task_transfer

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

Definition at line 214 of file authzone.h.

◆ zone_expired

int auth_xfer::zone_expired

is the zone currently considered expired? after expiry also older serial numbers are allowed (not just newer)

Definition at line 238 of file authzone.h.


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