Symbol: daemon
games/hunt/huntd/driver.c
450
daemon(0, 0);
include/stdlib.h
282
int daemon(int, int);
lib/libc/hidden/stdlib.h
84
PROTO_DEPRECATED(daemon);
lib/libfuse/fuse.c
324
return (daemon(0, 0));
libexec/ftpd/ftpd.c
400
if (daemon(1, 1) == -1) {
libexec/rpc.rquotad/rquotad.c
75
daemon(0, 0);
libexec/rpc.rstatd/rstatd.c
104
daemon(0, 0);
libexec/rpc.rusersd/rusersd.c
98
daemon(0, 0);
libexec/rpc.rwalld/rwalld.c
88
daemon(0, 0);
libexec/snmpd/snmpd_metrics/mib.c
4380
daemon(0, 0);
libexec/spamd-setup/spamd-setup.c
858
daemon(0, 0);
libexec/spamd/spamd.c
1458
if (daemon(1, 1) == -1)
libexec/spamlogd/spamlogd.c
459
if (daemon(0, 0) == -1)
regress/lib/libagentx/main.c
318
if (daemon(0, 1) == -1)
regress/lib/libssl/interop/server.c
252
if (daemon(1, 1) == -1)
regress/sys/netinet/ipsec/nonxt-reflect.c
90
daemon(1, 1);
sbin/dhcp6leased/dhcp6leased.c
226
daemon(0, 0);
sbin/dhcpleased/dhcpleased.c
238
daemon(0, 0);
sbin/iked/proc.c
223
if (!debug && daemon(0, 0) == -1)
sbin/isakmpd/isakmpd.c
417
if (daemon(0, 0))
sbin/ldattach/ldattach.c
309
if (daemon(0, 0))
sbin/mountd/mountd.c
276
daemon(0, 0);
sbin/nfsd/nfsd.c
158
daemon(0, 0);
sbin/pflogd/pflogd.c
662
if (daemon(0, 0)) {
sbin/resolvd/resolvd.c
203
daemon(0, 0);
sbin/slaacd/slaacd.c
200
daemon(0, 0);
sbin/unwind/libunbound/daemon/worker.h
147
struct worker* worker_create(struct daemon* daemon, int id);
sbin/unwind/libunbound/daemon/worker.h
58
struct daemon;
sbin/unwind/libunbound/daemon/worker.h
92
struct daemon* daemon;
sbin/unwind/unwind.c
207
daemon(1, 0);
usr.bin/sndiod/sndiod.c
418
if (daemon(0, 0) == -1)
usr.bin/sndiod/sndiod.c
695
if (daemon(0, 0) == -1)
usr.bin/ssh/mux.c
2094
daemon(1, 1);
usr.bin/ssh/ssh.c
1851
daemon(1, 1);
usr.bin/ssh/ssh.c
1863
if (daemon(1, 1) == -1)
usr.bin/ssh/sshd.c
1736
if (daemon(0, 0) == -1)
usr.bin/tmux/proc.c
370
if (daemon(1, 0) != 0)
usr.bin/usbhidaction/usbhidaction.c
160
if (daemon(0, 0) == -1)
usr.sbin/apmd/apmd.c
511
if (daemon(0, 0) == -1)
usr.sbin/bgpd/bgpd.c
251
daemon(1, 0);
usr.sbin/bgplgd/slowcgi.c
333
if (!debug && daemon(0, 0) == -1)
usr.sbin/bpflogd/bpflogd.c
382
if (daemon(0, 0) == -1)
usr.sbin/cron/cron.c
125
if (daemon(0, 0) == -1) {
usr.sbin/dhcpd/dhcpd.c
214
daemon(0, 0);
usr.sbin/dhcrelay/dhcrelay.c
297
if (daemon(0, 0) == -1)
usr.sbin/dhcrelay6/dhcrelay6.c
255
if (daemon(0, 0) == -1)
usr.sbin/dvmrpd/dvmrpd.c
186
daemon(1, 0);
usr.sbin/eigrpd/eigrpd.c
210
daemon(1, 0);
usr.sbin/ftp-proxy/ftp-proxy.c
774
if (daemon(0, 0) == -1)
usr.sbin/hostapd/hostapd.c
445
if (daemon(0, 0) == -1)
usr.sbin/hotplugd/hotplugd.c
106
if (daemon(0, 0) == -1)
usr.sbin/httpd/proc.c
198
if (!debug && daemon(1, 0) == -1)
usr.sbin/identd/identd.c
295
if (!debug && daemon(1, 0) == -1)
usr.sbin/ifstated/ifstated.c
145
daemon(1, 0);
usr.sbin/inetd/inetd.c
341
daemon(0, 0);
usr.sbin/iscsid/iscsid.c
117
daemon(1, 0);
usr.sbin/ldapd/ldapd.c
206
if (daemon(1, 0) == -1)
usr.sbin/ldomd/ldomd.c
154
if (daemon(0, 0))
usr.sbin/ldpd/ldpd.c
206
daemon(1, 0);
usr.sbin/lpd/lpd.c
151
if (daemon(1, 0) == -1)
usr.sbin/lpr/lpd/lpd.c
245
daemon(0, 0);
usr.sbin/mopd/mopd/mopd.c
123
if (daemon(0, 0) == -1)
usr.sbin/npppd/npppd/npppd.c
173
daemon(0, 0);
usr.sbin/ntpd/ntpd.c
247
if (daemon(1, 0))
usr.sbin/ntpd/ntpd.c
332
if (daemon(1, 0))
usr.sbin/ntpd/ntpd.c
435
if (daemon(1, 0))
usr.sbin/ospf6d/ospf6d.c
217
daemon(1, 0);
usr.sbin/ospfd/ospfd.c
226
daemon(1, 0);
usr.sbin/portmap/portmap.c
121
if (!debugging && daemon(0, 0)) {
usr.sbin/pppd/main.c
612
if (daemon(0, 0) < 0) {
usr.sbin/pppd/pppd.h
310
int daemon(int, int); /* Detach us from terminal session */
usr.sbin/rad/rad.c
208
daemon(1, 0);
usr.sbin/radiusd/radiusd.c
160
daemon(0, 1); /* pend closing stdio files */
usr.sbin/rarpd/rarpd.c
149
if (daemon(0, 0) == -1)
usr.sbin/rbootd/rbootd.c
123
if (daemon(0, 0))
usr.sbin/relayd/proc.c
198
if (!debug && daemon(1, 0) == -1)
usr.sbin/ripd/ripd.c
194
daemon(1, 0);
usr.sbin/route6d/route6d.c
302
if (daemon(0, 0) == -1) {
usr.sbin/rpc.bootparamd/bootparamd.c
116
if (daemon(0, 0))
usr.sbin/rpc.lockd/lockd.c
154
if (daemon(0, 0) == -1) {
usr.sbin/rpc.statd/statd.c
130
daemon(0, 0);
usr.sbin/sasyncd/sasyncd.c
225
if (daemon(1, 0)) {
usr.sbin/sensorsd/sensorsd.c
165
if (debug == 0 && daemon(1, 0) == -1)
usr.sbin/slowcgi/slowcgi.c
333
if (!debug && daemon(0, 0) == -1)
usr.sbin/smtpd/smtpd.c
683
if (daemon(0, 0) == -1)
usr.sbin/snmpd/proc.c
223
if (!debug && daemon(0, 0) == -1)
usr.sbin/tftp-proxy/tftp-proxy.c
282
if (daemon(1, 0) == -1)
usr.sbin/unbound/daemon/daemon.c
1005
log_assert(daemon);
usr.sbin/unbound/daemon/daemon.c
1006
daemon_reload_sslctxs(daemon);
usr.sbin/unbound/daemon/daemon.c
1007
if(!(daemon->env->views = views_create()))
usr.sbin/unbound/daemon/daemon.c
1010
if(!views_apply_cfg(daemon->env->views, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
1013
if(!acl_list_apply_cfg(daemon->acl, daemon->cfg, daemon->env->views))
usr.sbin/unbound/daemon/daemon.c
1015
if(!acl_interface_apply_cfg(daemon->acl_interface, daemon->cfg,
usr.sbin/unbound/daemon/daemon.c
1016
daemon->env->views))
usr.sbin/unbound/daemon/daemon.c
1018
if(!tcl_list_apply_cfg(daemon->tcl, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
1020
if(daemon->cfg->dnscrypt) {
usr.sbin/unbound/daemon/daemon.c
1022
daemon->dnscenv = dnsc_create();
usr.sbin/unbound/daemon/daemon.c
1023
if (!daemon->dnscenv)
usr.sbin/unbound/daemon/daemon.c
1025
dnsc_apply_cfg(daemon->dnscenv, daemon->cfg);
usr.sbin/unbound/daemon/daemon.c
1031
if(daemon->cfg->cookie_secret_file &&
usr.sbin/unbound/daemon/daemon.c
1032
daemon->cfg->cookie_secret_file[0]) {
usr.sbin/unbound/daemon/daemon.c
1033
if(!(daemon->cookie_secrets = cookie_secrets_create()))
usr.sbin/unbound/daemon/daemon.c
1035
if(!cookie_secrets_apply_cfg(daemon->cookie_secrets,
usr.sbin/unbound/daemon/daemon.c
1036
daemon->cfg->cookie_secret_file))
usr.sbin/unbound/daemon/daemon.c
1040
if(!(daemon->local_zones = local_zones_create()))
usr.sbin/unbound/daemon/daemon.c
1042
if(!local_zones_apply_cfg(daemon->local_zones, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
1044
if(!(daemon->env->fwds = forwards_create()) ||
usr.sbin/unbound/daemon/daemon.c
1045
!forwards_apply_cfg(daemon->env->fwds, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
1047
if(!(daemon->env->hints = hints_create()) ||
usr.sbin/unbound/daemon/daemon.c
1048
!hints_apply_cfg(daemon->env->hints, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
1052
if(!(daemon->env->respip_set = respip_set_create()))
usr.sbin/unbound/daemon/daemon.c
1054
if(!respip_global_apply_cfg(daemon->env->respip_set, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
1056
if(!respip_views_apply_cfg(daemon->env->views, daemon->cfg,
usr.sbin/unbound/daemon/daemon.c
1059
daemon->use_response_ip = !respip_set_is_empty(
usr.sbin/unbound/daemon/daemon.c
1060
daemon->env->respip_set) || have_view_respip_cfg;
usr.sbin/unbound/daemon/daemon.c
1063
daemon_setup_modules(daemon);
usr.sbin/unbound/daemon/daemon.c
1066
if(!auth_zones_apply_cfg(daemon->env->auth_zones, daemon->cfg, 1,
usr.sbin/unbound/daemon/daemon.c
1067
&daemon->use_rpz, daemon->env, &daemon->mods))
usr.sbin/unbound/daemon/daemon.c
1071
if(!edns_strings_apply_cfg(daemon->env->edns_strings, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
1075
daemon->env->cachedb_enabled = cachedb_is_enabled(&daemon->mods,
usr.sbin/unbound/daemon/daemon.c
1076
daemon->env);
usr.sbin/unbound/daemon/daemon.c
1081
if(daemon->use_response_ip &&
usr.sbin/unbound/daemon/daemon.c
1082
modstack_find(&daemon->mods, "respip") < 0)
usr.sbin/unbound/daemon/daemon.c
1087
if(daemon->use_rpz &&
usr.sbin/unbound/daemon/daemon.c
1088
modstack_find(&daemon->mods, "respip") < 0)
usr.sbin/unbound/daemon/daemon.c
1094
daemon_create_workers(daemon);
usr.sbin/unbound/daemon/daemon.c
1098
set_log_thread_id(daemon->workers[0], daemon->cfg);
usr.sbin/unbound/daemon/daemon.c
1100
if(daemon->cfg->shm_enable && daemon->cfg->stat_interval > 0) {
usr.sbin/unbound/daemon/daemon.c
1101
daemon->stat_time_specific = 1;
usr.sbin/unbound/daemon/daemon.c
1102
daemon->stat_time_offset =
usr.sbin/unbound/daemon/daemon.c
1103
((int)time(NULL))%daemon->cfg->stat_interval;
usr.sbin/unbound/daemon/daemon.c
1108
if(!worker_init(daemon->workers[0], daemon->cfg, daemon->ports[0], 1))
usr.sbin/unbound/daemon/daemon.c
1115
daemon_start_others(daemon);
usr.sbin/unbound/daemon/daemon.c
1122
if(!worker_init(daemon->workers[0], daemon->cfg, daemon->ports[0], 1))
usr.sbin/unbound/daemon/daemon.c
1125
signal_handling_playback(daemon->workers[0]);
usr.sbin/unbound/daemon/daemon.c
1127
if (!shm_main_init(daemon))
usr.sbin/unbound/daemon/daemon.c
1140
worker_work(daemon->workers[0]);
usr.sbin/unbound/daemon/daemon.c
1142
if (daemon->workers[0]->need_to_exit)
usr.sbin/unbound/daemon/daemon.c
1150
daemon_stop_others(daemon);
usr.sbin/unbound/daemon/daemon.c
1153
shm_main_shutdown(daemon);
usr.sbin/unbound/daemon/daemon.c
1155
daemon->reuse_cache = daemon->workers[0]->reuse_cache;
usr.sbin/unbound/daemon/daemon.c
1156
daemon->need_to_exit = daemon->workers[0]->need_to_exit;
usr.sbin/unbound/daemon/daemon.c
1160
daemon_cleanup(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
1163
log_assert(daemon);
usr.sbin/unbound/daemon/daemon.c
1175
if(!daemon->reuse_cache || daemon->need_to_exit) {
usr.sbin/unbound/daemon/daemon.c
1176
slabhash_clear(&daemon->env->rrset_cache->table);
usr.sbin/unbound/daemon/daemon.c
1177
slabhash_clear(daemon->env->msg_cache);
usr.sbin/unbound/daemon/daemon.c
1179
daemon->old_num = daemon->num; /* save the current num */
usr.sbin/unbound/daemon/daemon.c
1180
forwards_delete(daemon->env->fwds);
usr.sbin/unbound/daemon/daemon.c
1181
daemon->env->fwds = NULL;
usr.sbin/unbound/daemon/daemon.c
1182
hints_delete(daemon->env->hints);
usr.sbin/unbound/daemon/daemon.c
1183
daemon->env->hints = NULL;
usr.sbin/unbound/daemon/daemon.c
1184
local_zones_delete(daemon->local_zones);
usr.sbin/unbound/daemon/daemon.c
1185
daemon->local_zones = NULL;
usr.sbin/unbound/daemon/daemon.c
1186
respip_set_delete(daemon->env->respip_set);
usr.sbin/unbound/daemon/daemon.c
1187
daemon->env->respip_set = NULL;
usr.sbin/unbound/daemon/daemon.c
1188
views_delete(daemon->env->views);
usr.sbin/unbound/daemon/daemon.c
1189
daemon->env->views = NULL;
usr.sbin/unbound/daemon/daemon.c
1190
if(daemon->env->auth_zones)
usr.sbin/unbound/daemon/daemon.c
1191
auth_zones_cleanup(daemon->env->auth_zones);
usr.sbin/unbound/daemon/daemon.c
1193
daemon_remote_clear(daemon->rc);
usr.sbin/unbound/daemon/daemon.c
1194
if(daemon->fast_reload_thread)
usr.sbin/unbound/daemon/daemon.c
1195
fast_reload_thread_stop(daemon->fast_reload_thread);
usr.sbin/unbound/daemon/daemon.c
1196
if(daemon->fast_reload_printq_list)
usr.sbin/unbound/daemon/daemon.c
1197
fast_reload_printq_list_delete(daemon->fast_reload_printq_list);
usr.sbin/unbound/daemon/daemon.c
1198
for(i=0; i<daemon->num; i++)
usr.sbin/unbound/daemon/daemon.c
1199
worker_delete(daemon->workers[i]);
usr.sbin/unbound/daemon/daemon.c
1200
free(daemon->workers);
usr.sbin/unbound/daemon/daemon.c
1201
daemon->workers = NULL;
usr.sbin/unbound/daemon/daemon.c
1206
if(!daemon->reuse_cache || daemon->need_to_exit)
usr.sbin/unbound/daemon/daemon.c
1207
daemon_clear_allocs(daemon);
usr.sbin/unbound/daemon/daemon.c
1208
daemon->num = 0;
usr.sbin/unbound/daemon/daemon.c
1209
shared_ports_delete(daemon->shared_ports);
usr.sbin/unbound/daemon/daemon.c
1210
daemon->shared_ports = NULL;
usr.sbin/unbound/daemon/daemon.c
1212
dt_delete(daemon->dtenv);
usr.sbin/unbound/daemon/daemon.c
1213
daemon->dtenv = NULL;
usr.sbin/unbound/daemon/daemon.c
1216
dnsc_delete(daemon->dnscenv);
usr.sbin/unbound/daemon/daemon.c
1217
daemon->dnscenv = NULL;
usr.sbin/unbound/daemon/daemon.c
1220
if (daemon->doq_table) {
usr.sbin/unbound/daemon/daemon.c
1221
doq_table_delete(daemon->doq_table);
usr.sbin/unbound/daemon/daemon.c
1222
daemon->doq_table = NULL;
usr.sbin/unbound/daemon/daemon.c
1225
daemon->cfg = NULL;
usr.sbin/unbound/daemon/daemon.c
1229
daemon_delete(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
1232
if(!daemon)
usr.sbin/unbound/daemon/daemon.c
1234
modstack_call_deinit(&daemon->mods, daemon->env);
usr.sbin/unbound/daemon/daemon.c
1235
modstack_call_destartup(&daemon->mods, daemon->env);
usr.sbin/unbound/daemon/daemon.c
1236
modstack_free(&daemon->mods);
usr.sbin/unbound/daemon/daemon.c
1237
daemon_remote_delete(daemon->rc);
usr.sbin/unbound/daemon/daemon.c
1238
for(i = 0; i < daemon->num_ports; i++)
usr.sbin/unbound/daemon/daemon.c
1239
listening_ports_free(daemon->ports[i]);
usr.sbin/unbound/daemon/daemon.c
1240
free(daemon->ports);
usr.sbin/unbound/daemon/daemon.c
1241
listening_ports_free(daemon->rc_ports);
usr.sbin/unbound/daemon/daemon.c
1242
if(daemon->env) {
usr.sbin/unbound/daemon/daemon.c
1243
slabhash_delete(daemon->env->msg_cache);
usr.sbin/unbound/daemon/daemon.c
1244
rrset_cache_delete(daemon->env->rrset_cache);
usr.sbin/unbound/daemon/daemon.c
1245
infra_delete(daemon->env->infra_cache);
usr.sbin/unbound/daemon/daemon.c
1246
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
1247
edns_strings_delete(daemon->env->edns_strings);
usr.sbin/unbound/daemon/daemon.c
1248
auth_zones_delete(daemon->env->auth_zones);
usr.sbin/unbound/daemon/daemon.c
1250
ub_randfree(daemon->rand);
usr.sbin/unbound/daemon/daemon.c
1251
alloc_clear(&daemon->superalloc);
usr.sbin/unbound/daemon/daemon.c
1252
acl_list_delete(daemon->acl);
usr.sbin/unbound/daemon/daemon.c
1253
acl_list_delete(daemon->acl_interface);
usr.sbin/unbound/daemon/daemon.c
1254
tcl_list_delete(daemon->tcl);
usr.sbin/unbound/daemon/daemon.c
1255
cookie_secrets_delete(daemon->cookie_secrets);
usr.sbin/unbound/daemon/daemon.c
1257
free(daemon->chroot);
usr.sbin/unbound/daemon/daemon.c
1258
free(daemon->pidfile);
usr.sbin/unbound/daemon/daemon.c
1259
free(daemon->cfgfile);
usr.sbin/unbound/daemon/daemon.c
1260
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
1261
daemon_delete_sslctxs(daemon);
usr.sbin/unbound/daemon/daemon.c
1262
free(daemon);
usr.sbin/unbound/daemon/daemon.c
1311
void daemon_apply_cfg(struct daemon* daemon, struct config_file* cfg)
usr.sbin/unbound/daemon/daemon.c
1315
daemon->cfg = cfg;
usr.sbin/unbound/daemon/daemon.c
1336
if(daemon->worker_allocs &&
usr.sbin/unbound/daemon/daemon.c
1337
(new_num != daemon->old_num ||
usr.sbin/unbound/daemon/daemon.c
1338
!slabhash_is_size(daemon->env->msg_cache, cfg->msg_cache_size,
usr.sbin/unbound/daemon/daemon.c
1340
!slabhash_is_size(&daemon->env->rrset_cache->table,
usr.sbin/unbound/daemon/daemon.c
1344
slabhash_clear(&daemon->env->rrset_cache->table);
usr.sbin/unbound/daemon/daemon.c
1345
slabhash_clear(daemon->env->msg_cache);
usr.sbin/unbound/daemon/daemon.c
1346
daemon_clear_allocs(daemon);
usr.sbin/unbound/daemon/daemon.c
1349
if(!slabhash_is_size(daemon->env->msg_cache, cfg->msg_cache_size,
usr.sbin/unbound/daemon/daemon.c
1351
slabhash_delete(daemon->env->msg_cache);
usr.sbin/unbound/daemon/daemon.c
1352
daemon->env->msg_cache = slabhash_create(cfg->msg_cache_slabs,
usr.sbin/unbound/daemon/daemon.c
1356
if(!daemon->env->msg_cache) {
usr.sbin/unbound/daemon/daemon.c
1360
if((daemon->env->rrset_cache = rrset_cache_adjust(
usr.sbin/unbound/daemon/daemon.c
1361
daemon->env->rrset_cache, cfg, &daemon->superalloc)) == 0)
usr.sbin/unbound/daemon/daemon.c
1363
if((daemon->env->infra_cache = infra_adjust(daemon->env->infra_cache,
usr.sbin/unbound/daemon/daemon.c
226
void* daemon_setup_listen_dot_sslctx(struct daemon* daemon,
usr.sbin/unbound/daemon/daemon.c
230
(void)setup_listen_sslctx(&ctx, 1, 0, cfg, daemon->chroot);
usr.sbin/unbound/daemon/daemon.c
237
void* daemon_setup_listen_doh_sslctx(struct daemon* daemon,
usr.sbin/unbound/daemon/daemon.c
241
(void)setup_listen_sslctx(&ctx, 0, 1, cfg, daemon->chroot);
usr.sbin/unbound/daemon/daemon.c
249
void* daemon_setup_listen_quic_sslctx(struct daemon* daemon,
usr.sbin/unbound/daemon/daemon.c
253
char* chroot = daemon->chroot;
usr.sbin/unbound/daemon/daemon.c
270
void* daemon_setup_connect_dot_sslctx(struct daemon* daemon,
usr.sbin/unbound/daemon/daemon.c
274
char* bundle, *chroot = daemon->chroot;
usr.sbin/unbound/daemon/daemon.c
288
daemon_setup_sslctxs(struct daemon* daemon, struct config_file* cfg)
usr.sbin/unbound/daemon/daemon.c
291
char* chroot = daemon->chroot;
usr.sbin/unbound/daemon/daemon.c
309
daemon->listen_dot_sslctx = daemon_setup_listen_dot_sslctx(
usr.sbin/unbound/daemon/daemon.c
310
daemon, cfg);
usr.sbin/unbound/daemon/daemon.c
313
daemon->listen_doh_sslctx =
usr.sbin/unbound/daemon/daemon.c
314
daemon_setup_listen_doh_sslctx(daemon, cfg);
usr.sbin/unbound/daemon/daemon.c
319
daemon->listen_quic_sslctx =
usr.sbin/unbound/daemon/daemon.c
320
daemon_setup_listen_quic_sslctx(daemon, cfg);
usr.sbin/unbound/daemon/daemon.c
325
daemon->ssl_service_key = strdup(cfg->ssl_service_key);
usr.sbin/unbound/daemon/daemon.c
326
if(!daemon->ssl_service_key)
usr.sbin/unbound/daemon/daemon.c
329
daemon->ssl_service_pem = strdup(cfg->ssl_service_pem);
usr.sbin/unbound/daemon/daemon.c
330
if(!daemon->ssl_service_pem)
usr.sbin/unbound/daemon/daemon.c
333
daemon->ssl_service_pem = NULL;
usr.sbin/unbound/daemon/daemon.c
336
&daemon->mtime_ssl_service_key,
usr.sbin/unbound/daemon/daemon.c
337
&daemon->mtime_ns_ssl_service_key, NULL))
usr.sbin/unbound/daemon/daemon.c
342
&daemon->mtime_ssl_service_pem,
usr.sbin/unbound/daemon/daemon.c
343
&daemon->mtime_ns_ssl_service_pem, NULL))
usr.sbin/unbound/daemon/daemon.c
347
daemon->mtime_ssl_service_pem = 0;
usr.sbin/unbound/daemon/daemon.c
348
daemon->mtime_ns_ssl_service_pem = 0;
usr.sbin/unbound/daemon/daemon.c
351
daemon->connect_dot_sslctx = daemon_setup_connect_dot_sslctx(
usr.sbin/unbound/daemon/daemon.c
352
daemon, cfg);
usr.sbin/unbound/daemon/daemon.c
354
(void)daemon;(void)cfg;
usr.sbin/unbound/daemon/daemon.c
360
daemon_delete_sslctxs(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
364
SSL_CTX_free((SSL_CTX*)daemon->listen_dot_sslctx);
usr.sbin/unbound/daemon/daemon.c
365
daemon->listen_dot_sslctx = NULL;
usr.sbin/unbound/daemon/daemon.c
366
SSL_CTX_free((SSL_CTX*)daemon->listen_doh_sslctx);
usr.sbin/unbound/daemon/daemon.c
367
daemon->listen_doh_sslctx = NULL;
usr.sbin/unbound/daemon/daemon.c
368
SSL_CTX_free((SSL_CTX*)daemon->connect_dot_sslctx);
usr.sbin/unbound/daemon/daemon.c
369
daemon->connect_dot_sslctx = NULL;
usr.sbin/unbound/daemon/daemon.c
370
free(daemon->ssl_service_key);
usr.sbin/unbound/daemon/daemon.c
371
daemon->ssl_service_key = NULL;
usr.sbin/unbound/daemon/daemon.c
372
free(daemon->ssl_service_pem);
usr.sbin/unbound/daemon/daemon.c
373
daemon->ssl_service_pem = NULL;
usr.sbin/unbound/daemon/daemon.c
375
(void)daemon;
usr.sbin/unbound/daemon/daemon.c
378
SSL_CTX_free((SSL_CTX*)daemon->listen_quic_sslctx);
usr.sbin/unbound/daemon/daemon.c
379
daemon->listen_quic_sslctx = NULL;
usr.sbin/unbound/daemon/daemon.c
384
ssl_cert_changed(struct daemon* daemon, struct config_file* cfg)
usr.sbin/unbound/daemon/daemon.c
388
char* chroot = daemon->chroot;
usr.sbin/unbound/daemon/daemon.c
391
log_assert(daemon->ssl_service_key && cfg->ssl_service_key);
usr.sbin/unbound/daemon/daemon.c
397
if(strcmp(daemon->ssl_service_key, cfg->ssl_service_key) != 0)
usr.sbin/unbound/daemon/daemon.c
399
if(daemon->ssl_service_pem && cfg->ssl_service_pem &&
usr.sbin/unbound/daemon/daemon.c
400
strcmp(daemon->ssl_service_pem, cfg->ssl_service_pem) != 0)
usr.sbin/unbound/daemon/daemon.c
409
if(mtime != daemon->mtime_ssl_service_key ||
usr.sbin/unbound/daemon/daemon.c
410
ns != daemon->mtime_ns_ssl_service_key)
usr.sbin/unbound/daemon/daemon.c
420
if(mtime != daemon->mtime_ssl_service_pem ||
usr.sbin/unbound/daemon/daemon.c
421
ns != daemon->mtime_ns_ssl_service_pem)
usr.sbin/unbound/daemon/daemon.c
429
daemon_reload_sslctxs(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
432
if(daemon->cfg->ssl_service_key && daemon->cfg->ssl_service_key[0]) {
usr.sbin/unbound/daemon/daemon.c
434
if(!daemon->ssl_service_key ||
usr.sbin/unbound/daemon/daemon.c
435
ssl_cert_changed(daemon,daemon->cfg)) {
usr.sbin/unbound/daemon/daemon.c
437
daemon_delete_sslctxs(daemon);
usr.sbin/unbound/daemon/daemon.c
438
daemon_setup_sslctxs(daemon, daemon->cfg);
usr.sbin/unbound/daemon/daemon.c
442
if(daemon->ssl_service_key) {
usr.sbin/unbound/daemon/daemon.c
444
daemon_delete_sslctxs(daemon);
usr.sbin/unbound/daemon/daemon.c
448
(void)daemon;
usr.sbin/unbound/daemon/daemon.c
452
struct daemon*
usr.sbin/unbound/daemon/daemon.c
455
struct daemon* daemon = (struct daemon*)calloc(1,
usr.sbin/unbound/daemon/daemon.c
456
sizeof(struct daemon));
usr.sbin/unbound/daemon/daemon.c
461
if(!daemon)
usr.sbin/unbound/daemon/daemon.c
519
daemon->need_to_exit = 0;
usr.sbin/unbound/daemon/daemon.c
520
modstack_init(&daemon->mods);
usr.sbin/unbound/daemon/daemon.c
521
if(!(daemon->env = (struct module_env*)calloc(1,
usr.sbin/unbound/daemon/daemon.c
522
sizeof(*daemon->env)))) {
usr.sbin/unbound/daemon/daemon.c
523
free(daemon);
usr.sbin/unbound/daemon/daemon.c
526
daemon->env->modstack = &daemon->mods;
usr.sbin/unbound/daemon/daemon.c
528
if(!edns_known_options_init(daemon->env)) {
usr.sbin/unbound/daemon/daemon.c
529
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
530
free(daemon);
usr.sbin/unbound/daemon/daemon.c
533
alloc_init(&daemon->superalloc, NULL, 0);
usr.sbin/unbound/daemon/daemon.c
534
daemon->acl = acl_list_create();
usr.sbin/unbound/daemon/daemon.c
535
if(!daemon->acl) {
usr.sbin/unbound/daemon/daemon.c
536
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
537
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
538
free(daemon);
usr.sbin/unbound/daemon/daemon.c
541
daemon->acl_interface = acl_list_create();
usr.sbin/unbound/daemon/daemon.c
542
if(!daemon->acl_interface) {
usr.sbin/unbound/daemon/daemon.c
543
acl_list_delete(daemon->acl);
usr.sbin/unbound/daemon/daemon.c
544
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
545
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
546
free(daemon);
usr.sbin/unbound/daemon/daemon.c
549
daemon->tcl = tcl_list_create();
usr.sbin/unbound/daemon/daemon.c
550
if(!daemon->tcl) {
usr.sbin/unbound/daemon/daemon.c
551
acl_list_delete(daemon->acl_interface);
usr.sbin/unbound/daemon/daemon.c
552
acl_list_delete(daemon->acl);
usr.sbin/unbound/daemon/daemon.c
553
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
554
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
555
free(daemon);
usr.sbin/unbound/daemon/daemon.c
559
if(gettimeofday(&daemon->time_boot, NULL) < 0)
usr.sbin/unbound/daemon/daemon.c
561
daemon->time_last_stat = daemon->time_boot;
usr.sbin/unbound/daemon/daemon.c
562
if((daemon->env->auth_zones = auth_zones_create()) == 0) {
usr.sbin/unbound/daemon/daemon.c
563
acl_list_delete(daemon->acl_interface);
usr.sbin/unbound/daemon/daemon.c
564
acl_list_delete(daemon->acl);
usr.sbin/unbound/daemon/daemon.c
565
tcl_list_delete(daemon->tcl);
usr.sbin/unbound/daemon/daemon.c
566
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
567
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
568
free(daemon);
usr.sbin/unbound/daemon/daemon.c
571
if(!(daemon->env->edns_strings = edns_strings_create())) {
usr.sbin/unbound/daemon/daemon.c
572
auth_zones_delete(daemon->env->auth_zones);
usr.sbin/unbound/daemon/daemon.c
573
acl_list_delete(daemon->acl_interface);
usr.sbin/unbound/daemon/daemon.c
574
acl_list_delete(daemon->acl);
usr.sbin/unbound/daemon/daemon.c
575
tcl_list_delete(daemon->tcl);
usr.sbin/unbound/daemon/daemon.c
576
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
577
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
578
free(daemon);
usr.sbin/unbound/daemon/daemon.c
581
return daemon;
usr.sbin/unbound/daemon/daemon.c
605
daemon_open_shared_ports(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
607
log_assert(daemon);
usr.sbin/unbound/daemon/daemon.c
608
if(daemon->cfg->port != daemon->listening_port) {
usr.sbin/unbound/daemon/daemon.c
613
daemon->reuseport = 0;
usr.sbin/unbound/daemon/daemon.c
615
if(daemon->ports != NULL) {
usr.sbin/unbound/daemon/daemon.c
616
for(i=0; i<daemon->num_ports; i++)
usr.sbin/unbound/daemon/daemon.c
617
listening_ports_free(daemon->ports[i]);
usr.sbin/unbound/daemon/daemon.c
618
free(daemon->ports);
usr.sbin/unbound/daemon/daemon.c
619
daemon->ports = NULL;
usr.sbin/unbound/daemon/daemon.c
622
acl_interface_init(daemon->acl_interface);
usr.sbin/unbound/daemon/daemon.c
623
if(!resolve_interface_names(daemon->cfg->ifs,
usr.sbin/unbound/daemon/daemon.c
624
daemon->cfg->num_ifs, NULL, &resif, &num_resif))
usr.sbin/unbound/daemon/daemon.c
628
if(daemon->cfg->so_reuseport && daemon->cfg->num_threads > 0)
usr.sbin/unbound/daemon/daemon.c
629
daemon->reuseport = 1;
usr.sbin/unbound/daemon/daemon.c
632
p0 = listening_ports_open(daemon->cfg, resif, num_resif,
usr.sbin/unbound/daemon/daemon.c
633
&daemon->reuseport);
usr.sbin/unbound/daemon/daemon.c
639
if(daemon->reuseport) {
usr.sbin/unbound/daemon/daemon.c
641
daemon->num_ports = (size_t)daemon->cfg->num_threads;
usr.sbin/unbound/daemon/daemon.c
645
daemon->num_ports = 1;
usr.sbin/unbound/daemon/daemon.c
647
if(!(daemon->ports = (struct listen_port**)calloc(
usr.sbin/unbound/daemon/daemon.c
648
daemon->num_ports, sizeof(*daemon->ports)))) {
usr.sbin/unbound/daemon/daemon.c
653
daemon->ports[0] = p0;
usr.sbin/unbound/daemon/daemon.c
654
if(!setup_acl_for_ports(daemon->acl_interface,
usr.sbin/unbound/daemon/daemon.c
655
daemon->ports[0])) {
usr.sbin/unbound/daemon/daemon.c
660
if(daemon->reuseport) {
usr.sbin/unbound/daemon/daemon.c
662
for(i=1; i<daemon->num_ports; i++) {
usr.sbin/unbound/daemon/daemon.c
663
if(!(daemon->ports[i]=
usr.sbin/unbound/daemon/daemon.c
664
listening_ports_open(daemon->cfg,
usr.sbin/unbound/daemon/daemon.c
666
&daemon->reuseport))
usr.sbin/unbound/daemon/daemon.c
667
|| !daemon->reuseport ) {
usr.sbin/unbound/daemon/daemon.c
668
for(i=0; i<daemon->num_ports; i++)
usr.sbin/unbound/daemon/daemon.c
669
listening_ports_free(daemon->ports[i]);
usr.sbin/unbound/daemon/daemon.c
670
free(daemon->ports);
usr.sbin/unbound/daemon/daemon.c
671
daemon->ports = NULL;
usr.sbin/unbound/daemon/daemon.c
675
if(!setup_acl_for_ports(daemon->acl_interface,
usr.sbin/unbound/daemon/daemon.c
676
daemon->ports[i])) {
usr.sbin/unbound/daemon/daemon.c
677
for(i=0; i<daemon->num_ports; i++)
usr.sbin/unbound/daemon/daemon.c
678
listening_ports_free(daemon->ports[i]);
usr.sbin/unbound/daemon/daemon.c
679
free(daemon->ports);
usr.sbin/unbound/daemon/daemon.c
680
daemon->ports = NULL;
usr.sbin/unbound/daemon/daemon.c
687
daemon->listening_port = daemon->cfg->port;
usr.sbin/unbound/daemon/daemon.c
689
if(!daemon->cfg->remote_control_enable && daemon->rc_port) {
usr.sbin/unbound/daemon/daemon.c
690
listening_ports_free(daemon->rc_ports);
usr.sbin/unbound/daemon/daemon.c
691
daemon->rc_ports = NULL;
usr.sbin/unbound/daemon/daemon.c
692
daemon->rc_port = 0;
usr.sbin/unbound/daemon/daemon.c
694
if(daemon->cfg->remote_control_enable &&
usr.sbin/unbound/daemon/daemon.c
695
daemon->cfg->control_port != daemon->rc_port) {
usr.sbin/unbound/daemon/daemon.c
696
listening_ports_free(daemon->rc_ports);
usr.sbin/unbound/daemon/daemon.c
697
if(!(daemon->rc_ports=daemon_remote_open_ports(daemon->cfg)))
usr.sbin/unbound/daemon/daemon.c
699
daemon->rc_port = daemon->cfg->control_port;
usr.sbin/unbound/daemon/daemon.c
705
daemon_privileged(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
707
daemon->env->cfg = daemon->cfg;
usr.sbin/unbound/daemon/daemon.c
708
daemon->env->alloc = &daemon->superalloc;
usr.sbin/unbound/daemon/daemon.c
709
daemon->env->worker = NULL;
usr.sbin/unbound/daemon/daemon.c
710
if(!modstack_call_startup(&daemon->mods, daemon->cfg->module_conf,
usr.sbin/unbound/daemon/daemon.c
711
daemon->env)) {
usr.sbin/unbound/daemon/daemon.c
721
static void daemon_setup_modules(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
723
daemon->env->cfg = daemon->cfg;
usr.sbin/unbound/daemon/daemon.c
724
daemon->env->alloc = &daemon->superalloc;
usr.sbin/unbound/daemon/daemon.c
725
daemon->env->worker = NULL;
usr.sbin/unbound/daemon/daemon.c
726
if(daemon->mods_inited) {
usr.sbin/unbound/daemon/daemon.c
727
modstack_call_deinit(&daemon->mods, daemon->env);
usr.sbin/unbound/daemon/daemon.c
729
daemon->env->need_to_validate = 0; /* set by module init below */
usr.sbin/unbound/daemon/daemon.c
730
if(!modstack_call_init(&daemon->mods, daemon->cfg->module_conf,
usr.sbin/unbound/daemon/daemon.c
731
daemon->env)) {
usr.sbin/unbound/daemon/daemon.c
734
daemon->mods_inited = 1;
usr.sbin/unbound/daemon/daemon.c
735
log_edns_known_options(VERB_ALGO, daemon->env);
usr.sbin/unbound/daemon/daemon.c
745
static int daemon_get_shufport(struct daemon* daemon, int* shufport)
usr.sbin/unbound/daemon/daemon.c
750
if(daemon->cfg->outgoing_avail_ports[i]) {
usr.sbin/unbound/daemon/daemon.c
751
shufport[avail++] = daemon->cfg->
usr.sbin/unbound/daemon/daemon.c
761
k = ub_random_max(daemon->rand, n+1); /* 0<= k<= n */
usr.sbin/unbound/daemon/daemon.c
776
daemon_clear_allocs(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
783
for(i=0; i<daemon->old_num; i++) {
usr.sbin/unbound/daemon/daemon.c
784
alloc_clear(daemon->worker_allocs[i]);
usr.sbin/unbound/daemon/daemon.c
785
free(daemon->worker_allocs[i]);
usr.sbin/unbound/daemon/daemon.c
787
free(daemon->worker_allocs);
usr.sbin/unbound/daemon/daemon.c
788
daemon->worker_allocs = NULL;
usr.sbin/unbound/daemon/daemon.c
790
alloc_clear_special(&daemon->superalloc);
usr.sbin/unbound/daemon/daemon.c
801
daemon_create_workers(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
805
log_assert(daemon && daemon->cfg);
usr.sbin/unbound/daemon/daemon.c
806
if(!daemon->rand) {
usr.sbin/unbound/daemon/daemon.c
807
daemon->rand = ub_initstate(NULL);
usr.sbin/unbound/daemon/daemon.c
808
if(!daemon->rand)
usr.sbin/unbound/daemon/daemon.c
810
hash_set_raninit((uint32_t)ub_random(daemon->rand));
usr.sbin/unbound/daemon/daemon.c
815
numport = daemon_get_shufport(daemon, shufport);
usr.sbin/unbound/daemon/daemon.c
817
if(!(daemon->shared_ports = shared_ports_create(daemon->cfg->out_ifs,
usr.sbin/unbound/daemon/daemon.c
818
daemon->cfg->num_out_ifs, daemon->cfg->do_ip4,
usr.sbin/unbound/daemon/daemon.c
819
daemon->cfg->do_ip6, shufport, numport)))
usr.sbin/unbound/daemon/daemon.c
823
if (cfg_has_quic(daemon->cfg)) {
usr.sbin/unbound/daemon/daemon.c
824
daemon->doq_table = doq_table_create(daemon->cfg, daemon->rand);
usr.sbin/unbound/daemon/daemon.c
825
if(!daemon->doq_table)
usr.sbin/unbound/daemon/daemon.c
830
daemon->num = (daemon->cfg->num_threads?daemon->cfg->num_threads:1);
usr.sbin/unbound/daemon/daemon.c
831
if(daemon->reuseport && (int)daemon->num < (int)daemon->num_ports) {
usr.sbin/unbound/daemon/daemon.c
833
"so continuing with %d threads.", (int)daemon->num,
usr.sbin/unbound/daemon/daemon.c
834
(int)daemon->num_ports);
usr.sbin/unbound/daemon/daemon.c
835
daemon->num = (int)daemon->num_ports;
usr.sbin/unbound/daemon/daemon.c
837
daemon->workers = (struct worker**)calloc((size_t)daemon->num,
usr.sbin/unbound/daemon/daemon.c
839
if(!daemon->workers)
usr.sbin/unbound/daemon/daemon.c
841
if(daemon->cfg->dnstap) {
usr.sbin/unbound/daemon/daemon.c
843
daemon->dtenv = dt_create(daemon->cfg);
usr.sbin/unbound/daemon/daemon.c
844
if (!daemon->dtenv)
usr.sbin/unbound/daemon/daemon.c
850
for(i=0; i<daemon->num; i++) {
usr.sbin/unbound/daemon/daemon.c
851
if(!(daemon->workers[i] = worker_create(daemon, i)))
usr.sbin/unbound/daemon/daemon.c
855
if(!daemon->worker_allocs) {
usr.sbin/unbound/daemon/daemon.c
856
daemon->worker_allocs = (struct alloc_cache**)calloc(
usr.sbin/unbound/daemon/daemon.c
857
(size_t)daemon->num, sizeof(struct alloc_cache*));
usr.sbin/unbound/daemon/daemon.c
858
if(!daemon->worker_allocs)
usr.sbin/unbound/daemon/daemon.c
860
for(i=0; i<daemon->num; i++) {
usr.sbin/unbound/daemon/daemon.c
865
alloc_init(alloc, &daemon->superalloc, i);
usr.sbin/unbound/daemon/daemon.c
866
daemon->worker_allocs[i] = alloc;
usr.sbin/unbound/daemon/daemon.c
878
static void close_other_pipes(struct daemon* daemon, int thr)
usr.sbin/unbound/daemon/daemon.c
881
for(i=0; i<daemon->num; i++)
usr.sbin/unbound/daemon/daemon.c
885
tube_close_read(daemon->workers[i]->cmd);
usr.sbin/unbound/daemon/daemon.c
888
tube_delete(daemon->workers[i]->cmd);
usr.sbin/unbound/daemon/daemon.c
889
daemon->workers[i]->cmd = NULL;
usr.sbin/unbound/daemon/daemon.c
925
set_log_thread_id(worker, worker->daemon->cfg);
usr.sbin/unbound/daemon/daemon.c
936
close_other_pipes(worker->daemon, worker->thread_num);
usr.sbin/unbound/daemon/daemon.c
939
if(worker->daemon->cfg->so_reuseport)
usr.sbin/unbound/daemon/daemon.c
940
port_num = worker->thread_num % worker->daemon->num_ports;
usr.sbin/unbound/daemon/daemon.c
944
if(!worker_init(worker, worker->daemon->cfg,
usr.sbin/unbound/daemon/daemon.c
945
worker->daemon->ports[port_num], 0))
usr.sbin/unbound/daemon/daemon.c
957
daemon_start_others(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
960
log_assert(daemon);
usr.sbin/unbound/daemon/daemon.c
963
for(i=1; i<daemon->num; i++) {
usr.sbin/unbound/daemon/daemon.c
964
ub_thread_create(&daemon->workers[i]->thr_id,
usr.sbin/unbound/daemon/daemon.c
965
thread_start, daemon->workers[i]);
usr.sbin/unbound/daemon/daemon.c
968
tube_close_read(daemon->workers[i]->cmd);
usr.sbin/unbound/daemon/daemon.c
978
daemon_stop_others(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
981
log_assert(daemon);
usr.sbin/unbound/daemon/daemon.c
985
for(i=1; i<daemon->num; i++) {
usr.sbin/unbound/daemon/daemon.c
986
worker_send_cmd(daemon->workers[i], worker_cmd_quit);
usr.sbin/unbound/daemon/daemon.c
989
for(i=1; i<daemon->num; i++) {
usr.sbin/unbound/daemon/daemon.c
992
ub_thread_join(daemon->workers[i]->thr_id);
usr.sbin/unbound/daemon/daemon.c
998
daemon_fork(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.h
200
struct daemon* daemon_init(void);
usr.sbin/unbound/daemon/daemon.h
208
int daemon_open_shared_ports(struct daemon* daemon);
usr.sbin/unbound/daemon/daemon.h
217
int daemon_privileged(struct daemon* daemon);
usr.sbin/unbound/daemon/daemon.h
224
void daemon_fork(struct daemon* daemon);
usr.sbin/unbound/daemon/daemon.h
231
void daemon_cleanup(struct daemon* daemon);
usr.sbin/unbound/daemon/daemon.h
237
void daemon_delete(struct daemon* daemon);
usr.sbin/unbound/daemon/daemon.h
244
void daemon_apply_cfg(struct daemon* daemon, struct config_file* cfg);
usr.sbin/unbound/daemon/daemon.h
255
void daemon_setup_sslctxs(struct daemon* daemon, struct config_file* cfg);
usr.sbin/unbound/daemon/daemon.h
258
int ssl_cert_changed(struct daemon* daemon, struct config_file* cfg);
usr.sbin/unbound/daemon/daemon.h
261
void* daemon_setup_listen_dot_sslctx(struct daemon* daemon,
usr.sbin/unbound/daemon/daemon.h
265
void* daemon_setup_listen_doh_sslctx(struct daemon* daemon,
usr.sbin/unbound/daemon/daemon.h
269
void* daemon_setup_listen_quic_sslctx(struct daemon* daemon,
usr.sbin/unbound/daemon/daemon.h
273
void* daemon_setup_connect_dot_sslctx(struct daemon* daemon,
usr.sbin/unbound/daemon/remote.c
1004
timeval_subtract(&up, &now, &worker->daemon->time_boot);
usr.sbin/unbound/daemon/remote.c
1005
timeval_subtract(&dt, &now, &worker->daemon->time_last_stat);
usr.sbin/unbound/daemon/remote.c
1007
worker->daemon->time_last_stat = now;
usr.sbin/unbound/daemon/remote.c
1245
struct daemon* daemon = worker->daemon;
usr.sbin/unbound/daemon/remote.c
1250
log_assert(daemon->num > 0);
usr.sbin/unbound/daemon/remote.c
1252
for(i=0; i<daemon->num; i++) {
usr.sbin/unbound/daemon/remote.c
1253
server_stats_obtain(worker, daemon->workers[i], &s, reset);
usr.sbin/unbound/daemon/remote.c
1261
total.mesh_time_median /= (double)daemon->num;
usr.sbin/unbound/daemon/remote.c
1266
if(daemon->cfg->stat_extended) {
usr.sbin/unbound/daemon/remote.c
1267
if(!print_mem(ssl, worker, daemon, &total))
usr.sbin/unbound/daemon/remote.c
1271
if(!print_ext(ssl, &total, daemon->cfg->stat_inhibit_zero))
usr.sbin/unbound/daemon/remote.c
1397
if(!perform_zone_add(ssl, worker->daemon->local_zones,
usr.sbin/unbound/daemon/remote.c
142
struct daemon* daemon);
usr.sbin/unbound/daemon/remote.c
1455
if(!perform_zone_remove(ssl, worker->daemon->local_zones,
usr.sbin/unbound/daemon/remote.c
1529
if(perform_data_add(ssl, worker->daemon->local_zones,
usr.sbin/unbound/daemon/remote.c
1577
if(!perform_data_remove(ssl, worker->daemon->local_zones,
usr.sbin/unbound/daemon/remote.c
2994
if(!ssl_printf(ssl, "threads: %d\n", worker->daemon->num))
usr.sbin/unbound/daemon/remote.c
2996
if(!ssl_printf(ssl, "modules: %d [", worker->daemon->mods.num))
usr.sbin/unbound/daemon/remote.c
2998
for(i=0; i<worker->daemon->mods.num; i++) {
usr.sbin/unbound/daemon/remote.c
2999
if(!ssl_printf(ssl, " %s", worker->daemon->mods.mod[i]->name))
usr.sbin/unbound/daemon/remote.c
3004
uptime = (time_t)time(NULL) - (time_t)worker->daemon->time_boot.tv_sec;
usr.sbin/unbound/daemon/remote.c
3008
(worker->daemon->reuseport?" reuseport":""),
usr.sbin/unbound/daemon/remote.c
3009
(worker->daemon->rc->accept_list?" control":""),
usr.sbin/unbound/daemon/remote.c
3010
(worker->daemon->rc->accept_list && worker->daemon->rc->use_cert?"(ssl)":""),
usr.sbin/unbound/daemon/remote.c
3011
(worker->daemon->rc->accept_list && worker->daemon->cfg->control_ifs.first && worker->daemon->cfg->control_ifs.first->str && worker->daemon->cfg->control_ifs.first->str[0] == '/'?"(namedpipe)":"")
usr.sbin/unbound/daemon/remote.c
3706
struct cookie_secrets* cookie_secrets = worker->daemon->cookie_secrets;
usr.sbin/unbound/daemon/remote.c
3748
struct cookie_secrets* cookie_secrets = worker->daemon->cookie_secrets;
usr.sbin/unbound/daemon/remote.c
3783
struct cookie_secrets* cookie_secrets = worker->daemon->cookie_secrets;
usr.sbin/unbound/daemon/remote.c
3819
struct cookie_secrets* cookie_secrets = worker->daemon->cookie_secrets;
usr.sbin/unbound/daemon/remote.c
3826
worker->daemon->cookie_secrets = cookie_secrets_create();
usr.sbin/unbound/daemon/remote.c
3827
if(!worker->daemon->cookie_secrets) {
usr.sbin/unbound/daemon/remote.c
3831
cookie_secrets = worker->daemon->cookie_secrets;
usr.sbin/unbound/daemon/remote.c
3877
struct cookie_secrets* cookie_secrets = worker->daemon->cookie_secrets;
usr.sbin/unbound/daemon/remote.c
3980
if(worker->daemon->num > 1) {
usr.sbin/unbound/daemon/remote.c
3992
if(worker->daemon->num > 1) {
usr.sbin/unbound/daemon/remote.c
4018
do_list_local_zones(ssl, worker->daemon->local_zones);
usr.sbin/unbound/daemon/remote.c
4023
do_list_local_data(ssl, worker, worker->daemon->local_zones);
usr.sbin/unbound/daemon/remote.c
4125
do_zone_remove(ssl, worker->daemon->local_zones, skipwhite(p+17));
usr.sbin/unbound/daemon/remote.c
4127
do_zone_add(ssl, worker->daemon->local_zones, skipwhite(p+10));
usr.sbin/unbound/daemon/remote.c
4129
do_data_remove(ssl, worker->daemon->local_zones, skipwhite(p+17));
usr.sbin/unbound/daemon/remote.c
4131
do_data_add(ssl, worker->daemon->local_zones, skipwhite(p+10));
usr.sbin/unbound/daemon/remote.c
4763
if(!config_read(*newcfg, fr->worker->daemon->cfgfile,
usr.sbin/unbound/daemon/remote.c
4764
fr->worker->daemon->chroot)) {
usr.sbin/unbound/daemon/remote.c
4767
(fr->worker->daemon->chroot?"<chroot:":""),
usr.sbin/unbound/daemon/remote.c
4768
(fr->worker->daemon->chroot?fr->worker->daemon->chroot:""),
usr.sbin/unbound/daemon/remote.c
4769
(fr->worker->daemon->chroot?"> ":""),
usr.sbin/unbound/daemon/remote.c
4770
fr->worker->daemon->cfgfile, strerror(errno)))
usr.sbin/unbound/daemon/remote.c
4779
(fr->worker->daemon->chroot?"<chroot:":""),
usr.sbin/unbound/daemon/remote.c
4780
(fr->worker->daemon->chroot?fr->worker->daemon->chroot:""),
usr.sbin/unbound/daemon/remote.c
4781
(fr->worker->daemon->chroot?"> ":""),
usr.sbin/unbound/daemon/remote.c
4782
fr->worker->daemon->cfgfile))
usr.sbin/unbound/daemon/remote.c
4830
if(!taglist_equal(fr->worker->daemon->cfg->tagname,
usr.sbin/unbound/daemon/remote.c
4831
fr->worker->daemon->cfg->num_tags, newcfg->tagname,
usr.sbin/unbound/daemon/remote.c
4833
!taglist_change_at_end(fr->worker->daemon->cfg->tagname,
usr.sbin/unbound/daemon/remote.c
4834
fr->worker->daemon->cfg->num_tags, newcfg->tagname,
usr.sbin/unbound/daemon/remote.c
4840
fr->worker->daemon->fast_reload_drop_mesh = fr->fr_drop_mesh;
usr.sbin/unbound/daemon/remote.c
5393
struct daemon* daemon)
usr.sbin/unbound/daemon/remote.c
5397
if(!setup_acl_for_ports(acl_interface, daemon->ports[0]))
usr.sbin/unbound/daemon/remote.c
5399
if(daemon->reuseport) {
usr.sbin/unbound/daemon/remote.c
5401
for(i=1; i<daemon->num_ports; i++) {
usr.sbin/unbound/daemon/remote.c
5403
daemon->ports[i]))
usr.sbin/unbound/daemon/remote.c
5607
struct daemon* daemon = fr->worker->daemon;
usr.sbin/unbound/daemon/remote.c
5609
if(!daemon->ssl_service_key ||
usr.sbin/unbound/daemon/remote.c
5610
ssl_cert_changed(daemon, newcfg))
usr.sbin/unbound/daemon/remote.c
5613
if(daemon->ssl_service_key)
usr.sbin/unbound/daemon/remote.c
5616
if((daemon->cfg->tls_cert_bundle && !newcfg->tls_cert_bundle) ||
usr.sbin/unbound/daemon/remote.c
5617
(!daemon->cfg->tls_cert_bundle && newcfg->tls_cert_bundle) ||
usr.sbin/unbound/daemon/remote.c
5618
(daemon->cfg->tls_cert_bundle && newcfg->tls_cert_bundle &&
usr.sbin/unbound/daemon/remote.c
5619
strcmp(daemon->cfg->tls_cert_bundle, newcfg->tls_cert_bundle)!=0))
usr.sbin/unbound/daemon/remote.c
5631
struct config_file* newcfg, struct daemon* daemon)
usr.sbin/unbound/daemon/remote.c
5634
char* chroot = daemon->chroot;
usr.sbin/unbound/daemon/remote.c
5641
daemon, newcfg);
usr.sbin/unbound/daemon/remote.c
5650
ct->listen_dot_sslctx = daemon_setup_listen_dot_sslctx(daemon, newcfg);
usr.sbin/unbound/daemon/remote.c
5654
daemon, newcfg);
usr.sbin/unbound/daemon/remote.c
5660
daemon, newcfg);
usr.sbin/unbound/daemon/remote.c
5663
ct->connect_dot_sslctx = daemon_setup_connect_dot_sslctx(daemon,
usr.sbin/unbound/daemon/remote.c
5686
(void)ct; (void)newcfg; (void)daemon;
usr.sbin/unbound/daemon/remote.c
5700
if(!ct_create_sslctxs(ct, newcfg, fr->worker->daemon)) {
usr.sbin/unbound/daemon/remote.c
5732
fr->worker->daemon)) {
usr.sbin/unbound/daemon/remote.c
5751
if(fr->worker->daemon->tcl->tree.count != 0)
usr.sbin/unbound/daemon/remote.c
5752
fr->worker->daemon->fast_reload_tcl_has_changes = 1;
usr.sbin/unbound/daemon/remote.c
5753
else fr->worker->daemon->fast_reload_tcl_has_changes = 0;
usr.sbin/unbound/daemon/remote.c
5762
fr->worker->daemon->env, &fr->worker->daemon->mods)) {
usr.sbin/unbound/daemon/remote.c
6002
sslctxs_swap(struct daemon* daemon, struct fast_reload_construct* ct)
usr.sbin/unbound/daemon/remote.c
6004
void_ptr_swap(&daemon->listen_dot_sslctx, &ct->listen_dot_sslctx);
usr.sbin/unbound/daemon/remote.c
6005
void_ptr_swap(&daemon->connect_dot_sslctx, &ct->connect_dot_sslctx);
usr.sbin/unbound/daemon/remote.c
6007
void_ptr_swap(&daemon->listen_doh_sslctx, &ct->listen_doh_sslctx);
usr.sbin/unbound/daemon/remote.c
6010
void_ptr_swap(&daemon->listen_quic_sslctx, &ct->listen_quic_sslctx);
usr.sbin/unbound/daemon/remote.c
6012
char_ptr_swap(&daemon->ssl_service_key, &ct->ssl_service_key);
usr.sbin/unbound/daemon/remote.c
6013
char_ptr_swap(&daemon->ssl_service_pem, &ct->ssl_service_pem);
usr.sbin/unbound/daemon/remote.c
6014
daemon->mtime_ssl_service_key = ct->mtime_ssl_service_key;
usr.sbin/unbound/daemon/remote.c
6015
daemon->mtime_ns_ssl_service_key = ct->mtime_ns_ssl_service_key;
usr.sbin/unbound/daemon/remote.c
6016
daemon->mtime_ssl_service_pem = ct->mtime_ssl_service_pem;
usr.sbin/unbound/daemon/remote.c
6017
daemon->mtime_ns_ssl_service_pem = ct->mtime_ns_ssl_service_pem;
usr.sbin/unbound/daemon/remote.c
6555
struct daemon* daemon = fr->worker->daemon;
usr.sbin/unbound/daemon/remote.c
6556
struct module_env* env = daemon->env;
usr.sbin/unbound/daemon/remote.c
6569
lock_rw_wrlock(&daemon->local_zones->lock);
usr.sbin/unbound/daemon/remote.c
6615
acl_list_swap_tree(daemon->acl, ct->acl);
usr.sbin/unbound/daemon/remote.c
6616
acl_list_swap_tree(daemon->acl_interface, ct->acl_interface);
usr.sbin/unbound/daemon/remote.c
6617
tcl_list_swap_tree(daemon->tcl, ct->tcl);
usr.sbin/unbound/daemon/remote.c
6618
local_zones_swap_tree(daemon->local_zones, ct->local_zones);
usr.sbin/unbound/daemon/remote.c
6620
daemon->use_response_ip = ct->use_response_ip;
usr.sbin/unbound/daemon/remote.c
6621
daemon->use_rpz = ct->use_rpz;
usr.sbin/unbound/daemon/remote.c
6626
daemon->env->cachedb_enabled = cachedb_is_enabled(&daemon->mods,
usr.sbin/unbound/daemon/remote.c
6627
daemon->env);
usr.sbin/unbound/daemon/remote.c
6630
sslctxs_swap(daemon, ct);
usr.sbin/unbound/daemon/remote.c
6635
dt_apply_cfg(daemon->dtenv, env->cfg);
usr.sbin/unbound/daemon/remote.c
6636
else dt_apply_logcfg(daemon->dtenv, env->cfg);
usr.sbin/unbound/daemon/remote.c
6654
lock_rw_unlock(&daemon->local_zones->lock);
usr.sbin/unbound/daemon/remote.c
705
for(i=1; i<rc->worker->daemon->num; i++) {
usr.sbin/unbound/daemon/remote.c
706
worker_send_cmd(rc->worker->daemon->workers[i],
usr.sbin/unbound/daemon/remote.c
708
if(!tube_write_msg(rc->worker->daemon->workers[i]->cmd,
usr.sbin/unbound/daemon/remote.c
7213
int numworkers = worker->daemon->num;
usr.sbin/unbound/daemon/remote.c
7214
worker->daemon->fast_reload_thread = (struct fast_reload_thread*)
usr.sbin/unbound/daemon/remote.c
7215
calloc(1, sizeof(*worker->daemon->fast_reload_thread));
usr.sbin/unbound/daemon/remote.c
7216
if(!worker->daemon->fast_reload_thread)
usr.sbin/unbound/daemon/remote.c
7218
fr = worker->daemon->fast_reload_thread;
usr.sbin/unbound/daemon/remote.c
7222
worker->daemon->fast_reload_drop_mesh = fr->fr_drop_mesh;
usr.sbin/unbound/daemon/remote.c
7230
if(!create_socketpair(fr->commpair, worker->daemon->rand)) {
usr.sbin/unbound/daemon/remote.c
7232
worker->daemon->fast_reload_thread = NULL;
usr.sbin/unbound/daemon/remote.c
7242
worker->daemon->fast_reload_thread = NULL;
usr.sbin/unbound/daemon/remote.c
7245
if(!create_socketpair(fr->commreload, worker->daemon->rand)) {
usr.sbin/unbound/daemon/remote.c
7250
worker->daemon->fast_reload_thread = NULL;
usr.sbin/unbound/daemon/remote.c
7306
fast_reload_thread->worker->daemon);
usr.sbin/unbound/daemon/remote.c
7390
worker->daemon->fast_reload_thread = NULL;
usr.sbin/unbound/daemon/remote.c
7444
struct daemon* daemon = fr->worker->daemon;
usr.sbin/unbound/daemon/remote.c
7446
int count=0, total=daemon->num-1;
usr.sbin/unbound/daemon/remote.c
7535
mesh->use_response_ip = worker->daemon->use_response_ip;
usr.sbin/unbound/daemon/remote.c
7536
mesh->use_rpz = worker->daemon->use_rpz;
usr.sbin/unbound/daemon/remote.c
7610
lock_rw_wrlock(&worker->daemon->fast_reload_thread->old_auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7619
*loadxfr = auth_xfer_find(worker->daemon->fast_reload_thread->
usr.sbin/unbound/daemon/remote.c
7652
lock_rw_unlock(&worker->daemon->fast_reload_thread->old_auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7671
lock_rw_unlock(&worker->daemon->fast_reload_thread->old_auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7736
lock_rw_unlock(&worker->daemon->fast_reload_thread->old_auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7797
lock_rw_unlock(&worker->daemon->fast_reload_thread->old_auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7838
struct daemon* daemon = worker->daemon;
usr.sbin/unbound/daemon/remote.c
7839
if(worker->daemon->fast_reload_thread->sslctxs_changed) {
usr.sbin/unbound/daemon/remote.c
7841
void* dot_sslctx = daemon->listen_dot_sslctx;
usr.sbin/unbound/daemon/remote.c
7842
void* doh_sslctx = daemon->listen_doh_sslctx;
usr.sbin/unbound/daemon/remote.c
7844
void* quic_sslctx = daemon->listen_quic_sslctx;
usr.sbin/unbound/daemon/remote.c
7886
if(worker->daemon->fast_reload_thread->sslctxs_changed)
usr.sbin/unbound/daemon/remote.c
7887
outnet->sslctx = worker->daemon->connect_dot_sslctx;
usr.sbin/unbound/daemon/remote.c
7902
struct dt_env* d_dtenv = worker->daemon->dtenv;
usr.sbin/unbound/daemon/remote.c
7903
log_assert(d_dtenv != NULL || !worker->daemon->cfg->dnstap);
usr.sbin/unbound/daemon/remote.c
7948
if(worker->daemon->fast_reload_tcl_has_changes)
usr.sbin/unbound/daemon/remote.c
7954
worker->daemon->fast_reload_thread->auth_zone_change_list);
usr.sbin/unbound/daemon/remote.c
7956
worker->env.cachedb_enabled = worker->daemon->env->cachedb_enabled;
usr.sbin/unbound/daemon/remote.c
7971
struct daemon* daemon = fr->worker->daemon;
usr.sbin/unbound/daemon/remote.c
7975
for(i=0; i<daemon->num; i++) {
usr.sbin/unbound/daemon/remote.c
7978
worker_send_cmd(daemon->workers[i], worker_cmd_reload_stop);
usr.sbin/unbound/daemon/remote.c
7991
for(i=0; i<daemon->num; i++) {
usr.sbin/unbound/daemon/remote.c
7994
worker_send_cmd(daemon->workers[i], worker_cmd_reload_start);
usr.sbin/unbound/daemon/remote.c
7998
if(fr->worker->daemon->fast_reload_drop_mesh) {
usr.sbin/unbound/daemon/remote.c
8020
struct daemon* daemon = fr->worker->daemon;
usr.sbin/unbound/daemon/remote.c
8025
for(i=0; i<daemon->num; i++) {
usr.sbin/unbound/daemon/remote.c
8028
worker_send_cmd(daemon->workers[i], worker_cmd_reload_poll);
usr.sbin/unbound/daemon/remote.c
8120
while(worker->daemon->fast_reload_thread) {
usr.sbin/unbound/daemon/remote.c
8125
if(worker->daemon->fast_reload_thread)
usr.sbin/unbound/daemon/remote.c
8126
ub_winsock_tcp_wouldblock(worker->daemon->
usr.sbin/unbound/daemon/remote.c
8134
if(worker->daemon->fast_reload_thread)
usr.sbin/unbound/daemon/remote.c
8135
ub_winsock_tcp_wouldblock(worker->daemon->
usr.sbin/unbound/daemon/remote.c
8154
if(worker->daemon->fast_reload_thread != NULL) {
usr.sbin/unbound/daemon/remote.c
8422
fr_printq_list_insert(struct fast_reload_printq* printq, struct daemon* daemon)
usr.sbin/unbound/daemon/remote.c
8426
printq->next = daemon->fast_reload_printq_list;
usr.sbin/unbound/daemon/remote.c
8431
daemon->fast_reload_printq_list = printq;
usr.sbin/unbound/daemon/remote.c
8450
struct daemon* daemon = printq->worker->daemon;
usr.sbin/unbound/daemon/remote.c
8452
daemon->fast_reload_printq_list = printq->next;
usr.sbin/unbound/daemon/remote.c
8466
if(printq->worker->daemon->fast_reload_thread &&
usr.sbin/unbound/daemon/remote.c
8467
printq->worker->daemon->fast_reload_thread->printq == printq)
usr.sbin/unbound/daemon/remote.c
8468
printq->worker->daemon->fast_reload_thread->printq = NULL;
usr.sbin/unbound/daemon/remote.c
8486
if(worker->daemon->fast_reload_thread) {
usr.sbin/unbound/daemon/remote.c
8496
worker->daemon->fast_reload_thread->started = 1;
usr.sbin/unbound/daemon/remote.c
8506
fd_set_nonblock(worker->daemon->fast_reload_thread->commpair[0]);
usr.sbin/unbound/daemon/remote.c
8507
worker->daemon->fast_reload_thread->service_event = ub_event_new(
usr.sbin/unbound/daemon/remote.c
8509
worker->daemon->fast_reload_thread->commpair[0],
usr.sbin/unbound/daemon/remote.c
8511
worker->daemon->fast_reload_thread);
usr.sbin/unbound/daemon/remote.c
8512
if(!worker->daemon->fast_reload_thread->service_event) {
usr.sbin/unbound/daemon/remote.c
8513
fast_reload_thread_desetup(worker->daemon->fast_reload_thread);
usr.sbin/unbound/daemon/remote.c
8518
if(ub_event_add(worker->daemon->fast_reload_thread->service_event,
usr.sbin/unbound/daemon/remote.c
8520
fast_reload_thread_desetup(worker->daemon->fast_reload_thread);
usr.sbin/unbound/daemon/remote.c
8525
worker->daemon->fast_reload_thread->service_event_is_added = 1;
usr.sbin/unbound/daemon/remote.c
8537
worker->daemon->fast_reload_thread->printq = fr_printq_create(s->c,
usr.sbin/unbound/daemon/remote.c
8539
if(!worker->daemon->fast_reload_thread->printq) {
usr.sbin/unbound/daemon/remote.c
8540
fast_reload_thread_desetup(worker->daemon->fast_reload_thread);
usr.sbin/unbound/daemon/remote.c
8545
worker->daemon->fast_reload_thread->printq->remote = *ssl;
usr.sbin/unbound/daemon/remote.c
8548
comm_point_stop_listening(worker->daemon->fast_reload_thread->printq->client_cp);
usr.sbin/unbound/daemon/remote.c
8551
ub_thread_create(&worker->daemon->fast_reload_thread->tid,
usr.sbin/unbound/daemon/remote.c
8552
fast_reload_thread_main, worker->daemon->fast_reload_thread);
usr.sbin/unbound/daemon/remote.c
8565
if(worker->daemon->fast_reload_thread != NULL) {
usr.sbin/unbound/daemon/remote.c
913
print_mem(RES* ssl, struct worker* worker, struct daemon* daemon,
usr.sbin/unbound/daemon/remote.c
930
msg = slabhash_get_mem(daemon->env->msg_cache);
usr.sbin/unbound/daemon/remote.c
931
rrset = slabhash_get_mem(&daemon->env->rrset_cache->table);
usr.sbin/unbound/daemon/remote.c
942
if(daemon->dnscenv) {
usr.sbin/unbound/daemon/remote.c
944
daemon->dnscenv->shared_secrets_cache);
usr.sbin/unbound/daemon/remote.c
945
dnscrypt_nonce = slabhash_get_mem(daemon->dnscenv->nonces_cache);
usr.sbin/unbound/daemon/stats.c
229
struct dnsc_env* de = worker->daemon->dnscenv;
usr.sbin/unbound/daemon/stats.c
245
struct dnsc_env* de = worker->daemon->dnscenv;
usr.sbin/unbound/daemon/stats.c
316
if(worker->daemon->dnscenv) {
usr.sbin/unbound/daemon/stats.c
320
worker->daemon->dnscenv->shared_secrets_cache);
usr.sbin/unbound/daemon/stats.c
322
worker->daemon->dnscenv->nonces_cache);
usr.sbin/unbound/daemon/stats.c
349
worker->daemon->doq_table);
usr.sbin/unbound/daemon/stats.c
440
if(!tube_write_msg(worker->daemon->workers[0]->cmd,
usr.sbin/unbound/daemon/unbound.c
301
apply_settings(struct daemon* daemon, struct config_file* cfg,
usr.sbin/unbound/daemon/unbound.c
311
daemon_apply_cfg(daemon, cfg);
usr.sbin/unbound/daemon/unbound.c
435
if(daemon(1, 0) != 0)
usr.sbin/unbound/daemon/unbound.c
468
setup_sslctx_remote(struct daemon* daemon, struct config_file* cfg)
usr.sbin/unbound/daemon/unbound.c
471
if(!(daemon->rc = daemon_remote_create(cfg)))
usr.sbin/unbound/daemon/unbound.c
474
(void)daemon;(void)cfg;
usr.sbin/unbound/daemon/unbound.c
480
perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
usr.sbin/unbound/daemon/unbound.c
490
if(!daemon_privileged(daemon))
usr.sbin/unbound/daemon/unbound.c
504
setup_sslctx_remote(daemon, cfg);
usr.sbin/unbound/daemon/unbound.c
505
daemon_setup_sslctxs(daemon, cfg);
usr.sbin/unbound/daemon/unbound.c
529
daemon->pidfile = strdup(cfg->pidfile);
usr.sbin/unbound/daemon/unbound.c
530
else daemon->pidfile = fname_after_chroot(cfg->pidfile,
usr.sbin/unbound/daemon/unbound.c
532
if(!daemon->pidfile)
usr.sbin/unbound/daemon/unbound.c
542
checkoldpid(daemon->pidfile, pidinchroot);
usr.sbin/unbound/daemon/unbound.c
554
writepid(daemon->pidfile, getpid());
usr.sbin/unbound/daemon/unbound.c
557
(void)daemon;
usr.sbin/unbound/daemon/unbound.c
598
if(daemon->pidfile && daemon->pidfile[0] &&
usr.sbin/unbound/daemon/unbound.c
599
strncmp(daemon->pidfile, cfg->chrootdir,
usr.sbin/unbound/daemon/unbound.c
601
char* old = daemon->pidfile;
usr.sbin/unbound/daemon/unbound.c
602
daemon->pidfile = strdup(old+strlen(cfg->chrootdir));
usr.sbin/unbound/daemon/unbound.c
604
if(!daemon->pidfile)
usr.sbin/unbound/daemon/unbound.c
607
daemon->chroot = strdup(cfg->chrootdir);
usr.sbin/unbound/daemon/unbound.c
608
if(!daemon->chroot)
usr.sbin/unbound/daemon/unbound.c
668
daemon->cfgfile = strdup(*cfgfile);
usr.sbin/unbound/daemon/unbound.c
669
if(!daemon->cfgfile)
usr.sbin/unbound/daemon/unbound.c
685
struct daemon* daemon = NULL;
usr.sbin/unbound/daemon/unbound.c
688
if(!(daemon = daemon_init()))
usr.sbin/unbound/daemon/unbound.c
690
while(!daemon->need_to_exit) {
usr.sbin/unbound/daemon/unbound.c
698
if(!config_read(cfg, cfgfile, daemon->chroot)) {
usr.sbin/unbound/daemon/unbound.c
707
apply_settings(daemon, cfg, cmdline_verbose, debug_mode);
usr.sbin/unbound/daemon/unbound.c
712
if(!daemon_open_shared_ports(daemon))
usr.sbin/unbound/daemon/unbound.c
715
perform_setup(daemon, cfg, debug_mode, &cfgfile, need_pidfile);
usr.sbin/unbound/daemon/unbound.c
723
daemon_fork(daemon);
usr.sbin/unbound/daemon/unbound.c
727
daemon_cleanup(daemon);
usr.sbin/unbound/daemon/unbound.c
733
if(daemon->pidfile) {
usr.sbin/unbound/daemon/unbound.c
736
fd = open(daemon->pidfile, O_WRONLY | O_TRUNC
usr.sbin/unbound/daemon/unbound.c
744
unlink(daemon->pidfile);
usr.sbin/unbound/daemon/unbound.c
746
daemon_delete(daemon);
usr.sbin/unbound/daemon/worker.c
139
superac = alloc_get_mem(&worker->daemon->superalloc);
usr.sbin/unbound/daemon/worker.c
1402
*acladdr = acl_addr_lookup(worker->daemon->acl,
usr.sbin/unbound/daemon/worker.c
1405
*acladdr = acl_addr_lookup(worker->daemon->acl,
usr.sbin/unbound/daemon/worker.c
1522
repinfo->max_udp_size = worker->daemon->cfg->max_udp_size;
usr.sbin/unbound/daemon/worker.c
1523
if(!dnsc_handle_curved_request(worker->daemon->dnscenv, repinfo)) {
usr.sbin/unbound/daemon/worker.c
1559
worker->daemon->dnscenv->provider_name) == 0)) {
usr.sbin/unbound/daemon/worker.c
1562
worker->daemon->dnscenv->provider_name,
usr.sbin/unbound/daemon/worker.c
164
if(worker->daemon->env->fwds)
usr.sbin/unbound/daemon/worker.c
166
if(worker->daemon->env->hints)
usr.sbin/unbound/daemon/worker.c
169
me += acl_list_get_mem(worker->daemon->acl);
usr.sbin/unbound/daemon/worker.c
1692
worker->daemon->cookie_secrets)) != 0) {
usr.sbin/unbound/daemon/worker.c
1730
worker->daemon->cfg->harden_short_bufsize) {
usr.sbin/unbound/daemon/worker.c
1805
if(edns.udp_size > worker->daemon->cfg->max_udp_size &&
usr.sbin/unbound/daemon/worker.c
1812
edns.udp_size = worker->daemon->cfg->max_udp_size;
usr.sbin/unbound/daemon/worker.c
1852
if(local_zones_answer(worker->daemon->local_zones, &worker->env, &qinfo,
usr.sbin/unbound/daemon/worker.c
1856
acladdr->tag_datas_size, worker->daemon->cfg->tagname,
usr.sbin/unbound/daemon/worker.c
1857
worker->daemon->cfg->num_tags, acladdr->view)) {
usr.sbin/unbound/daemon/worker.c
1949
if((worker->daemon->use_response_ip || worker->daemon->use_rpz) &&
usr.sbin/unbound/daemon/worker.c
2171
if(worker->daemon->stat_time_specific) {
usr.sbin/unbound/daemon/worker.c
2174
int offset = worker->daemon->stat_time_offset;
usr.sbin/unbound/daemon/worker.c
2213
if (worker->daemon->cfg->shm_enable) {
usr.sbin/unbound/daemon/worker.c
2216
if(!worker->daemon->cfg->stat_cumulative) {
usr.sbin/unbound/daemon/worker.c
2236
worker_create(struct daemon* daemon, int id)
usr.sbin/unbound/daemon/worker.c
2243
worker->daemon = daemon;
usr.sbin/unbound/daemon/worker.c
2250
if(!(worker->rndstate = ub_initstate(daemon->rand))) {
usr.sbin/unbound/daemon/worker.c
2310
if(!daemon_remote_open_accept(worker->daemon->rc,
usr.sbin/unbound/daemon/worker.c
2311
worker->daemon->rc_ports, worker)) {
usr.sbin/unbound/daemon/worker.c
2323
log_assert(worker->daemon->dtenv != NULL);
usr.sbin/unbound/daemon/worker.c
2324
memcpy(&worker->dtenv, worker->daemon->dtenv, sizeof(struct dt_env));
usr.sbin/unbound/daemon/worker.c
2336
worker->daemon->tcl, worker->daemon->listen_dot_sslctx,
usr.sbin/unbound/daemon/worker.c
2337
worker->daemon->listen_doh_sslctx,
usr.sbin/unbound/daemon/worker.c
2338
worker->daemon->listen_quic_sslctx,
usr.sbin/unbound/daemon/worker.c
2339
dtenv, worker->daemon->doq_table, worker->env.rnd,
usr.sbin/unbound/daemon/worker.c
2350
worker->daemon->env->infra_cache, worker->rndstate,
usr.sbin/unbound/daemon/worker.c
2355
worker->daemon->connect_dot_sslctx, cfg->delay_close,
usr.sbin/unbound/daemon/worker.c
2358
cfg->tcp_auth_query_timeout, worker->daemon->shared_ports);
usr.sbin/unbound/daemon/worker.c
2364
iterator_set_ip46_support(&worker->daemon->mods, worker->daemon->env,
usr.sbin/unbound/daemon/worker.c
2389
worker->alloc = worker->daemon->worker_allocs[worker->thread_num];
usr.sbin/unbound/daemon/worker.c
2391
worker->env = *worker->daemon->env;
usr.sbin/unbound/daemon/worker.c
2410
worker->env.mesh = mesh_create(&worker->daemon->mods, &worker->env);
usr.sbin/unbound/daemon/worker.c
2417
worker->env.mesh->use_response_ip = worker->daemon->use_response_ip;
usr.sbin/unbound/daemon/worker.c
2418
worker->env.mesh->use_rpz = worker->daemon->use_rpz;
usr.sbin/unbound/daemon/worker.c
2460
if(worker->daemon->cfg->dnstap
usr.sbin/unbound/daemon/worker.c
2466
worker->base), worker->daemon->num)) {
usr.sbin/unbound/daemon/worker.c
2515
if(worker->daemon->cfg->dnstap
usr.sbin/unbound/daemon/worker.c
2578
daemon_remote_start_accept(worker->daemon->rc);
usr.sbin/unbound/daemon/worker.c
2586
daemon_remote_stop_accept(worker->daemon->rc);
usr.sbin/unbound/daemon/worker.c
360
worker->daemon->cfg->harden_large_queries) {
usr.sbin/unbound/daemon/worker.c
428
ret = send(worker->daemon->fast_reload_thread->commreload[1],
usr.sbin/unbound/daemon/worker.c
481
if(worker->daemon->fast_reload_drop_mesh) {
usr.sbin/unbound/daemon/worker.c
882
if((worker->daemon->use_response_ip || worker->daemon->use_rpz) &&
usr.sbin/unbound/daemon/worker.h
147
struct worker* worker_create(struct daemon* daemon, int id);
usr.sbin/unbound/daemon/worker.h
58
struct daemon;
usr.sbin/unbound/daemon/worker.h
92
struct daemon* daemon;
usr.sbin/unbound/testcode/fake_event.c
733
slabhash_remove(runtime->daemon->env->msg_cache, h, &k);
usr.sbin/unbound/testcode/fake_event.c
759
e = slabhash_lookup(runtime->daemon->env->msg_cache, h, &k, 0);
usr.sbin/unbound/testcode/replay.h
157
struct daemon;
usr.sbin/unbound/testcode/replay.h
312
struct daemon* daemon;
usr.sbin/unbound/testcode/testbound.c
642
runtime->daemon = worker->daemon;
usr.sbin/unbound/util/shm_side/shm_main.c
101
daemon->shm_info = (struct shm_main_info*)calloc(1, shm_size);
usr.sbin/unbound/util/shm_side/shm_main.c
104
if(!daemon->shm_info) {
usr.sbin/unbound/util/shm_side/shm_main.c
109
daemon->shm_info->key = daemon->cfg->shm_key;
usr.sbin/unbound/util/shm_side/shm_main.c
112
daemon->shm_info->id_ctl = shmget(daemon->shm_info->key, sizeof(int), SHM_R);
usr.sbin/unbound/util/shm_side/shm_main.c
113
daemon->shm_info->id_arr = shmget(daemon->shm_info->key + 1, sizeof(int), SHM_R);
usr.sbin/unbound/util/shm_side/shm_main.c
116
if (daemon->shm_info->id_ctl >= 0)
usr.sbin/unbound/util/shm_side/shm_main.c
117
shmctl(daemon->shm_info->id_ctl, IPC_RMID, NULL);
usr.sbin/unbound/util/shm_side/shm_main.c
120
if (daemon->shm_info->id_arr >= 0)
usr.sbin/unbound/util/shm_side/shm_main.c
121
shmctl(daemon->shm_info->id_arr, IPC_RMID, NULL);
usr.sbin/unbound/util/shm_side/shm_main.c
124
daemon->shm_info->id_ctl = shmget(daemon->shm_info->key, sizeof(struct ub_shm_stat_info), IPC_CREAT | 0644);
usr.sbin/unbound/util/shm_side/shm_main.c
126
if (daemon->shm_info->id_ctl < 0)
usr.sbin/unbound/util/shm_side/shm_main.c
129
daemon->shm_info->key, strerror(errno));
usr.sbin/unbound/util/shm_side/shm_main.c
132
free(daemon->shm_info);
usr.sbin/unbound/util/shm_side/shm_main.c
133
daemon->shm_info = NULL;
usr.sbin/unbound/util/shm_side/shm_main.c
138
daemon->shm_info->id_arr = shmget(daemon->shm_info->key + 1, shm_size, IPC_CREAT | 0644);
usr.sbin/unbound/util/shm_side/shm_main.c
140
if (daemon->shm_info->id_arr < 0)
usr.sbin/unbound/util/shm_side/shm_main.c
143
daemon->shm_info->key, strerror(errno));
usr.sbin/unbound/util/shm_side/shm_main.c
146
free(daemon->shm_info);
usr.sbin/unbound/util/shm_side/shm_main.c
147
daemon->shm_info = NULL;
usr.sbin/unbound/util/shm_side/shm_main.c
153
daemon->shm_info->ptr_ctl = (struct ub_shm_stat_info*)
usr.sbin/unbound/util/shm_side/shm_main.c
154
shmat(daemon->shm_info->id_ctl, NULL, 0);
usr.sbin/unbound/util/shm_side/shm_main.c
155
if(daemon->shm_info->ptr_ctl == (void *) -1) {
usr.sbin/unbound/util/shm_side/shm_main.c
157
daemon->shm_info->id_ctl, strerror(errno));
usr.sbin/unbound/util/shm_side/shm_main.c
160
free(daemon->shm_info);
usr.sbin/unbound/util/shm_side/shm_main.c
161
daemon->shm_info = NULL;
usr.sbin/unbound/util/shm_side/shm_main.c
166
daemon->shm_info->ptr_arr = (struct ub_stats_info*)
usr.sbin/unbound/util/shm_side/shm_main.c
167
shmat(daemon->shm_info->id_arr, NULL, 0);
usr.sbin/unbound/util/shm_side/shm_main.c
169
if (daemon->shm_info->ptr_arr == (void *) -1)
usr.sbin/unbound/util/shm_side/shm_main.c
172
daemon->shm_info->id_arr, strerror(errno));
usr.sbin/unbound/util/shm_side/shm_main.c
175
free(daemon->shm_info);
usr.sbin/unbound/util/shm_side/shm_main.c
176
daemon->shm_info = NULL;
usr.sbin/unbound/util/shm_side/shm_main.c
182
memset(daemon->shm_info->ptr_ctl, 0, sizeof(struct ub_shm_stat_info));
usr.sbin/unbound/util/shm_side/shm_main.c
183
memset(daemon->shm_info->ptr_arr, 0, shm_size);
usr.sbin/unbound/util/shm_side/shm_main.c
185
shm_stat = daemon->shm_info->ptr_ctl;
usr.sbin/unbound/util/shm_side/shm_main.c
186
shm_stat->num_threads = daemon->num;
usr.sbin/unbound/util/shm_side/shm_main.c
188
lock_basic_init(&daemon->shm_info->lock);
usr.sbin/unbound/util/shm_side/shm_main.c
189
daemon->shm_info->volley_in_progress = 0;
usr.sbin/unbound/util/shm_side/shm_main.c
190
daemon->shm_info->thread_volley = (int*)calloc(
usr.sbin/unbound/util/shm_side/shm_main.c
191
daemon->num, sizeof(int));
usr.sbin/unbound/util/shm_side/shm_main.c
192
if(!daemon->shm_info->thread_volley) {
usr.sbin/unbound/util/shm_side/shm_main.c
194
free(daemon->shm_info);
usr.sbin/unbound/util/shm_side/shm_main.c
195
daemon->shm_info = NULL;
usr.sbin/unbound/util/shm_side/shm_main.c
199
(void)daemon;
usr.sbin/unbound/util/shm_side/shm_main.c
204
void shm_main_shutdown(struct daemon* daemon)
usr.sbin/unbound/util/shm_side/shm_main.c
208
if(!daemon->cfg->shm_enable || !daemon->shm_info)
usr.sbin/unbound/util/shm_side/shm_main.c
212
daemon->shm_info->key, daemon->shm_info->id_ctl, daemon->shm_info->id_arr, daemon->shm_info->ptr_ctl, daemon->shm_info->ptr_arr);
usr.sbin/unbound/util/shm_side/shm_main.c
215
if (daemon->shm_info->id_ctl >= 0)
usr.sbin/unbound/util/shm_side/shm_main.c
216
shmctl(daemon->shm_info->id_ctl, IPC_RMID, NULL);
usr.sbin/unbound/util/shm_side/shm_main.c
218
if (daemon->shm_info->id_arr >= 0)
usr.sbin/unbound/util/shm_side/shm_main.c
219
shmctl(daemon->shm_info->id_arr, IPC_RMID, NULL);
usr.sbin/unbound/util/shm_side/shm_main.c
221
if (daemon->shm_info->ptr_ctl)
usr.sbin/unbound/util/shm_side/shm_main.c
222
shmdt(daemon->shm_info->ptr_ctl);
usr.sbin/unbound/util/shm_side/shm_main.c
224
if (daemon->shm_info->ptr_arr)
usr.sbin/unbound/util/shm_side/shm_main.c
225
shmdt(daemon->shm_info->ptr_arr);
usr.sbin/unbound/util/shm_side/shm_main.c
227
lock_basic_destroy(&daemon->shm_info->lock);
usr.sbin/unbound/util/shm_side/shm_main.c
228
free(daemon->shm_info->thread_volley);
usr.sbin/unbound/util/shm_side/shm_main.c
230
free(daemon->shm_info);
usr.sbin/unbound/util/shm_side/shm_main.c
231
daemon->shm_info = NULL;
usr.sbin/unbound/util/shm_side/shm_main.c
233
(void)daemon;
usr.sbin/unbound/util/shm_side/shm_main.c
245
shm_stat = worker->daemon->shm_info->ptr_ctl;
usr.sbin/unbound/util/shm_side/shm_main.c
250
stat_timeval_subtract(&shm_stat->time.up_sec, &shm_stat->time.up_usec, worker->env.now_tv, &worker->daemon->time_boot);
usr.sbin/unbound/util/shm_side/shm_main.c
251
stat_timeval_subtract(&shm_stat->time.elapsed_sec, &shm_stat->time.elapsed_usec, worker->env.now_tv, &worker->daemon->time_last_stat);
usr.sbin/unbound/util/shm_side/shm_main.c
257
if(worker->daemon->dnscenv) {
usr.sbin/unbound/util/shm_side/shm_main.c
259
worker->daemon->dnscenv->shared_secrets_cache);
usr.sbin/unbound/util/shm_side/shm_main.c
261
worker->daemon->dnscenv->nonces_cache);
usr.sbin/unbound/util/shm_side/shm_main.c
294
struct daemon* daemon)
usr.sbin/unbound/util/shm_side/shm_main.c
322
((size_t)daemon->num) * sizeof(int));
usr.sbin/unbound/util/shm_side/shm_main.c
332
shm_thread_is_last(struct daemon* daemon)
usr.sbin/unbound/util/shm_side/shm_main.c
338
for(i=0; i<daemon->num; i++) {
usr.sbin/unbound/util/shm_side/shm_main.c
339
if(!daemon->shm_info->thread_volley[i])
usr.sbin/unbound/util/shm_side/shm_main.c
353
struct shm_main_info* shm_info = worker->daemon->shm_info;
usr.sbin/unbound/util/shm_side/shm_main.c
357
worker->thread_num, worker->daemon, (unsigned)worker->env.now_tv->tv_sec, (unsigned)worker->daemon->time_boot.tv_sec);
usr.sbin/unbound/util/shm_side/shm_main.c
370
if(shm_thread_is_first(shm_info, worker->thread_num, worker->daemon)) {
usr.sbin/unbound/util/shm_side/shm_main.c
387
(stat_info->mesh_time_median/(double)worker->daemon->num);
usr.sbin/unbound/util/shm_side/shm_main.c
389
if(shm_thread_is_last(worker->daemon)) {
usr.sbin/unbound/util/shm_side/shm_main.c
395
((size_t)worker->daemon->num) * sizeof(int));
usr.sbin/unbound/util/shm_side/shm_main.c
83
int shm_main_init(struct daemon* daemon)
usr.sbin/unbound/util/shm_side/shm_main.c
90
if(!daemon)
usr.sbin/unbound/util/shm_side/shm_main.c
92
if(!daemon->cfg->shm_enable)
usr.sbin/unbound/util/shm_side/shm_main.c
94
if(daemon->cfg->stat_interval == 0)
usr.sbin/unbound/util/shm_side/shm_main.c
98
shm_size = (sizeof(struct ub_stats_info) * (daemon->num + 1));
usr.sbin/unbound/util/shm_side/shm_main.h
44
struct daemon;
usr.sbin/unbound/util/shm_side/shm_main.h
79
int shm_main_init(struct daemon* daemon);
usr.sbin/unbound/util/shm_side/shm_main.h
80
void shm_main_shutdown(struct daemon* daemon);
usr.sbin/vmd/proc.c
173
if (!debug && daemon(0, 0) == -1)
usr.sbin/watchdogd/watchdogd.c
140
if (daemonize && daemon(0, 0)) {
usr.sbin/wsmoused/wsmoused.c
559
if (daemon(0, 0)) {
usr.sbin/ypbind/ypbind.c
545
daemon(0, 0);
usr.sbin/ypldap/ypldap.c
569
if (daemon(1, 0) == -1)