serviced_query Struct Reference

Query service record. More...

#include <outside_network.h>

Public Types

enum  serviced_query_status {
  serviced_initial , serviced_query_UDP_EDNS , serviced_query_UDP , serviced_query_TCP_EDNS ,
  serviced_query_TCP , serviced_query_UDP_EDNS_fallback , serviced_query_TCP_EDNS_fallback , serviced_query_UDP_EDNS_FRAG
}
 current status More...
 

Data Fields

rbnode_type node
 The rbtree node, key is this record.
 
uint8_t * qbuf
 The query that needs to be answered. More...
 
size_t qbuflen
 length of qbuf.
 
int dnssec
 If an EDNS section is included, the DO/CD bit will be turned on.
 
int want_dnssec
 We want signatures, or else the answer is likely useless.
 
int nocaps
 ignore capsforid
 
int tcp_upstream
 tcp upstream used, use tcp, or ssl_upstream for SSL
 
int ssl_upstream
 
char * tls_auth_name
 the name of the tls authentication name, eg. More...
 
struct sockaddr_storage addr
 where to send it
 
socklen_t addrlen
 length of addr field in use.
 
uint8_t * zone
 zone name, uncompressed domain name in wireformat
 
size_t zonelen
 length of zone name
 
int qtype
 qtype
 
enum serviced_query::serviced_query_status status
 variable with current status
 
int to_be_deleted
 true if serviced_query is scheduled for deletion already
 
int retry
 number of UDP retries
 
struct timeval last_sent_time
 time last UDP was sent
 
int last_rtt
 rtt of last message
 
int edns_lame_known
 do we know edns probe status already, for UDP_EDNS queries
 
struct edns_optionopt_list
 edns options to use for sending upstream packet
 
struct outside_networkoutnet
 outside network this is part of
 
struct service_callbackcblist
 list of interested parties that need callback on results.
 
void * pending
 the UDP or TCP query that is pending, see status which
 
size_t padding_block_size
 block size with which to pad encrypted queries (default: 128)
 
struct regionalregion
 region for this serviced query. More...
 
struct alloc_cachealloc
 allocation service for the region
 
struct comm_timertimer
 flash timer to start the net I/O as a separate event
 
int busy
 true if serviced_query is currently doing net I/O and may block
 

Detailed Description

Query service record.

Contains query and destination. UDP, TCP, EDNS are all tried. complete with retries and timeouts. A number of interested parties can receive a callback.

Member Enumeration Documentation

◆ serviced_query_status

current status

Enumerator
serviced_initial 

initial status

serviced_query_UDP_EDNS 

UDP with EDNS sent.

serviced_query_UDP 

UDP without EDNS sent.

serviced_query_TCP_EDNS 

TCP with EDNS sent.

serviced_query_TCP 

TCP without EDNS sent.

serviced_query_UDP_EDNS_fallback 

probe to test noEDNS0 (EDNS gives FORMERRorNOTIMP)

serviced_query_TCP_EDNS_fallback 

probe to test TCP noEDNS0 (EDNS gives FORMERRorNOTIMP)

serviced_query_UDP_EDNS_FRAG 

send UDP query with EDNS1480 (or 1280)

Field Documentation

◆ qbuf

uint8_t* serviced_query::qbuf

The query that needs to be answered.

Starts with flags u16, then qdcount, ..., including qname, qtype, qclass. Does not include EDNS record.

Referenced by lookup_serviced(), serviced_cmp(), serviced_create(), serviced_encode(), and serviced_tcp_callback().

◆ tls_auth_name

char* serviced_query::tls_auth_name

the name of the tls authentication name, eg.

'ns.example.com' or NULL

Referenced by serviced_create().

◆ region

struct regional* serviced_query::region

region for this serviced query.

Will be cleared when this serviced_query will be deleted

Referenced by outnet_serviced_query(), and serviced_create().


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