ldns  1.7.0
Data Fields
ldns_struct_rr Struct Reference

Resource Record. More...

Data Fields

ldns_rdf_owner
 Owner name, uncompressed. More...
 
uint32_t _ttl
 Time to live. More...
 
size_t _rd_count
 Number of data fields. More...
 
ldns_rr_type _rr_type
 the type of the RR. More...
 
ldns_rr_class _rr_class
 Class of the resource record. More...
 
ldns_rdf ** _rdata_fields
 The array of rdata's. More...
 
signed char _rr_question
 question rr [it would be nicer if thous is after _rd_count] ABI change: Fix this in next major release More...
 

Detailed Description

Resource Record.

This is the basic DNS element that contains actual data

From RFC1035:

3.2.1. Format
All RRs have the same top level format shown below:
                                    1  1  1  1  1  1
      0  1  2  3  4  5  6  7  8  9  0  1  2  3  4  5
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |                                               |
    /                                               /
    /                      NAME                     /
    |                                               |
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |                      TYPE                     |
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |                     CLASS                     |
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |                      TTL                      |
    |                                               |
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |                   RDLENGTH                    |
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|
    /                     RDATA                     /
    /                                               /
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
where:
NAME            an owner name, i.e., the name of the node to which this
                resource record pertains.
TYPE            two octets containing one of the RR TYPE codes.
CLASS           two octets containing one of the RR CLASS codes.
TTL             a 32 bit signed integer that specifies the time interval
                that the resource record may be cached before the source
                of the information should again be consulted.  Zero
                values are interpreted to mean that the RR can only be
                used for the transaction in progress, and should not be
                cached.  For example, SOA records are always distributed
                with a zero TTL to prohibit caching.  Zero values can
                also be used for extremely volatile data.
RDLENGTH        an unsigned 16 bit integer that specifies the length in
                octets of the RDATA field.
RDATA           a variable length string of octets that describes the
                resource.  The format of this information varies
                according to the TYPE and CLASS of the resource record.
   

The actual amount and type of rdata fields depend on the RR type of the RR, and can be found by using ldns_rr_descriptor functions.

Definition at line 302 of file rr.h.

Field Documentation

§ _owner

ldns_rdf* ldns_struct_rr::_owner

Owner name, uncompressed.

Definition at line 305 of file rr.h.

§ _ttl

uint32_t ldns_struct_rr::_ttl

Time to live.

Definition at line 307 of file rr.h.

§ _rd_count

size_t ldns_struct_rr::_rd_count

Number of data fields.

Definition at line 309 of file rr.h.

§ _rr_type

ldns_rr_type ldns_struct_rr::_rr_type

the type of the RR.

A, MX etc.

Definition at line 311 of file rr.h.

§ _rr_class

ldns_rr_class ldns_struct_rr::_rr_class

Class of the resource record.

Definition at line 313 of file rr.h.

§ _rdata_fields

ldns_rdf** ldns_struct_rr::_rdata_fields

The array of rdata's.

Definition at line 316 of file rr.h.

§ _rr_question

signed char ldns_struct_rr::_rr_question

question rr [it would be nicer if thous is after _rd_count] ABI change: Fix this in next major release

Definition at line 320 of file rr.h.