Data Fields
packed_rrset_data Struct Reference

RRset data. More...

#include <packed_rrset.h>

Data Fields

time_t ttl
 TTL (in seconds like time()) of the rrset. More...
size_t count
 number of rrs. More...
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]. More...
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

time_t packed_rrset_data::ttl

◆ count

size_t packed_rrset_data::count

number of rrs.

Referenced by anchor_list_keytags(), assemble_it(), auth_zone_write_rrset(), az_add_additionals_from(), az_add_negative_soa(), canonical_sort(), copy_rrset(), create_synth_cname(), delegpt_add_rrset_A(), delegpt_add_rrset_AAAA(), delegpt_rrset_add_ns(), dns_cache_find_delegation(), do_list_local_data(), dump_rrset(), fill_res(), follow_cname_chain(), get_cname_target(), invalidateQueryInCache(), iter_store_parentside_neg(), key_entry_keysize(), key_matches_a_ds(), load_rrset(), local_data_find_tag_datas(), log_packed_rrset(), mesh_state_add_reply(), min_expiry(), move_into_cache(), need_to_update_rrset(), 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_rr_to_string(), packed_rrset_copy_region(), packed_rrset_encode(), packed_rrset_heap_data(), packed_rrset_ptr_fixup(), packed_rrset_sizeof(), packed_rrset_ttl_add(), parse_rr_copy(), pr_rrs(), print_rrset(), rdata_duplicate(), reply_info_set_ttls(), respip_addr_lookup(), rr_is_duplicate(), rrset_add_rr(), rrset_array_lock(), rrset_array_unlock(), rrset_array_unlock_touch(), rrset_canonical(), rrset_canonical_equal(), rrset_create(), rrset_equal(), rrset_get_count(), rrset_get_rdata(), rrset_get_sig_algo(), rrset_get_sig_keytag(), rrset_has_signer(), rrset_insert_rr(), rrset_moveover_rrsigs(), rrsetdata_equal(), rrsig_num_that_cover(), val_find_best_signer(), val_find_rrset_signer(), val_rrset_wildcard(), val_verify_rrset(), and wipeout().

◆ rr_len

size_t* packed_rrset_data::rr_len

◆ rr_ttl

time_t* packed_rrset_data::rr_ttl

◆ rr_data

uint8_t** packed_rrset_data::rr_data

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