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. More... | |
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). More... | |
int | rcode |
DNS RCODE for the result. More... | |
void * | answer_packet |
The DNS answer packet. More... | |
int | answer_len |
length of the answer packet in octets. | |
int | havedata |
If there is any data, this is true. More... | |
int | nxdomain |
If there was no data, and the domain did not exist, this is true. More... | |
int | secure |
True, if the result is validated securely. More... | |
int | bogus |
If the result was not secure (secure==0), and this result is due to a security failure, bogus is true. More... | |
char * | why_bogus |
If the result is bogus this contains a string (zero terminated) that describes the failure. More... | |
int | was_ratelimited |
If the query or one of its subqueries was ratelimited. More... | |
int | ttl |
TTL for the result, in seconds. More... | |
The validation and resolution results.
Allocated by the resolver, and need to be freed by the application with ub_resolve_free().
char** ub_result::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.
If there was no data, data[0] is NULL.
Referenced by do_print(), ext_check_result(), fill_res(), pretty_output(), print_result(), resolve_host_ip(), and ub_resolve_free().
char* ub_result::canonname |
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().
int ub_result::rcode |
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 do_root_update_work(), ext_check_result(), libworker_enter_result(), libworker_fillup_fg(), pretty_output(), print_result(), process_answer_detail(), resolve_host_ip(), and secure_str().
void* ub_result::answer_packet |
The DNS answer packet.
Network formatted. Can contain DNSSEC types.
Referenced by ext_check_result(), pretty_output(), ub_resolve(), and ub_resolve_free().
int ub_result::havedata |
If there is any data, this is true.
If false, there was no data (nxdomain may be true, rcode can be set).
Referenced by do_print(), ext_check_result(), pretty_output(), print_result(), and resolve_host_ip().
int ub_result::nxdomain |
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(), and print_result().
int ub_result::secure |
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-existence of the data was cryptographically proven (with signatures).
Referenced by ext_check_result(), and secure_str().
int ub_result::bogus |
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(), pretty_output(), and secure_str().
char* ub_result::why_bogus |
If the result is bogus this contains a string (zero terminated) that describes the failure.
There may be other errors as well as the one described, the description may not be perfectly accurate. Is NULL if the result is not bogus.
Referenced by add_bg_result(), context_serialize_answer(), libworker_fillup_fg(), pretty_output(), and ub_resolve_free().
int ub_result::was_ratelimited |
If the query or one of its subqueries was ratelimited.
Useful if ratelimiting is enabled and answer to the client is SERVFAIL as a result.
Referenced by add_bg_result(), and libworker_fillup_fg().
int ub_result::ttl |
TTL for the result, in seconds.
If the security is bogus, then you also cannot trust this value.
Referenced by fill_res().