packed_rrset_data Struct Reference

RRset data. More...

#include <packed_rrset.h>

Data Fields

time_t ttl_add
 Timestamp added to TTLs in the packed data. More...
 
time_t ttl
 TTL (in seconds like time()) of the rrset. More...
 
size_t count
 number of rrs.
 
size_t rrsig_count
 number of rrsigs, if 0 no rrsigs
 
enum rrset_trust trust
 the trustworthiness of the rrset data
 
enum sec_status security
 security status of the rrset data
 
size_t * rr_len
 length of every rr's rdata, rr_len[i] is size of rr_data[i].
 
time_t * rr_ttl
 ttl of every rr. More...
 
uint8_t ** rr_data
 Array of pointers to every rr's rdata. More...
 

Detailed Description

RRset data.

The data is packed, stored contiguously in memory.

It is not always stored contiguously, in that case, an unpacked-packed rrset has the arrays separate. A bunch of routines work on that, but the packed rrset that is contiguous is for the rrset-cache and the cache-response routines in daemon/worker.c.

memory layout: o base struct o rr_len size_t array o rr_data uint8_t* array o rr_ttl time_t array (after size_t and ptrs because those may be 64bit and this array before those would make them unaligned). Since the stuff before is 32/64bit, rr_ttl is 32 bit aligned. o rr_data rdata wireformats o rrsig_data rdata wireformat(s)

Rdata is stored in wireformat. The dname is stored in wireformat. TTLs are stored as absolute values (and could be expired).

RRSIGs are stored in the arrays after the regular rrs.

You need the packed_rrset_key to know dname, type, class of the resource records in this RRset. (if signed the rrsig gives the type too).

On the wire an RR is: name, type, class, ttl, rdlength, rdata. So we need to send the following per RR: key.dname, ttl, rr_data[i]. since key.dname ends with type and class. and rr_data starts with the rdlength. the ttl value to send changes due to time.

Field Documentation

◆ ttl_add

time_t packed_rrset_data::ttl_add

Timestamp added to TTLs in the packed data.

Needed to support serving original TTLs.

Referenced by packed_rrset_copy_region(), packed_rrset_encode(), packed_rrset_ttl_add(), and reply_info_set_ttls().

◆ ttl

◆ rr_ttl

◆ rr_data

uint8_t** packed_rrset_data::rr_data

Array of pointers to every rr's rdata.

The rr_data[i] rdata is stored in uncompressed wireformat. The first uint16_t of rr_data[i] is network format rdlength.

rr_data[count] to rr_data[count+rrsig_count] contain the rrsig data.

Referenced by assemble_it(), assembled_rrset_delete(), auth_rr_to_string(), az_add_additionals_from(), az_rrset_find_rrsig(), canonical_compare(), canonical_compare_byfield(), create_synth_cname(), delegpt_add_rrset_A(), delegpt_add_rrset_AAAA(), delegpt_rrset_add_ns(), dnskey_get_keysize(), fill_res(), follow_cname_chain(), kd_get_flags(), load_rr(), load_rrset(), local_data_find_tag_datas(), local_rrset_remove_rr(), mesh_state_add_reply(), move_into_cache(), new_cname_override(), nsec3_get_algo(), nsec3_get_iter(), nsec3_get_nextowner(), nsec3_get_salt(), nsec3_has_optout(), nsec3_has_type(), nsec3_known_algo(), nsec3_unknown_flags(), nsec_get_next(), nsec_has_type(), packed_rrset_encode(), packed_rrset_find_rr(), packed_rrset_heap_data(), packed_rrset_ptr_fixup(), packed_rrset_sizeof(), parse_rr_copy(), rdata2sockaddr(), rdata_duplicate(), respip_copy_rrset(), rr_is_duplicate(), rrset_add_rr(), rrset_canonical(), rrset_canonical_equal(), rrset_canonicalize_to_buffer(), rrset_create(), rrset_equal(), rrset_get_rdata(), rrset_get_sig_algo(), rrset_get_sig_keytag(), rrset_has_signer(), rrset_insert_rr(), rrset_moveover_rrsigs(), rrset_remove_rr(), rrsetdata_equal(), rrsig_get_labcount(), rrsig_num_that_cover(), rrsigs_copy_from_rrset_to_rrsigset(), val_find_best_signer(), val_find_rrset_signer(), xfr_master_add_addrs(), zonemd_fetch_parameters(), and zonemd_simple_rrsig_allocs().


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