Electroneum
serviced_query Struct Reference

#include <outside_network.h>

Collaboration diagram for serviced_query:

Public Types

enum  serviced_query_status {
  serviced_initial, serviced_query_UDP_EDNS, serviced_query_UDP, serviced_query_TCP_EDNS,
  serviced_query_TCP, serviced_query_PROBE_EDNS, serviced_query_UDP_EDNS_fallback, serviced_query_TCP_EDNS_fallback,
  serviced_query_UDP_EDNS_FRAG
}
 

Public Attributes

rbnode_type node
 
uint8_tqbuf
 
size_t qbuflen
 
int dnssec
 
int want_dnssec
 
int nocaps
 
int tcp_upstream
 
int ssl_upstream
 
char * tls_auth_name
 
struct sockaddr_storage addr
 
socklen_t addrlen
 
uint8_tzone
 
size_t zonelen
 
int qtype
 
enum serviced_query::serviced_query_status status
 
int to_be_deleted
 
int retry
 
struct timeval last_sent_time
 
int last_rtt
 
int edns_lame_known
 
struct edns_optionopt_list
 
struct outside_networkoutnet
 
struct service_callbackcblist
 
void * pending
 

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.

Definition at line 320 of file outside_network.h.

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_PROBE_EDNS 

probe to test EDNS lameness (EDNS is dropped)

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)

Definition at line 351 of file outside_network.h.

Member Data Documentation

◆ addr

struct sockaddr_storage serviced_query::addr

where to send it

Definition at line 341 of file outside_network.h.

◆ addrlen

socklen_t serviced_query::addrlen

length of addr field in use.

Definition at line 343 of file outside_network.h.

◆ cblist

struct service_callback* serviced_query::cblist

list of interested parties that need callback on results.

Definition at line 388 of file outside_network.h.

◆ dnssec

int serviced_query::dnssec

If an EDNS section is included, the DO/CD bit will be turned on.

Definition at line 330 of file outside_network.h.

◆ edns_lame_known

int serviced_query::edns_lame_known

do we know edns probe status already, for UDP_EDNS queries

Definition at line 382 of file outside_network.h.

◆ last_rtt

int serviced_query::last_rtt

rtt of last message

Definition at line 380 of file outside_network.h.

◆ last_sent_time

struct timeval serviced_query::last_sent_time

time last UDP was sent

Definition at line 378 of file outside_network.h.

◆ nocaps

int serviced_query::nocaps

ignore capsforid

Definition at line 334 of file outside_network.h.

◆ node

rbnode_type serviced_query::node

The rbtree node, key is this record

Definition at line 322 of file outside_network.h.

◆ opt_list

struct edns_option* serviced_query::opt_list

edns options to use for sending upstream packet

Definition at line 384 of file outside_network.h.

◆ outnet

struct outside_network* serviced_query::outnet

outside network this is part of

Definition at line 386 of file outside_network.h.

◆ pending

void* serviced_query::pending

the UDP or TCP query that is pending, see status which

Definition at line 390 of file outside_network.h.

◆ 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.

Definition at line 326 of file outside_network.h.

◆ qbuflen

size_t serviced_query::qbuflen

length of qbuf.

Definition at line 328 of file outside_network.h.

◆ qtype

int serviced_query::qtype

qtype

Definition at line 349 of file outside_network.h.

◆ retry

int serviced_query::retry

number of UDP retries

Definition at line 376 of file outside_network.h.

◆ ssl_upstream

int serviced_query::ssl_upstream

Definition at line 336 of file outside_network.h.

◆ status

enum serviced_query::serviced_query_status serviced_query::status

variable with current status

◆ tcp_upstream

int serviced_query::tcp_upstream

tcp upstream used, use tcp, or ssl_upstream for SSL

Definition at line 336 of file outside_network.h.

◆ tls_auth_name

char* serviced_query::tls_auth_name

the name of the tls authentication name, eg. 'ns.example.com' or NULL

Definition at line 339 of file outside_network.h.

◆ to_be_deleted

int serviced_query::to_be_deleted

true if serviced_query is scheduled for deletion already

Definition at line 374 of file outside_network.h.

◆ want_dnssec

int serviced_query::want_dnssec

We want signatures, or else the answer is likely useless

Definition at line 332 of file outside_network.h.

◆ zone

uint8_t* serviced_query::zone

zone name, uncompressed domain name in wireformat

Definition at line 345 of file outside_network.h.

◆ zonelen

size_t serviced_query::zonelen

length of zone name

Definition at line 347 of file outside_network.h.


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