#include <ldns/ldns.h>
ldns_pkt_section();
ldns_pkt_type();
This structure contains a complete DNS packet (either a query or an answer)
It is the complete representation of what you actually send to a
nameserver, and what it sends back (assuming you are the client here).
struct ldns_struct_pkt
{
Header section:
ldns_hdr *_header;
/* extra items needed in a packet */
an rdf (A or AAAA) with the IP address of the server it is from:
ldns_rdf *_answerfrom;
Timestamp of the time the packet was sent or created:
struct timeval timestamp;
The duration of the query this packet is an answer to:
uint32_t _querytime;
The size of the wire format of the packet in octets:
size_t _size;
Optional tsig rr:
ldns_rr *_tsig_rr;
EDNS0 available buffer size, see RFC2671:
uint16_t _edns_udp_size;
EDNS0 Extended rcode:
uint8_t _edns_extended_rcode;
EDNS Version:
uint8_t _edns_version;
/* OPT pseudo-RR presence flag */
uint8_t _edns_present;
Reserved EDNS data bits:
uint16_t _edns_z;
Arbitrary EDNS rdata:
ldns_rdf *_edns_data;
Question section:
ldns_rr_list *_question;
Answer section:
ldns_rr_list *_answer;
Authority section:
ldns_rr_list *_authority;
Additional section:
ldns_rr_list *_additional;
};
typedef struct ldns_struct_pkt ldns_pkt;
Licensed under the BSD License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.