ub_result Struct Reference

The validation and resolution results. More...

#include <unbound.h>


Data Fields

char * qname
 The original question, name text string.
int qtype
 the type asked for
int qclass
 the class asked for
char ** data
 a list of network order DNS rdata items, terminated with a NULL pointer, so that data[0] is the first result entry, data[1] the second, and the last entry is NULL.
int * len
 the length in bytes of the data items, len[i] for data[i]
char * canonname
 canonical name for the result (the final cname).
int rcode
 DNS RCODE for the result.
void * answer_packet
 The DNS answer packet.
int answer_len
 length of the answer packet in octets.
int havedata
 If there is any data, this is true.
int nxdomain
 If there was no data, and the domain did not exist, this is true.
int secure
 True, if the result is validated securely.
int bogus
 If the result was not secure (secure==0), and this result is due to a security failure, bogus is true.


Detailed Description

The validation and resolution results.

Allocated by the resolver, and need to be freed by the application with ub_resolve_free().


Field Documentation

a list of network order DNS rdata items, terminated with a NULL pointer, so that data[0] is the first result entry, data[1] the second, and the last entry is NULL.

If there was no data, data[0] is NULL.

Referenced by ext_check_result(), fill_res(), libworker_enter_result(), pretty_output(), print_result(), and ub_resolve_free().

canonical name for the result (the final cname).

zero terminated string. May be NULL if no canonical name exists.

Referenced by fill_canon(), fill_res(), pretty_output(), and ub_resolve_free().

DNS RCODE for the result.

May contain additional error code if there was no data due to an error. 0 (NOERROR) if okay.

Referenced by ext_check_result(), libworker_enter_result(), libworker_fillup_fg(), pretty_output(), print_result(), process(), and process_answer_detail().

The DNS answer packet.

Network formatted. Can contain DNSSEC types.

Referenced by ext_check_result(), process(), ub_resolve(), and ub_resolve_free().

length of the answer packet in octets.

Referenced by ext_check_result(), process(), and ub_resolve().

If there is any data, this is true.

If false, there was no data (nxdomain may be true, rcode can be set).

Referenced by ext_check_result(), libworker_enter_result(), pretty_output(), and print_result().

If there was no data, and the domain did not exist, this is true.

If it is false, and there was no data, then the domain name is purported to exist, but the requested data type is not available.

Referenced by dnslook(), ext_check_result(), libworker_enter_result(), and print_result().

True, if the result is validated securely.

False, if validation failed or domain queried has no security info.

It is possible to get a result with no data (havedata is false), and secure is true. This means that the non-existance of the data was cryptographically proven (with signatures).

Referenced by ext_check_result(), libworker_enter_result(), and secure_str().

If the result was not secure (secure==0), and this result is due to a security failure, bogus is true.

This means the data has been actively tampered with, signatures failed, expected signatures were not present, timestamps on signatures were out of date and so on.

If !secure and !bogus, this can happen if the data is not secure because security is disabled for that domain name. This means the data is from a domain where data is not signed.

Referenced by ext_check_result(), libworker_enter_result(), and secure_str().


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

Generated on Thu Mar 26 10:03:55 2009 for unbound by  doxygen 1.5.8