Send queries to outside servers and wait for answers from servers. More...
|struct comm_base *||base|
|Base for select calls. |
|pointer to time in seconds |
|struct timeval *||now_tv|
|pointer to time in microseconds |
|struct sldns_buffer *||udp_buff|
|buffer shared by UDP connections, since there is only one datagram at any time. |
|serviced_callbacks malloc overhead when processing multiple identical serviced queries to the same server. |
|use x20 bits to encode additional ID random bits |
|outside network wants to quit. More...|
|number of unwanted replies received (for statistics) |
|cumulative total of unwanted replies (for defense) |
|threshold when to take defensive action. More...|
|void(*||unwanted_action )(void *)|
|what action to take, called when defensive action is needed |
|user param for action |
|struct port_comm *||unused_fds|
|linked list of available commpoints, unused file descriptors, for use as outgoing UDP ports. More...|
|if udp is done |
|if udp is delay-closed (delayed answers do not meet closed port) |
|timeout for delayclose |
|if we perform udp-connect, connect() for UDP socket to mitigate ICMP side channel leakage |
|number of udp packets sent. |
|struct port_if *||ip4_ifs|
|array of outgoing IP4 interfaces |
|number of outgoing IP4 interfaces |
|struct port_if *||ip6_ifs|
|array of outgoing IP6 interfaces |
|number of outgoing IP6 interfaces |
|struct pending *||udp_wait_first|
|pending udp queries waiting to be sent out, waiting for fd |
|struct pending *||udp_wait_last|
|last pending udp query in list |
|pending udp answers. More...|
|serviced queries, sorted by qbuf, addr, dnssec |
|struct infra_cache *||infra|
|host cache, pointer but not owned by outnet. |
|struct ub_randstate *||rnd|
|where to get random numbers |
|ssl context to create ssl wrapped TCP with DNS connections |
|if SNI will be used for TLS connections |
|maximum segment size of tcp socket |
|IP_TOS socket option requested on the sockets. |
|struct pending_tcp **||tcp_conns|
|Array of tcp pending used for outgoing TCP connections. More...|
|number of tcp communication points. |
|number of tcp communication points in use. |
|max number of queries on a reuse connection |
|timeout for REUSE entries in milliseconds. |
|timeout in milliseconds for TCP queries to auth servers. |
|tree of still-open and waiting tcp connections for reuse. More...|
|max number of tcp_reuse entries we want to keep open |
|struct reuse_tcp *||tcp_reuse_first|
|first and last(oldest) in lru list of reuse connections. More...|
|struct reuse_tcp *||tcp_reuse_last|
|struct pending_tcp *||tcp_free|
|list of tcp comm points that are free for use |
|struct waiting_tcp *||tcp_wait_first|
|list of tcp queries waiting for a buffer |
|struct waiting_tcp *||tcp_wait_last|
|last of waiting query list |
Send queries to outside servers and wait for answers from servers.
Contains answer-listen sockets.
outside network wants to quit.
Stop queued msgs from sent.
Referenced by auth_xfer_probe_timer_callback(), auth_xfer_probe_udp_callback(), auth_xfer_timer(), auth_xfer_transfer_http_callback(), auth_xfer_transfer_timer_callback(), libworker_bg_done_cb(), outnet_send_wait_udp(), outside_network_create(), outside_network_delete(), outside_network_quit_prepare(), and use_free_buffer().
threshold when to take defensive action.
If 0 then never.
Referenced by outside_network_create().
|struct port_comm* outside_network::unused_fds|
|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.
tree of still-open and waiting tcp connections for reuse.
can be closed and reopened to get a new tcp connection. or reused to the same destination again. with timeout to close. Entries are of type struct reuse_tcp. The entries are both active and empty connections.
Referenced by check_snip(), check_tree_and_list(), empty_tree(), outside_network_create(), outside_network_delete(), reuse_tcp_find(), reuse_tcp_insert(), reuse_tcp_remove_serviced_keep(), reuse_tcp_remove_tree_list(), and tcp_reuse_tree_list_test().
|struct reuse_tcp* outside_network::tcp_reuse_first|
first and last(oldest) in lru list of reuse connections.
the oldest can be closed to get a new free pending_tcp if needed The list contains empty connections, that wait for timeout or a new query that can use the existing connection.
Referenced by check_removal(), check_snip(), check_tree_and_list(), empty_tree(), outnet_waiting_tcp_list_add_first(), outside_network_delete(), reuse_tcp_insert(), reuse_tcp_lru_snip(), reuse_tcp_lru_touch(), reuse_tcp_remove_tree_list(), and use_free_buffer().