|
unbound 0.1
|
Structure holding worker list. More...
#include <daemon.h>
Data Fields | |
| struct config_file * | cfg |
| The config settings. | |
| char * | chroot |
| the chroot dir in use, NULL if none | |
| char * | pidfile |
| pidfile that is used | |
| int | listening_port |
| port number that has ports opened. | |
| struct listen_port ** | ports |
| array of listening ports, opened. | |
| size_t | num_ports |
| size of ports array | |
| int | reuseport |
| reuseport is enabled if true | |
| int | rc_port |
| port number for remote that has ports opened. | |
| struct listen_port * | rc_ports |
| listening ports for remote control | |
| struct shared_ports * | shared_ports |
| the shared ports structure, with random ports numbers. | |
| struct daemon_remote * | rc |
| remote control connections management (for first worker) | |
| void * | listen_dot_sslctx |
| ssl context for listening to dnstcp over ssl | |
| void * | connect_dot_sslctx |
| ssl context for connecting to dnstcp over ssl | |
| void * | listen_doh_sslctx |
| ssl context for listening to DoH | |
| void * | listen_quic_sslctx |
| ssl context for listening to quic | |
| char * | ssl_service_key |
| the file name that the ssl context is made with, private key. | |
| char * | ssl_service_pem |
| the file name that the ssl context is made with, certificate. | |
| time_t | mtime_ssl_service_key |
| modification time for ssl_service_key, in sec and ns. | |
| long | mtime_ns_ssl_service_key |
| time_t | mtime_ssl_service_pem |
| modification time for ssl_service_pem, in sec and ns. | |
| long | mtime_ns_ssl_service_pem |
| int | num |
| num threads allocated | |
| int | old_num |
| num threads allocated in the previous config or 0 at first | |
| struct worker ** | workers |
| the worker entries | |
| struct alloc_cache ** | worker_allocs |
| per-worker allocation cache | |
| int | need_to_exit |
| do we need to exit unbound (or is it only a reload?) | |
| struct ub_randstate * | rand |
| master random table ; used for port div between threads on reload | |
| struct alloc_cache | superalloc |
| master allocation cache | |
| struct module_env * | env |
| the module environment master value, copied and changed by threads | |
| struct module_stack | mods |
| stack of module callbacks | |
| int | mods_inited |
| The module stack has been inited. | |
| struct acl_list * | acl |
| access control, which client IPs are allowed to connect | |
| struct acl_list * | acl_interface |
| access control, which interfaces are allowed to connect | |
| struct tcl_list * | tcl |
| TCP connection limit, limit connections from client IPs. | |
| struct rbtree_type * | allow_proxy_tree |
| allow proxy addr tree, allowed addresses are in the tree. | |
| struct local_zones * | local_zones |
| local authority zones | |
| struct timeval | time_last_stat |
| last time of statistics printout | |
| struct timeval | time_boot |
| time when daemon started | |
| struct shm_main_info * | shm_info |
| The SHM info for shared memory stats. | |
| int | stat_time_specific |
| if the timeout for statistics is attempted at specific offset. | |
| int | stat_time_offset |
| if the timeout is specific, what offset in the period. | |
| int | use_response_ip |
| some response-ip tags or actions are configured if true | |
| int | use_rpz |
| some RPZ policies are configured | |
| struct doq_table * | doq_table |
| the doq connection table | |
| int | reuse_cache |
| reuse existing cache on reload if other conditions allow it. | |
| struct cookie_secrets * | cookie_secrets |
| the EDNS cookie secrets from the cookie-secret-file | |
| struct fast_reload_thread * | fast_reload_thread |
| the fast reload thread, or NULL | |
| struct fast_reload_printq * | fast_reload_printq_list |
| the fast reload printq list | |
| int | fast_reload_drop_mesh |
| the fast reload option to drop mesh queries, true if so. | |
| int | fast_reload_tcl_has_changes |
| for fast reload, if the tcl, tcp connection limits, has changes for workers | |
| char * | cfgfile |
| config file name | |
Structure holding worker list.
Holds globally visible information.
| struct config_file* daemon::cfg |
The config settings.
Referenced by daemon_apply_cfg(), daemon_cleanup(), daemon_create_workers(), daemon_fork(), daemon_get_shufport(), daemon_open_shared_ports(), daemon_privileged(), daemon_reload_sslctxs(), daemon_setup_modules(), do_stats(), do_status(), fr_check_sslctx_change(), fr_check_tag_defines(), run_daemon(), service_deinit(), service_init(), service_main(), thread_start(), worker_check_request(), worker_delete(), worker_handle_request(), worker_init(), and worker_stat_timer_cb().
| char* daemon::chroot |
the chroot dir in use, NULL if none
Referenced by ct_create_sslctxs(), daemon_delete(), fr_read_config(), perform_setup(), run_daemon(), service_init(), and ssl_cert_changed().
| char* daemon::pidfile |
pidfile that is used
Referenced by daemon_delete(), perform_setup(), and run_daemon().
| int daemon::listening_port |
port number that has ports opened.
Referenced by daemon_open_shared_ports().
| struct listen_port** daemon::ports |
array of listening ports, opened.
Listening ports per worker, or just one element[0] shared by the worker threads.
Referenced by ct_acl_interface_setup_ports(), daemon_delete(), daemon_fork(), daemon_open_shared_ports(), and thread_start().
| size_t daemon::num_ports |
size of ports array
Referenced by ct_acl_interface_setup_ports(), daemon_create_workers(), daemon_delete(), daemon_open_shared_ports(), and thread_start().
| int daemon::reuseport |
reuseport is enabled if true
Referenced by ct_acl_interface_setup_ports(), daemon_create_workers(), daemon_open_shared_ports(), and do_status().
| int daemon::rc_port |
port number for remote that has ports opened.
Referenced by daemon_open_shared_ports().
| struct listen_port* daemon::rc_ports |
listening ports for remote control
Referenced by daemon_delete(), daemon_open_shared_ports(), and worker_init().
| struct shared_ports* daemon::shared_ports |
the shared ports structure, with random ports numbers.
Referenced by daemon_cleanup(), daemon_create_workers(), and worker_init().
| struct daemon_remote* daemon::rc |
remote control connections management (for first worker)
Referenced by daemon_cleanup(), daemon_delete(), do_status(), service_init(), setup_sslctx_remote(), worker_init(), worker_start_accept(), and worker_stop_accept().
| void* daemon::listen_dot_sslctx |
ssl context for listening to dnstcp over ssl
Referenced by daemon_delete_sslctxs(), fr_worker_pickup_listen_dnsport(), service_init(), sslctxs_swap(), and worker_init().
| void* daemon::connect_dot_sslctx |
ssl context for connecting to dnstcp over ssl
Referenced by daemon_delete_sslctxs(), fr_worker_pickup_outside_network(), service_init(), sslctxs_swap(), and worker_init().
| void* daemon::listen_doh_sslctx |
ssl context for listening to DoH
Referenced by daemon_delete_sslctxs(), fr_worker_pickup_listen_dnsport(), service_init(), sslctxs_swap(), and worker_init().
| void* daemon::listen_quic_sslctx |
ssl context for listening to quic
Referenced by daemon_delete_sslctxs(), fr_worker_pickup_listen_dnsport(), service_init(), sslctxs_swap(), and worker_init().
| char* daemon::ssl_service_key |
the file name that the ssl context is made with, private key.
Referenced by daemon_delete_sslctxs(), daemon_reload_sslctxs(), fr_check_sslctx_change(), ssl_cert_changed(), and sslctxs_swap().
| char* daemon::ssl_service_pem |
the file name that the ssl context is made with, certificate.
Referenced by daemon_delete_sslctxs(), ssl_cert_changed(), and sslctxs_swap().
| time_t daemon::mtime_ssl_service_key |
modification time for ssl_service_key, in sec and ns.
Like in a struct timespec, but without that for portability.
Referenced by ssl_cert_changed(), and sslctxs_swap().
| time_t daemon::mtime_ssl_service_pem |
modification time for ssl_service_pem, in sec and ns.
Like in a struct timespec, but without that for portability.
Referenced by ssl_cert_changed(), and sslctxs_swap().
| int daemon::num |
num threads allocated
Referenced by daemon_cleanup(), daemon_create_workers(), daemon_start_others(), daemon_stop_others(), distribute_cmd(), do_stats(), do_status(), execute_cmd(), fast_reload_thread_setup(), fr_main_perform_reload_nopause_poll(), fr_main_perform_reload_stop(), fr_read_ack_from_workers(), and worker_init().
| int daemon::old_num |
num threads allocated in the previous config or 0 at first
Referenced by daemon_apply_cfg(), daemon_cleanup(), and daemon_clear_allocs().
| struct worker** daemon::workers |
the worker entries
Referenced by daemon_cleanup(), daemon_create_workers(), daemon_fork(), daemon_start_others(), daemon_stop_others(), distribute_cmd(), do_stats(), fr_main_perform_reload_nopause_poll(), fr_main_perform_reload_stop(), and server_stats_reply().
| struct alloc_cache** daemon::worker_allocs |
per-worker allocation cache
Referenced by daemon_apply_cfg(), daemon_clear_allocs(), daemon_create_workers(), and worker_init().
| int daemon::need_to_exit |
do we need to exit unbound (or is it only a reload?)
Referenced by daemon_cleanup(), daemon_fork(), daemon_init(), and run_daemon().
| struct ub_randstate* daemon::rand |
master random table ; used for port div between threads on reload
Referenced by daemon_create_workers(), daemon_delete(), daemon_get_shufport(), fast_reload_thread_setup(), and worker_create().
| struct alloc_cache daemon::superalloc |
master allocation cache
Referenced by daemon_apply_cfg(), daemon_clear_allocs(), daemon_create_workers(), daemon_delete(), daemon_init(), daemon_privileged(), daemon_setup_modules(), and worker_mem_report().
| struct module_env* daemon::env |
the module environment master value, copied and changed by threads
Referenced by daemon_apply_cfg(), daemon_cleanup(), daemon_delete(), daemon_fork(), daemon_init(), daemon_privileged(), daemon_setup_modules(), do_expire_message(), do_flush_message(), fast_reload_worker_pickup_changes(), fr_construct_from_config(), fr_reload_config(), print_mem(), worker_init(), and worker_mem_report().
| struct module_stack daemon::mods |
stack of module callbacks
Referenced by daemon_delete(), daemon_fork(), daemon_init(), daemon_privileged(), daemon_setup_modules(), do_status(), fr_construct_from_config(), fr_reload_config(), and worker_init().
| int daemon::mods_inited |
The module stack has been inited.
Referenced by daemon_setup_modules().
| struct acl_list* daemon::acl |
access control, which client IPs are allowed to connect
Referenced by daemon_delete(), daemon_fork(), daemon_init(), fr_reload_config(), and worker_mem_report().
| struct acl_list* daemon::acl_interface |
access control, which interfaces are allowed to connect
Referenced by daemon_delete(), daemon_fork(), daemon_init(), daemon_open_shared_ports(), and fr_reload_config().
| struct tcl_list* daemon::tcl |
TCP connection limit, limit connections from client IPs.
Referenced by daemon_delete(), daemon_fork(), daemon_init(), fr_construct_from_config(), fr_reload_config(), and worker_init().
| struct rbtree_type* daemon::allow_proxy_tree |
allow proxy addr tree, allowed addresses are in the tree.
Referenced by daemon_delete(), daemon_fork(), daemon_init(), daemon_open_shared_ports(), and fr_reload_config().
| struct local_zones* daemon::local_zones |
local authority zones
Referenced by daemon_cleanup(), daemon_fork(), do_datas_add(), do_datas_remove(), do_zones_add(), do_zones_remove(), execute_cmd(), fr_reload_config(), and worker_handle_request().
| struct timeval daemon::time_last_stat |
last time of statistics printout
Referenced by daemon_init(), and print_uptime().
| struct timeval daemon::time_boot |
time when daemon started
Referenced by daemon_init(), do_status(), and print_uptime().
| int daemon::stat_time_specific |
if the timeout for statistics is attempted at specific offset.
If it is true, the stat timeout is the interval+offset, and that picks (roughly) the same time offset every time period.
Referenced by daemon_fork(), and worker_restart_timer().
| int daemon::stat_time_offset |
if the timeout is specific, what offset in the period.
Referenced by daemon_fork(), and worker_restart_timer().
| int daemon::use_response_ip |
some response-ip tags or actions are configured if true
Referenced by answer_from_cache(), daemon_fork(), fr_reload_config(), fr_worker_pickup_mesh(), worker_handle_request(), and worker_init().
| int daemon::use_rpz |
some RPZ policies are configured
Referenced by answer_from_cache(), daemon_fork(), fr_reload_config(), fr_worker_pickup_mesh(), worker_handle_request(), and worker_init().
| struct doq_table* daemon::doq_table |
the doq connection table
Referenced by daemon_cleanup(), daemon_create_workers(), server_stats_compile(), and worker_init().
| int daemon::reuse_cache |
reuse existing cache on reload if other conditions allow it.
Referenced by daemon_cleanup(), and daemon_fork().
| struct cookie_secrets* daemon::cookie_secrets |
the EDNS cookie secrets from the cookie-secret-file
Referenced by cookie_secret_file_dump(), daemon_delete(), daemon_fork(), do_activate_cookie_secret(), do_add_cookie_secret(), do_drop_cookie_secret(), do_print_cookie_secrets(), and worker_handle_request().
| struct fast_reload_thread* daemon::fast_reload_thread |
the fast reload thread, or NULL
Referenced by daemon_cleanup(), fast_reload_thread_setup(), fast_reload_thread_start(), fast_reload_thread_stop(), fast_reload_worker_pickup_changes(), fr_check_cmd_from_thread(), fr_main_perform_done(), fr_pickup_auth_locks(), fr_printq_remove(), fr_worker_auth_add(), fr_worker_auth_cha(), fr_worker_auth_del(), fr_worker_pickup_listen_dnsport(), fr_worker_pickup_outside_network(), and worker_send_reload_ack().
| struct fast_reload_printq* daemon::fast_reload_printq_list |
the fast reload printq list
Referenced by daemon_cleanup(), fr_printq_list_insert(), and fr_printq_list_remove().
| int daemon::fast_reload_drop_mesh |
the fast reload option to drop mesh queries, true if so.
Referenced by fast_reload_thread_setup(), fr_check_tag_datas(), fr_check_tag_defines(), fr_main_perform_reload_stop(), and worker_stop_and_wait().
| int daemon::fast_reload_tcl_has_changes |
for fast reload, if the tcl, tcp connection limits, has changes for workers
Referenced by fast_reload_worker_pickup_changes(), and fr_construct_from_config().
| char* daemon::cfgfile |
config file name
Referenced by daemon_delete(), fr_read_config(), main(), perform_setup(), run_daemon(), service_start(), and wsvc_command_option().