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. | |
| char * | why_bogus |
| If the result is bogus this contains a string (zero terminated) that describes the failure. | |
The validation and resolution results.
Allocated by the resolver, and need to be freed by the application with ub_resolve_free().
| char* ub_result::qname |
The original question, name text string.
Referenced by context_new(), context_serialize_new_query(), context_deserialize_new_query(), ub_resolve_free(), setup_qinfo_edns(), pretty_output(), ext_check_result(), and ext_callback().
| 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 ub_resolve_free(), fill_res(), libworker_enter_result(), resolve_host_ip(), pretty_output(), print_result(), and ext_check_result().
| 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 ub_resolve_free(), fill_canon(), fill_res(), and pretty_output().
| 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 process_answer_detail(), libworker_enter_result(), libworker_fillup_fg(), do_root_update_work(), pretty_output(), print_result(), ext_check_result(), process(), and do_lookup().
| void* ub_result::answer_packet |
The DNS answer packet.
Network formatted. Can contain DNSSEC types.
Referenced by ub_resolve(), ub_resolve_free(), pretty_output(), ext_check_result(), process(), and result2answer().
length of the answer packet in octets.
Referenced by ub_resolve(), pretty_output(), ext_check_result(), process(), and result2answer().
If there is any data, this is true.
If false, there was no data (nxdomain may be true, rcode can be set).
Referenced by libworker_enter_result(), pretty_output(), print_result(), ext_check_result(), and do_lookup().
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 libworker_enter_result(), dnslook(), print_result(), and ext_check_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 libworker_enter_result(), do_root_update_work(), secure_str(), ext_check_result(), and do_lookup().
| 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 libworker_enter_result(), secure_str(), pretty_output(), and ext_check_result().
| 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 context_serialize_answer(), context_deserialize_answer(), ub_resolve_free(), libworker_fillup_fg(), add_bg_result(), and pretty_output().