tor
master
|
#include <dns_structs.h>
Public Member Functions | |
HT_ENTRY (cached_resolve_t) node | |
Data Fields | |
uint32_t | magic |
char | address [MAX_ADDRESSLEN] |
union { | |
uint32_t addr_ipv4 | |
int err_ipv4 | |
} | result_ipv4 |
union { | |
struct in6_addr addr_ipv6 | |
int err_ipv6 | |
} | result_ipv6 |
union { | |
char * hostname | |
int err_hostname | |
} | result_ptr |
uint8_t | state |
time_t | expire |
uint32_t | ttl_ipv4 |
uint32_t | ttl_ipv6 |
uint32_t | ttl_hostname |
pending_connection_t * | pending_connections |
int | minheap_idx |
Status fields | |
These take one of the RES_STATUS_* values, depending on the state of the corresponding lookup. | |
unsigned int | res_status_ipv4: 2 |
unsigned int | res_status_ipv6: 2 |
unsigned int | res_status_hostname: 2 |
A DNS request: possibly completed, possibly pending; cached_resolve structs are stored at the OR side in a hash table, and as a linked list from oldest to newest.
uint32_t addr_ipv4 |
IPv4 addr for address, if successful. (In host order.)
struct in6_addr addr_ipv6 |
IPv6 addr for address, if successful
char address[MAX_ADDRESSLEN] |
The hostname to be resolved.
int err_hostname |
A hostname, if PTR lookup happened successfully
int err_ipv4 |
One of DNS_ERR_*, if IPv4 lookup failed.
int err_ipv6 |
One of DNS_ERR_*, if IPv6 lookup failed.
time_t expire |
Remove items from cache after this time.
uint32_t magic |
Must be CACHED_RESOLVE_MAGIC
int minheap_idx |
Position of this element in the heap
pending_connection_t* pending_connections |
Connections that want to know when we get an answer for this resolve.
union { ... } result_ipv4 |
Outcome of IPv4 lookup
union { ... } result_ipv6 |
Outcome of IPv6 lookup, if any
uint8_t state |
Is this cached entry pending/done/informative?
uint32_t ttl_hostname |
What TTL did the nameserver tell us?
uint32_t ttl_ipv4 |
What TTL did the nameserver tell us?
uint32_t ttl_ipv6 |
What TTL did the nameserver tell us?