Data Fields
outside_network Struct Reference

Send queries to outside servers and wait for answers from servers. More...

#include <outside_network.h>

Data Fields

struct comm_basebase
 Base for select calls.
 
time_t * now_secs
 pointer to time in seconds
 
struct timeval * now_tv
 pointer to time in microseconds
 
struct sldns_bufferudp_buff
 buffer shared by UDP connections, since there is only one datagram at any time. More...
 
size_t svcd_overhead
 serviced_callbacks malloc overhead when processing multiple identical serviced queries to the same server. More...
 
int use_caps_for_id
 use x20 bits to encode additional ID random bits
 
int want_to_quit
 outside network wants to quit. More...
 
size_t unwanted_replies
 number of unwanted replies received (for statistics)
 
size_t unwanted_total
 cumulative total of unwanted replies (for defense)
 
size_t unwanted_threshold
 threshold when to take defensive action. More...
 
void(* unwanted_action )(void *)
 what action to take, called when defensive action is needed
 
void * unwanted_param
 user param for action
 
struct port_communused_fds
 linked list of available commpoints, unused file descriptors, for use as outgoing UDP ports. More...
 
int do_udp
 if udp is done
 
int delayclose
 if udp is delay-closed (delayed answers do not meet closed port)
 
struct timeval delay_tv
 timeout for delayclose
 
struct port_ifip4_ifs
 array of outgoing IP4 interfaces
 
int num_ip4
 number of outgoing IP4 interfaces
 
struct port_ifip6_ifs
 array of outgoing IP6 interfaces
 
int num_ip6
 number of outgoing IP6 interfaces
 
struct pendingudp_wait_first
 pending udp queries waiting to be sent out, waiting for fd
 
struct pendingudp_wait_last
 last pending udp query in list
 
rbtree_typepending
 pending udp answers. More...
 
rbtree_typeserviced
 serviced queries, sorted by qbuf, addr, dnssec
 
struct infra_cacheinfra
 host cache, pointer but not owned by outnet. More...
 
struct ub_randstate * rnd
 where to get random numbers
 
void * sslctx
 ssl context to create ssl wrapped TCP with DNS connections
 
int tcp_mss
 maximum segment size of tcp socket
 
struct pending_tcp ** tcp_conns
 Array of tcp pending used for outgoing TCP connections. More...
 
size_t num_tcp
 number of tcp communication points. More...
 
size_t num_tcp_outgoing
 number of tcp communication points in use. More...
 
struct pending_tcptcp_free
 list of tcp comm points that are free for use
 
struct waiting_tcptcp_wait_first
 list of tcp queries waiting for a buffer
 
struct waiting_tcptcp_wait_last
 last of waiting query list
 

Detailed Description

Send queries to outside servers and wait for answers from servers.

Contains answer-listen sockets.

Field Documentation

◆ udp_buff

struct sldns_buffer* outside_network::udp_buff

◆ svcd_overhead

size_t outside_network::svcd_overhead

serviced_callbacks malloc overhead when processing multiple identical serviced queries to the same server.

Referenced by outside_network_create().

◆ want_to_quit

int outside_network::want_to_quit

◆ unwanted_threshold

size_t outside_network::unwanted_threshold

threshold when to take defensive action.

If 0 then never.

Referenced by outside_network_create().

◆ unused_fds

struct port_comm* outside_network::unused_fds

linked list of available commpoints, unused file descriptors, for use as outgoing UDP ports.

cp.fd=-1 in them.

Referenced by outnet_get_mem(), outnet_send_wait_udp(), outside_network_create(), outside_network_delete(), pending_udp_query(), portcomm_loweruse(), and select_ifport().

◆ pending

rbtree_type* outside_network::pending

pending udp answers.

sorted by id, addr

Referenced by outside_network_create(), outside_network_delete(), and pending_delete().

◆ infra

struct infra_cache* outside_network::infra

host cache, pointer but not owned by outnet.

Referenced by outside_network_create(), serviced_tcp_callback(), serviced_tcp_send(), serviced_udp_callback(), and serviced_udp_send().

◆ tcp_conns

struct pending_tcp** outside_network::tcp_conns

Array of tcp pending used for outgoing TCP connections.

Each can be used to establish a TCP connection with a server. The file descriptors are -1 if they are free, and need to be opened for the tcp connection. Can be used for ip4 and ip6.

Referenced by create_pending_tcp(), and outside_network_delete().

◆ num_tcp

size_t outside_network::num_tcp

number of tcp communication points.

Referenced by create_pending_tcp(), outside_network_create(), and outside_network_delete().

◆ num_tcp_outgoing

size_t outside_network::num_tcp_outgoing

number of tcp communication points in use.

Referenced by outside_network_create(), server_stats_compile(), and worker_stats_clear().


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