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
321
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
225
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
153
struct worker* worker_create(struct daemon* daemon, int id, int* ports, int n);
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
469
if (daemon(0, 0) == -1)
usr.bin/sndiod/sndiod.c
747
if (daemon(0, 0) == -1)
usr.bin/ssh/mux.c
2094
daemon(1, 1);
usr.bin/ssh/ssh.c
1867
daemon(1, 1);
usr.bin/ssh/ssh.c
1879
if (daemon(1, 1) == -1)
usr.bin/ssh/sshd.c
1734
if (daemon(0, 0) == -1)
usr.bin/tmux/proc.c
368
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
223
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
681
if (daemon(0, 0) == -1)
usr.sbin/snmpd/proc.c
197
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
1017
void daemon_apply_cfg(struct daemon* daemon, struct config_file* cfg)
usr.sbin/unbound/daemon/daemon.c
1021
daemon->cfg = cfg;
usr.sbin/unbound/daemon/daemon.c
1042
if(daemon->worker_allocs &&
usr.sbin/unbound/daemon/daemon.c
1043
(new_num != daemon->old_num ||
usr.sbin/unbound/daemon/daemon.c
1044
!slabhash_is_size(daemon->env->msg_cache, cfg->msg_cache_size,
usr.sbin/unbound/daemon/daemon.c
1046
!slabhash_is_size(&daemon->env->rrset_cache->table,
usr.sbin/unbound/daemon/daemon.c
1050
slabhash_clear(&daemon->env->rrset_cache->table);
usr.sbin/unbound/daemon/daemon.c
1051
slabhash_clear(daemon->env->msg_cache);
usr.sbin/unbound/daemon/daemon.c
1052
daemon_clear_allocs(daemon);
usr.sbin/unbound/daemon/daemon.c
1055
if(!slabhash_is_size(daemon->env->msg_cache, cfg->msg_cache_size,
usr.sbin/unbound/daemon/daemon.c
1057
slabhash_delete(daemon->env->msg_cache);
usr.sbin/unbound/daemon/daemon.c
1058
daemon->env->msg_cache = slabhash_create(cfg->msg_cache_slabs,
usr.sbin/unbound/daemon/daemon.c
1062
if(!daemon->env->msg_cache) {
usr.sbin/unbound/daemon/daemon.c
1066
if((daemon->env->rrset_cache = rrset_cache_adjust(
usr.sbin/unbound/daemon/daemon.c
1067
daemon->env->rrset_cache, cfg, &daemon->superalloc)) == 0)
usr.sbin/unbound/daemon/daemon.c
1069
if((daemon->env->infra_cache = infra_adjust(daemon->env->infra_cache,
usr.sbin/unbound/daemon/daemon.c
202
struct daemon*
usr.sbin/unbound/daemon/daemon.c
205
struct daemon* daemon = (struct daemon*)calloc(1,
usr.sbin/unbound/daemon/daemon.c
206
sizeof(struct daemon));
usr.sbin/unbound/daemon/daemon.c
211
if(!daemon)
usr.sbin/unbound/daemon/daemon.c
261
daemon->need_to_exit = 0;
usr.sbin/unbound/daemon/daemon.c
262
modstack_init(&daemon->mods);
usr.sbin/unbound/daemon/daemon.c
263
if(!(daemon->env = (struct module_env*)calloc(1,
usr.sbin/unbound/daemon/daemon.c
264
sizeof(*daemon->env)))) {
usr.sbin/unbound/daemon/daemon.c
265
free(daemon);
usr.sbin/unbound/daemon/daemon.c
268
daemon->env->modstack = &daemon->mods;
usr.sbin/unbound/daemon/daemon.c
270
if(!edns_known_options_init(daemon->env)) {
usr.sbin/unbound/daemon/daemon.c
271
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
272
free(daemon);
usr.sbin/unbound/daemon/daemon.c
275
alloc_init(&daemon->superalloc, NULL, 0);
usr.sbin/unbound/daemon/daemon.c
276
daemon->acl = acl_list_create();
usr.sbin/unbound/daemon/daemon.c
277
if(!daemon->acl) {
usr.sbin/unbound/daemon/daemon.c
278
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
279
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
280
free(daemon);
usr.sbin/unbound/daemon/daemon.c
283
daemon->acl_interface = acl_list_create();
usr.sbin/unbound/daemon/daemon.c
284
if(!daemon->acl_interface) {
usr.sbin/unbound/daemon/daemon.c
285
acl_list_delete(daemon->acl);
usr.sbin/unbound/daemon/daemon.c
286
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
287
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
288
free(daemon);
usr.sbin/unbound/daemon/daemon.c
291
daemon->tcl = tcl_list_create();
usr.sbin/unbound/daemon/daemon.c
292
if(!daemon->tcl) {
usr.sbin/unbound/daemon/daemon.c
293
acl_list_delete(daemon->acl_interface);
usr.sbin/unbound/daemon/daemon.c
294
acl_list_delete(daemon->acl);
usr.sbin/unbound/daemon/daemon.c
295
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
296
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
297
free(daemon);
usr.sbin/unbound/daemon/daemon.c
301
if(gettimeofday(&daemon->time_boot, NULL) < 0)
usr.sbin/unbound/daemon/daemon.c
303
daemon->time_last_stat = daemon->time_boot;
usr.sbin/unbound/daemon/daemon.c
304
if((daemon->env->auth_zones = auth_zones_create()) == 0) {
usr.sbin/unbound/daemon/daemon.c
305
acl_list_delete(daemon->acl_interface);
usr.sbin/unbound/daemon/daemon.c
306
acl_list_delete(daemon->acl);
usr.sbin/unbound/daemon/daemon.c
307
tcl_list_delete(daemon->tcl);
usr.sbin/unbound/daemon/daemon.c
308
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
309
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
310
free(daemon);
usr.sbin/unbound/daemon/daemon.c
313
if(!(daemon->env->edns_strings = edns_strings_create())) {
usr.sbin/unbound/daemon/daemon.c
314
auth_zones_delete(daemon->env->auth_zones);
usr.sbin/unbound/daemon/daemon.c
315
acl_list_delete(daemon->acl_interface);
usr.sbin/unbound/daemon/daemon.c
316
acl_list_delete(daemon->acl);
usr.sbin/unbound/daemon/daemon.c
317
tcl_list_delete(daemon->tcl);
usr.sbin/unbound/daemon/daemon.c
318
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
319
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
320
free(daemon);
usr.sbin/unbound/daemon/daemon.c
323
return daemon;
usr.sbin/unbound/daemon/daemon.c
347
daemon_open_shared_ports(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
349
log_assert(daemon);
usr.sbin/unbound/daemon/daemon.c
350
if(daemon->cfg->port != daemon->listening_port) {
usr.sbin/unbound/daemon/daemon.c
355
daemon->reuseport = 0;
usr.sbin/unbound/daemon/daemon.c
357
if(daemon->ports != NULL) {
usr.sbin/unbound/daemon/daemon.c
358
for(i=0; i<daemon->num_ports; i++)
usr.sbin/unbound/daemon/daemon.c
359
listening_ports_free(daemon->ports[i]);
usr.sbin/unbound/daemon/daemon.c
360
free(daemon->ports);
usr.sbin/unbound/daemon/daemon.c
361
daemon->ports = NULL;
usr.sbin/unbound/daemon/daemon.c
364
acl_interface_init(daemon->acl_interface);
usr.sbin/unbound/daemon/daemon.c
365
if(!resolve_interface_names(daemon->cfg->ifs,
usr.sbin/unbound/daemon/daemon.c
366
daemon->cfg->num_ifs, NULL, &resif, &num_resif))
usr.sbin/unbound/daemon/daemon.c
370
if(daemon->cfg->so_reuseport && daemon->cfg->num_threads > 0)
usr.sbin/unbound/daemon/daemon.c
371
daemon->reuseport = 1;
usr.sbin/unbound/daemon/daemon.c
374
p0 = listening_ports_open(daemon->cfg, resif, num_resif,
usr.sbin/unbound/daemon/daemon.c
375
&daemon->reuseport);
usr.sbin/unbound/daemon/daemon.c
381
if(daemon->reuseport) {
usr.sbin/unbound/daemon/daemon.c
383
daemon->num_ports = (size_t)daemon->cfg->num_threads;
usr.sbin/unbound/daemon/daemon.c
387
daemon->num_ports = 1;
usr.sbin/unbound/daemon/daemon.c
389
if(!(daemon->ports = (struct listen_port**)calloc(
usr.sbin/unbound/daemon/daemon.c
390
daemon->num_ports, sizeof(*daemon->ports)))) {
usr.sbin/unbound/daemon/daemon.c
395
daemon->ports[0] = p0;
usr.sbin/unbound/daemon/daemon.c
396
if(!setup_acl_for_ports(daemon->acl_interface,
usr.sbin/unbound/daemon/daemon.c
397
daemon->ports[0])) {
usr.sbin/unbound/daemon/daemon.c
402
if(daemon->reuseport) {
usr.sbin/unbound/daemon/daemon.c
404
for(i=1; i<daemon->num_ports; i++) {
usr.sbin/unbound/daemon/daemon.c
405
if(!(daemon->ports[i]=
usr.sbin/unbound/daemon/daemon.c
406
listening_ports_open(daemon->cfg,
usr.sbin/unbound/daemon/daemon.c
408
&daemon->reuseport))
usr.sbin/unbound/daemon/daemon.c
409
|| !daemon->reuseport ) {
usr.sbin/unbound/daemon/daemon.c
410
for(i=0; i<daemon->num_ports; i++)
usr.sbin/unbound/daemon/daemon.c
411
listening_ports_free(daemon->ports[i]);
usr.sbin/unbound/daemon/daemon.c
412
free(daemon->ports);
usr.sbin/unbound/daemon/daemon.c
413
daemon->ports = NULL;
usr.sbin/unbound/daemon/daemon.c
417
if(!setup_acl_for_ports(daemon->acl_interface,
usr.sbin/unbound/daemon/daemon.c
418
daemon->ports[i])) {
usr.sbin/unbound/daemon/daemon.c
419
for(i=0; i<daemon->num_ports; i++)
usr.sbin/unbound/daemon/daemon.c
420
listening_ports_free(daemon->ports[i]);
usr.sbin/unbound/daemon/daemon.c
421
free(daemon->ports);
usr.sbin/unbound/daemon/daemon.c
422
daemon->ports = NULL;
usr.sbin/unbound/daemon/daemon.c
429
daemon->listening_port = daemon->cfg->port;
usr.sbin/unbound/daemon/daemon.c
431
if(!daemon->cfg->remote_control_enable && daemon->rc_port) {
usr.sbin/unbound/daemon/daemon.c
432
listening_ports_free(daemon->rc_ports);
usr.sbin/unbound/daemon/daemon.c
433
daemon->rc_ports = NULL;
usr.sbin/unbound/daemon/daemon.c
434
daemon->rc_port = 0;
usr.sbin/unbound/daemon/daemon.c
436
if(daemon->cfg->remote_control_enable &&
usr.sbin/unbound/daemon/daemon.c
437
daemon->cfg->control_port != daemon->rc_port) {
usr.sbin/unbound/daemon/daemon.c
438
listening_ports_free(daemon->rc_ports);
usr.sbin/unbound/daemon/daemon.c
439
if(!(daemon->rc_ports=daemon_remote_open_ports(daemon->cfg)))
usr.sbin/unbound/daemon/daemon.c
441
daemon->rc_port = daemon->cfg->control_port;
usr.sbin/unbound/daemon/daemon.c
447
daemon_privileged(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
449
daemon->env->cfg = daemon->cfg;
usr.sbin/unbound/daemon/daemon.c
450
daemon->env->alloc = &daemon->superalloc;
usr.sbin/unbound/daemon/daemon.c
451
daemon->env->worker = NULL;
usr.sbin/unbound/daemon/daemon.c
452
if(!modstack_call_startup(&daemon->mods, daemon->cfg->module_conf,
usr.sbin/unbound/daemon/daemon.c
453
daemon->env)) {
usr.sbin/unbound/daemon/daemon.c
463
static void daemon_setup_modules(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
465
daemon->env->cfg = daemon->cfg;
usr.sbin/unbound/daemon/daemon.c
466
daemon->env->alloc = &daemon->superalloc;
usr.sbin/unbound/daemon/daemon.c
467
daemon->env->worker = NULL;
usr.sbin/unbound/daemon/daemon.c
468
if(daemon->mods_inited) {
usr.sbin/unbound/daemon/daemon.c
469
modstack_call_deinit(&daemon->mods, daemon->env);
usr.sbin/unbound/daemon/daemon.c
471
daemon->env->need_to_validate = 0; /* set by module init below */
usr.sbin/unbound/daemon/daemon.c
472
if(!modstack_call_init(&daemon->mods, daemon->cfg->module_conf,
usr.sbin/unbound/daemon/daemon.c
473
daemon->env)) {
usr.sbin/unbound/daemon/daemon.c
476
daemon->mods_inited = 1;
usr.sbin/unbound/daemon/daemon.c
477
log_edns_known_options(VERB_ALGO, daemon->env);
usr.sbin/unbound/daemon/daemon.c
487
static int daemon_get_shufport(struct daemon* daemon, int* shufport)
usr.sbin/unbound/daemon/daemon.c
492
if(daemon->cfg->outgoing_avail_ports[i]) {
usr.sbin/unbound/daemon/daemon.c
493
shufport[avail++] = daemon->cfg->
usr.sbin/unbound/daemon/daemon.c
503
k = ub_random_max(daemon->rand, n+1); /* 0<= k<= n */
usr.sbin/unbound/daemon/daemon.c
518
daemon_clear_allocs(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
525
for(i=0; i<daemon->old_num; i++) {
usr.sbin/unbound/daemon/daemon.c
526
alloc_clear(daemon->worker_allocs[i]);
usr.sbin/unbound/daemon/daemon.c
527
free(daemon->worker_allocs[i]);
usr.sbin/unbound/daemon/daemon.c
529
free(daemon->worker_allocs);
usr.sbin/unbound/daemon/daemon.c
530
daemon->worker_allocs = NULL;
usr.sbin/unbound/daemon/daemon.c
532
alloc_clear_special(&daemon->superalloc);
usr.sbin/unbound/daemon/daemon.c
543
daemon_create_workers(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
547
log_assert(daemon && daemon->cfg);
usr.sbin/unbound/daemon/daemon.c
548
if(!daemon->rand) {
usr.sbin/unbound/daemon/daemon.c
549
daemon->rand = ub_initstate(NULL);
usr.sbin/unbound/daemon/daemon.c
550
if(!daemon->rand)
usr.sbin/unbound/daemon/daemon.c
552
hash_set_raninit((uint32_t)ub_random(daemon->rand));
usr.sbin/unbound/daemon/daemon.c
557
numport = daemon_get_shufport(daemon, shufport);
usr.sbin/unbound/daemon/daemon.c
561
daemon->doq_table = doq_table_create(daemon->cfg, daemon->rand);
usr.sbin/unbound/daemon/daemon.c
562
if(!daemon->doq_table)
usr.sbin/unbound/daemon/daemon.c
566
daemon->num = (daemon->cfg->num_threads?daemon->cfg->num_threads:1);
usr.sbin/unbound/daemon/daemon.c
567
if(daemon->reuseport && (int)daemon->num < (int)daemon->num_ports) {
usr.sbin/unbound/daemon/daemon.c
569
"so continuing with %d threads.", (int)daemon->num,
usr.sbin/unbound/daemon/daemon.c
570
(int)daemon->num_ports);
usr.sbin/unbound/daemon/daemon.c
571
daemon->num = (int)daemon->num_ports;
usr.sbin/unbound/daemon/daemon.c
573
daemon->workers = (struct worker**)calloc((size_t)daemon->num,
usr.sbin/unbound/daemon/daemon.c
575
if(!daemon->workers)
usr.sbin/unbound/daemon/daemon.c
577
if(daemon->cfg->dnstap) {
usr.sbin/unbound/daemon/daemon.c
579
daemon->dtenv = dt_create(daemon->cfg);
usr.sbin/unbound/daemon/daemon.c
580
if (!daemon->dtenv)
usr.sbin/unbound/daemon/daemon.c
586
for(i=0; i<daemon->num; i++) {
usr.sbin/unbound/daemon/daemon.c
587
if(!(daemon->workers[i] = worker_create(daemon, i,
usr.sbin/unbound/daemon/daemon.c
588
shufport+numport*i/daemon->num,
usr.sbin/unbound/daemon/daemon.c
589
numport*(i+1)/daemon->num - numport*i/daemon->num)))
usr.sbin/unbound/daemon/daemon.c
594
if(!daemon->worker_allocs) {
usr.sbin/unbound/daemon/daemon.c
595
daemon->worker_allocs = (struct alloc_cache**)calloc(
usr.sbin/unbound/daemon/daemon.c
596
(size_t)daemon->num, sizeof(struct alloc_cache*));
usr.sbin/unbound/daemon/daemon.c
597
if(!daemon->worker_allocs)
usr.sbin/unbound/daemon/daemon.c
599
for(i=0; i<daemon->num; i++) {
usr.sbin/unbound/daemon/daemon.c
604
alloc_init(alloc, &daemon->superalloc, i);
usr.sbin/unbound/daemon/daemon.c
605
daemon->worker_allocs[i] = alloc;
usr.sbin/unbound/daemon/daemon.c
617
static void close_other_pipes(struct daemon* daemon, int thr)
usr.sbin/unbound/daemon/daemon.c
620
for(i=0; i<daemon->num; i++)
usr.sbin/unbound/daemon/daemon.c
624
tube_close_read(daemon->workers[i]->cmd);
usr.sbin/unbound/daemon/daemon.c
627
tube_delete(daemon->workers[i]->cmd);
usr.sbin/unbound/daemon/daemon.c
628
daemon->workers[i]->cmd = NULL;
usr.sbin/unbound/daemon/daemon.c
649
close_other_pipes(worker->daemon, worker->thread_num);
usr.sbin/unbound/daemon/daemon.c
652
if(worker->daemon->cfg->so_reuseport)
usr.sbin/unbound/daemon/daemon.c
653
port_num = worker->thread_num % worker->daemon->num_ports;
usr.sbin/unbound/daemon/daemon.c
657
if(!worker_init(worker, worker->daemon->cfg,
usr.sbin/unbound/daemon/daemon.c
658
worker->daemon->ports[port_num], 0))
usr.sbin/unbound/daemon/daemon.c
670
daemon_start_others(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
673
log_assert(daemon);
usr.sbin/unbound/daemon/daemon.c
676
for(i=1; i<daemon->num; i++) {
usr.sbin/unbound/daemon/daemon.c
677
ub_thread_create(&daemon->workers[i]->thr_id,
usr.sbin/unbound/daemon/daemon.c
678
thread_start, daemon->workers[i]);
usr.sbin/unbound/daemon/daemon.c
681
tube_close_read(daemon->workers[i]->cmd);
usr.sbin/unbound/daemon/daemon.c
691
daemon_stop_others(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
694
log_assert(daemon);
usr.sbin/unbound/daemon/daemon.c
698
for(i=1; i<daemon->num; i++) {
usr.sbin/unbound/daemon/daemon.c
699
worker_send_cmd(daemon->workers[i], worker_cmd_quit);
usr.sbin/unbound/daemon/daemon.c
702
for(i=1; i<daemon->num; i++) {
usr.sbin/unbound/daemon/daemon.c
705
ub_thread_join(daemon->workers[i]->thr_id);
usr.sbin/unbound/daemon/daemon.c
711
daemon_fork(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
718
log_assert(daemon);
usr.sbin/unbound/daemon/daemon.c
719
if(!(daemon->env->views = views_create()))
usr.sbin/unbound/daemon/daemon.c
722
if(!views_apply_cfg(daemon->env->views, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
725
if(!acl_list_apply_cfg(daemon->acl, daemon->cfg, daemon->env->views))
usr.sbin/unbound/daemon/daemon.c
727
if(!acl_interface_apply_cfg(daemon->acl_interface, daemon->cfg,
usr.sbin/unbound/daemon/daemon.c
728
daemon->env->views))
usr.sbin/unbound/daemon/daemon.c
730
if(!tcl_list_apply_cfg(daemon->tcl, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
732
if(daemon->cfg->dnscrypt) {
usr.sbin/unbound/daemon/daemon.c
734
daemon->dnscenv = dnsc_create();
usr.sbin/unbound/daemon/daemon.c
735
if (!daemon->dnscenv)
usr.sbin/unbound/daemon/daemon.c
737
dnsc_apply_cfg(daemon->dnscenv, daemon->cfg);
usr.sbin/unbound/daemon/daemon.c
743
if(daemon->cfg->cookie_secret_file &&
usr.sbin/unbound/daemon/daemon.c
744
daemon->cfg->cookie_secret_file[0]) {
usr.sbin/unbound/daemon/daemon.c
745
if(!(daemon->cookie_secrets = cookie_secrets_create()))
usr.sbin/unbound/daemon/daemon.c
747
if(!cookie_secrets_apply_cfg(daemon->cookie_secrets,
usr.sbin/unbound/daemon/daemon.c
748
daemon->cfg->cookie_secret_file))
usr.sbin/unbound/daemon/daemon.c
752
if(!(daemon->local_zones = local_zones_create()))
usr.sbin/unbound/daemon/daemon.c
754
if(!local_zones_apply_cfg(daemon->local_zones, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
756
if(!(daemon->env->fwds = forwards_create()) ||
usr.sbin/unbound/daemon/daemon.c
757
!forwards_apply_cfg(daemon->env->fwds, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
759
if(!(daemon->env->hints = hints_create()) ||
usr.sbin/unbound/daemon/daemon.c
760
!hints_apply_cfg(daemon->env->hints, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
764
if(!(daemon->env->respip_set = respip_set_create()))
usr.sbin/unbound/daemon/daemon.c
766
if(!respip_global_apply_cfg(daemon->env->respip_set, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
768
if(!respip_views_apply_cfg(daemon->env->views, daemon->cfg,
usr.sbin/unbound/daemon/daemon.c
771
daemon->use_response_ip = !respip_set_is_empty(
usr.sbin/unbound/daemon/daemon.c
772
daemon->env->respip_set) || have_view_respip_cfg;
usr.sbin/unbound/daemon/daemon.c
775
daemon_setup_modules(daemon);
usr.sbin/unbound/daemon/daemon.c
778
if(!auth_zones_apply_cfg(daemon->env->auth_zones, daemon->cfg, 1,
usr.sbin/unbound/daemon/daemon.c
779
&daemon->use_rpz, daemon->env, &daemon->mods))
usr.sbin/unbound/daemon/daemon.c
783
if(!edns_strings_apply_cfg(daemon->env->edns_strings, daemon->cfg))
usr.sbin/unbound/daemon/daemon.c
787
daemon->env->cachedb_enabled = cachedb_is_enabled(&daemon->mods,
usr.sbin/unbound/daemon/daemon.c
788
daemon->env);
usr.sbin/unbound/daemon/daemon.c
793
if(daemon->use_response_ip &&
usr.sbin/unbound/daemon/daemon.c
794
modstack_find(&daemon->mods, "respip") < 0)
usr.sbin/unbound/daemon/daemon.c
799
if(daemon->use_rpz &&
usr.sbin/unbound/daemon/daemon.c
800
modstack_find(&daemon->mods, "respip") < 0)
usr.sbin/unbound/daemon/daemon.c
806
daemon_create_workers(daemon);
usr.sbin/unbound/daemon/daemon.c
810
if(!worker_init(daemon->workers[0], daemon->cfg, daemon->ports[0], 1))
usr.sbin/unbound/daemon/daemon.c
817
daemon_start_others(daemon);
usr.sbin/unbound/daemon/daemon.c
824
if(!worker_init(daemon->workers[0], daemon->cfg, daemon->ports[0], 1))
usr.sbin/unbound/daemon/daemon.c
827
signal_handling_playback(daemon->workers[0]);
usr.sbin/unbound/daemon/daemon.c
829
if (!shm_main_init(daemon))
usr.sbin/unbound/daemon/daemon.c
842
worker_work(daemon->workers[0]);
usr.sbin/unbound/daemon/daemon.c
844
if (daemon->workers[0]->need_to_exit)
usr.sbin/unbound/daemon/daemon.c
852
daemon_stop_others(daemon);
usr.sbin/unbound/daemon/daemon.c
855
shm_main_shutdown(daemon);
usr.sbin/unbound/daemon/daemon.c
857
daemon->reuse_cache = daemon->workers[0]->reuse_cache;
usr.sbin/unbound/daemon/daemon.c
858
daemon->need_to_exit = daemon->workers[0]->need_to_exit;
usr.sbin/unbound/daemon/daemon.c
862
daemon_cleanup(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
865
log_assert(daemon);
usr.sbin/unbound/daemon/daemon.c
877
if(!daemon->reuse_cache || daemon->need_to_exit) {
usr.sbin/unbound/daemon/daemon.c
878
slabhash_clear(&daemon->env->rrset_cache->table);
usr.sbin/unbound/daemon/daemon.c
879
slabhash_clear(daemon->env->msg_cache);
usr.sbin/unbound/daemon/daemon.c
881
daemon->old_num = daemon->num; /* save the current num */
usr.sbin/unbound/daemon/daemon.c
882
forwards_delete(daemon->env->fwds);
usr.sbin/unbound/daemon/daemon.c
883
daemon->env->fwds = NULL;
usr.sbin/unbound/daemon/daemon.c
884
hints_delete(daemon->env->hints);
usr.sbin/unbound/daemon/daemon.c
885
daemon->env->hints = NULL;
usr.sbin/unbound/daemon/daemon.c
886
local_zones_delete(daemon->local_zones);
usr.sbin/unbound/daemon/daemon.c
887
daemon->local_zones = NULL;
usr.sbin/unbound/daemon/daemon.c
888
respip_set_delete(daemon->env->respip_set);
usr.sbin/unbound/daemon/daemon.c
889
daemon->env->respip_set = NULL;
usr.sbin/unbound/daemon/daemon.c
890
views_delete(daemon->env->views);
usr.sbin/unbound/daemon/daemon.c
891
daemon->env->views = NULL;
usr.sbin/unbound/daemon/daemon.c
892
if(daemon->env->auth_zones)
usr.sbin/unbound/daemon/daemon.c
893
auth_zones_cleanup(daemon->env->auth_zones);
usr.sbin/unbound/daemon/daemon.c
895
daemon_remote_clear(daemon->rc);
usr.sbin/unbound/daemon/daemon.c
896
if(daemon->fast_reload_thread)
usr.sbin/unbound/daemon/daemon.c
897
fast_reload_thread_stop(daemon->fast_reload_thread);
usr.sbin/unbound/daemon/daemon.c
898
if(daemon->fast_reload_printq_list)
usr.sbin/unbound/daemon/daemon.c
899
fast_reload_printq_list_delete(daemon->fast_reload_printq_list);
usr.sbin/unbound/daemon/daemon.c
900
for(i=0; i<daemon->num; i++)
usr.sbin/unbound/daemon/daemon.c
901
worker_delete(daemon->workers[i]);
usr.sbin/unbound/daemon/daemon.c
902
free(daemon->workers);
usr.sbin/unbound/daemon/daemon.c
903
daemon->workers = NULL;
usr.sbin/unbound/daemon/daemon.c
908
if(!daemon->reuse_cache || daemon->need_to_exit)
usr.sbin/unbound/daemon/daemon.c
909
daemon_clear_allocs(daemon);
usr.sbin/unbound/daemon/daemon.c
910
daemon->num = 0;
usr.sbin/unbound/daemon/daemon.c
912
dt_delete(daemon->dtenv);
usr.sbin/unbound/daemon/daemon.c
913
daemon->dtenv = NULL;
usr.sbin/unbound/daemon/daemon.c
916
dnsc_delete(daemon->dnscenv);
usr.sbin/unbound/daemon/daemon.c
917
daemon->dnscenv = NULL;
usr.sbin/unbound/daemon/daemon.c
920
doq_table_delete(daemon->doq_table);
usr.sbin/unbound/daemon/daemon.c
921
daemon->doq_table = NULL;
usr.sbin/unbound/daemon/daemon.c
923
daemon->cfg = NULL;
usr.sbin/unbound/daemon/daemon.c
927
daemon_delete(struct daemon* daemon)
usr.sbin/unbound/daemon/daemon.c
930
if(!daemon)
usr.sbin/unbound/daemon/daemon.c
932
modstack_call_deinit(&daemon->mods, daemon->env);
usr.sbin/unbound/daemon/daemon.c
933
modstack_call_destartup(&daemon->mods, daemon->env);
usr.sbin/unbound/daemon/daemon.c
934
modstack_free(&daemon->mods);
usr.sbin/unbound/daemon/daemon.c
935
daemon_remote_delete(daemon->rc);
usr.sbin/unbound/daemon/daemon.c
936
for(i = 0; i < daemon->num_ports; i++)
usr.sbin/unbound/daemon/daemon.c
937
listening_ports_free(daemon->ports[i]);
usr.sbin/unbound/daemon/daemon.c
938
free(daemon->ports);
usr.sbin/unbound/daemon/daemon.c
939
listening_ports_free(daemon->rc_ports);
usr.sbin/unbound/daemon/daemon.c
940
if(daemon->env) {
usr.sbin/unbound/daemon/daemon.c
941
slabhash_delete(daemon->env->msg_cache);
usr.sbin/unbound/daemon/daemon.c
942
rrset_cache_delete(daemon->env->rrset_cache);
usr.sbin/unbound/daemon/daemon.c
943
infra_delete(daemon->env->infra_cache);
usr.sbin/unbound/daemon/daemon.c
944
edns_known_options_delete(daemon->env);
usr.sbin/unbound/daemon/daemon.c
945
edns_strings_delete(daemon->env->edns_strings);
usr.sbin/unbound/daemon/daemon.c
946
auth_zones_delete(daemon->env->auth_zones);
usr.sbin/unbound/daemon/daemon.c
948
ub_randfree(daemon->rand);
usr.sbin/unbound/daemon/daemon.c
949
alloc_clear(&daemon->superalloc);
usr.sbin/unbound/daemon/daemon.c
950
acl_list_delete(daemon->acl);
usr.sbin/unbound/daemon/daemon.c
951
acl_list_delete(daemon->acl_interface);
usr.sbin/unbound/daemon/daemon.c
952
tcl_list_delete(daemon->tcl);
usr.sbin/unbound/daemon/daemon.c
953
cookie_secrets_delete(daemon->cookie_secrets);
usr.sbin/unbound/daemon/daemon.c
955
free(daemon->chroot);
usr.sbin/unbound/daemon/daemon.c
956
free(daemon->pidfile);
usr.sbin/unbound/daemon/daemon.c
957
free(daemon->cfgfile);
usr.sbin/unbound/daemon/daemon.c
958
free(daemon->env);
usr.sbin/unbound/daemon/daemon.c
961
SSL_CTX_free((SSL_CTX*)daemon->listen_dot_sslctx);
usr.sbin/unbound/daemon/daemon.c
962
SSL_CTX_free((SSL_CTX*)daemon->listen_doh_sslctx);
usr.sbin/unbound/daemon/daemon.c
963
SSL_CTX_free((SSL_CTX*)daemon->connect_dot_sslctx);
usr.sbin/unbound/daemon/daemon.c
966
SSL_CTX_free((SSL_CTX*)daemon->listen_quic_sslctx);
usr.sbin/unbound/daemon/daemon.c
968
free(daemon);
usr.sbin/unbound/daemon/daemon.h
178
struct daemon* daemon_init(void);
usr.sbin/unbound/daemon/daemon.h
186
int daemon_open_shared_ports(struct daemon* daemon);
usr.sbin/unbound/daemon/daemon.h
195
int daemon_privileged(struct daemon* daemon);
usr.sbin/unbound/daemon/daemon.h
202
void daemon_fork(struct daemon* daemon);
usr.sbin/unbound/daemon/daemon.h
209
void daemon_cleanup(struct daemon* daemon);
usr.sbin/unbound/daemon/daemon.h
215
void daemon_delete(struct daemon* daemon);
usr.sbin/unbound/daemon/daemon.h
222
void daemon_apply_cfg(struct daemon* daemon, struct config_file* cfg);
usr.sbin/unbound/daemon/remote.c
1221
struct daemon* daemon = worker->daemon;
usr.sbin/unbound/daemon/remote.c
1226
log_assert(daemon->num > 0);
usr.sbin/unbound/daemon/remote.c
1228
for(i=0; i<daemon->num; i++) {
usr.sbin/unbound/daemon/remote.c
1229
server_stats_obtain(worker, daemon->workers[i], &s, reset);
usr.sbin/unbound/daemon/remote.c
1237
total.mesh_time_median /= (double)daemon->num;
usr.sbin/unbound/daemon/remote.c
1242
if(daemon->cfg->stat_extended) {
usr.sbin/unbound/daemon/remote.c
1243
if(!print_mem(ssl, worker, daemon, &total))
usr.sbin/unbound/daemon/remote.c
1247
if(!print_ext(ssl, &total, daemon->cfg->stat_inhibit_zero))
usr.sbin/unbound/daemon/remote.c
1373
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
1431
if(!perform_zone_remove(ssl, worker->daemon->local_zones,
usr.sbin/unbound/daemon/remote.c
1505
if(perform_data_add(ssl, worker->daemon->local_zones,
usr.sbin/unbound/daemon/remote.c
1553
if(!perform_data_remove(ssl, worker->daemon->local_zones,
usr.sbin/unbound/daemon/remote.c
2954
if(!ssl_printf(ssl, "threads: %d\n", worker->daemon->num))
usr.sbin/unbound/daemon/remote.c
2956
if(!ssl_printf(ssl, "modules: %d [", worker->daemon->mods.num))
usr.sbin/unbound/daemon/remote.c
2958
for(i=0; i<worker->daemon->mods.num; i++) {
usr.sbin/unbound/daemon/remote.c
2959
if(!ssl_printf(ssl, " %s", worker->daemon->mods.mod[i]->name))
usr.sbin/unbound/daemon/remote.c
2964
uptime = (time_t)time(NULL) - (time_t)worker->daemon->time_boot.tv_sec;
usr.sbin/unbound/daemon/remote.c
2968
(worker->daemon->reuseport?" reuseport":""),
usr.sbin/unbound/daemon/remote.c
2969
(worker->daemon->rc->accept_list?" control":""),
usr.sbin/unbound/daemon/remote.c
2970
(worker->daemon->rc->accept_list && worker->daemon->rc->use_cert?"(ssl)":""),
usr.sbin/unbound/daemon/remote.c
2971
(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
3666
struct cookie_secrets* cookie_secrets = worker->daemon->cookie_secrets;
usr.sbin/unbound/daemon/remote.c
3708
struct cookie_secrets* cookie_secrets = worker->daemon->cookie_secrets;
usr.sbin/unbound/daemon/remote.c
3743
struct cookie_secrets* cookie_secrets = worker->daemon->cookie_secrets;
usr.sbin/unbound/daemon/remote.c
3779
struct cookie_secrets* cookie_secrets = worker->daemon->cookie_secrets;
usr.sbin/unbound/daemon/remote.c
3786
worker->daemon->cookie_secrets = cookie_secrets_create();
usr.sbin/unbound/daemon/remote.c
3787
if(!worker->daemon->cookie_secrets) {
usr.sbin/unbound/daemon/remote.c
3791
cookie_secrets = worker->daemon->cookie_secrets;
usr.sbin/unbound/daemon/remote.c
3837
struct cookie_secrets* cookie_secrets = worker->daemon->cookie_secrets;
usr.sbin/unbound/daemon/remote.c
3940
if(worker->daemon->num > 1) {
usr.sbin/unbound/daemon/remote.c
3952
if(worker->daemon->num > 1) {
usr.sbin/unbound/daemon/remote.c
3978
do_list_local_zones(ssl, worker->daemon->local_zones);
usr.sbin/unbound/daemon/remote.c
3983
do_list_local_data(ssl, worker, worker->daemon->local_zones);
usr.sbin/unbound/daemon/remote.c
4085
do_zone_remove(ssl, worker->daemon->local_zones, skipwhite(p+17));
usr.sbin/unbound/daemon/remote.c
4087
do_zone_add(ssl, worker->daemon->local_zones, skipwhite(p+10));
usr.sbin/unbound/daemon/remote.c
4089
do_data_remove(ssl, worker->daemon->local_zones, skipwhite(p+17));
usr.sbin/unbound/daemon/remote.c
4091
do_data_add(ssl, worker->daemon->local_zones, skipwhite(p+10));
usr.sbin/unbound/daemon/remote.c
4703
if(!config_read(*newcfg, fr->worker->daemon->cfgfile,
usr.sbin/unbound/daemon/remote.c
4704
fr->worker->daemon->chroot)) {
usr.sbin/unbound/daemon/remote.c
4707
(fr->worker->daemon->chroot?"<chroot:":""),
usr.sbin/unbound/daemon/remote.c
4708
(fr->worker->daemon->chroot?fr->worker->daemon->chroot:""),
usr.sbin/unbound/daemon/remote.c
4709
(fr->worker->daemon->chroot?"> ":""),
usr.sbin/unbound/daemon/remote.c
4710
fr->worker->daemon->cfgfile, strerror(errno)))
usr.sbin/unbound/daemon/remote.c
4719
(fr->worker->daemon->chroot?"<chroot:":""),
usr.sbin/unbound/daemon/remote.c
4720
(fr->worker->daemon->chroot?fr->worker->daemon->chroot:""),
usr.sbin/unbound/daemon/remote.c
4721
(fr->worker->daemon->chroot?"> ":""),
usr.sbin/unbound/daemon/remote.c
4722
fr->worker->daemon->cfgfile))
usr.sbin/unbound/daemon/remote.c
4770
if(!taglist_equal(fr->worker->daemon->cfg->tagname,
usr.sbin/unbound/daemon/remote.c
4771
fr->worker->daemon->cfg->num_tags, newcfg->tagname,
usr.sbin/unbound/daemon/remote.c
4773
!taglist_change_at_end(fr->worker->daemon->cfg->tagname,
usr.sbin/unbound/daemon/remote.c
4774
fr->worker->daemon->cfg->num_tags, newcfg->tagname,
usr.sbin/unbound/daemon/remote.c
4780
fr->worker->daemon->fast_reload_drop_mesh = fr->fr_drop_mesh;
usr.sbin/unbound/daemon/remote.c
5319
struct daemon* daemon)
usr.sbin/unbound/daemon/remote.c
5323
if(!setup_acl_for_ports(acl_interface, daemon->ports[0]))
usr.sbin/unbound/daemon/remote.c
5325
if(daemon->reuseport) {
usr.sbin/unbound/daemon/remote.c
5327
for(i=1; i<daemon->num_ports; i++) {
usr.sbin/unbound/daemon/remote.c
5329
daemon->ports[i]))
usr.sbin/unbound/daemon/remote.c
5561
fr->worker->daemon)) {
usr.sbin/unbound/daemon/remote.c
5580
if(fr->worker->daemon->tcl->tree.count != 0)
usr.sbin/unbound/daemon/remote.c
5581
fr->worker->daemon->fast_reload_tcl_has_changes = 1;
usr.sbin/unbound/daemon/remote.c
5582
else fr->worker->daemon->fast_reload_tcl_has_changes = 0;
usr.sbin/unbound/daemon/remote.c
5591
fr->worker->daemon->env, &fr->worker->daemon->mods)) {
usr.sbin/unbound/daemon/remote.c
6331
struct daemon* daemon = fr->worker->daemon;
usr.sbin/unbound/daemon/remote.c
6332
struct module_env* env = daemon->env;
usr.sbin/unbound/daemon/remote.c
6345
lock_rw_wrlock(&daemon->local_zones->lock);
usr.sbin/unbound/daemon/remote.c
6391
acl_list_swap_tree(daemon->acl, ct->acl);
usr.sbin/unbound/daemon/remote.c
6392
acl_list_swap_tree(daemon->acl_interface, ct->acl_interface);
usr.sbin/unbound/daemon/remote.c
6393
tcl_list_swap_tree(daemon->tcl, ct->tcl);
usr.sbin/unbound/daemon/remote.c
6394
local_zones_swap_tree(daemon->local_zones, ct->local_zones);
usr.sbin/unbound/daemon/remote.c
6396
daemon->use_response_ip = ct->use_response_ip;
usr.sbin/unbound/daemon/remote.c
6397
daemon->use_rpz = ct->use_rpz;
usr.sbin/unbound/daemon/remote.c
6402
daemon->env->cachedb_enabled = cachedb_is_enabled(&daemon->mods,
usr.sbin/unbound/daemon/remote.c
6403
daemon->env);
usr.sbin/unbound/daemon/remote.c
6408
dt_apply_cfg(daemon->dtenv, env->cfg);
usr.sbin/unbound/daemon/remote.c
6409
else dt_apply_logcfg(daemon->dtenv, env->cfg);
usr.sbin/unbound/daemon/remote.c
6427
lock_rw_unlock(&daemon->local_zones->lock);
usr.sbin/unbound/daemon/remote.c
685
for(i=1; i<rc->worker->daemon->num; i++) {
usr.sbin/unbound/daemon/remote.c
686
worker_send_cmd(rc->worker->daemon->workers[i],
usr.sbin/unbound/daemon/remote.c
688
if(!tube_write_msg(rc->worker->daemon->workers[i]->cmd,
usr.sbin/unbound/daemon/remote.c
6974
int numworkers = worker->daemon->num;
usr.sbin/unbound/daemon/remote.c
6975
worker->daemon->fast_reload_thread = (struct fast_reload_thread*)
usr.sbin/unbound/daemon/remote.c
6976
calloc(1, sizeof(*worker->daemon->fast_reload_thread));
usr.sbin/unbound/daemon/remote.c
6977
if(!worker->daemon->fast_reload_thread)
usr.sbin/unbound/daemon/remote.c
6979
fr = worker->daemon->fast_reload_thread;
usr.sbin/unbound/daemon/remote.c
6983
worker->daemon->fast_reload_drop_mesh = fr->fr_drop_mesh;
usr.sbin/unbound/daemon/remote.c
6991
if(!create_socketpair(fr->commpair, worker->daemon->rand)) {
usr.sbin/unbound/daemon/remote.c
6993
worker->daemon->fast_reload_thread = NULL;
usr.sbin/unbound/daemon/remote.c
7003
worker->daemon->fast_reload_thread = NULL;
usr.sbin/unbound/daemon/remote.c
7006
if(!create_socketpair(fr->commreload, worker->daemon->rand)) {
usr.sbin/unbound/daemon/remote.c
7011
worker->daemon->fast_reload_thread = NULL;
usr.sbin/unbound/daemon/remote.c
7064
fast_reload_thread->worker->daemon);
usr.sbin/unbound/daemon/remote.c
7148
worker->daemon->fast_reload_thread = NULL;
usr.sbin/unbound/daemon/remote.c
7202
struct daemon* daemon = fr->worker->daemon;
usr.sbin/unbound/daemon/remote.c
7204
int count=0, total=daemon->num-1;
usr.sbin/unbound/daemon/remote.c
7293
mesh->use_response_ip = worker->daemon->use_response_ip;
usr.sbin/unbound/daemon/remote.c
7294
mesh->use_rpz = worker->daemon->use_rpz;
usr.sbin/unbound/daemon/remote.c
7368
lock_rw_wrlock(&worker->daemon->fast_reload_thread->old_auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7377
*loadxfr = auth_xfer_find(worker->daemon->fast_reload_thread->
usr.sbin/unbound/daemon/remote.c
7410
lock_rw_unlock(&worker->daemon->fast_reload_thread->old_auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7429
lock_rw_unlock(&worker->daemon->fast_reload_thread->old_auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7494
lock_rw_unlock(&worker->daemon->fast_reload_thread->old_auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7555
lock_rw_unlock(&worker->daemon->fast_reload_thread->old_auth_zones->lock);
usr.sbin/unbound/daemon/remote.c
7631
if(worker->daemon->fast_reload_tcl_has_changes)
usr.sbin/unbound/daemon/remote.c
7637
worker->daemon->fast_reload_thread->auth_zone_change_list);
usr.sbin/unbound/daemon/remote.c
7639
worker->env.cachedb_enabled = worker->daemon->env->cachedb_enabled;
usr.sbin/unbound/daemon/remote.c
7650
struct daemon* daemon = fr->worker->daemon;
usr.sbin/unbound/daemon/remote.c
7654
for(i=0; i<daemon->num; i++) {
usr.sbin/unbound/daemon/remote.c
7657
worker_send_cmd(daemon->workers[i], worker_cmd_reload_stop);
usr.sbin/unbound/daemon/remote.c
7670
for(i=0; i<daemon->num; i++) {
usr.sbin/unbound/daemon/remote.c
7673
worker_send_cmd(daemon->workers[i], worker_cmd_reload_start);
usr.sbin/unbound/daemon/remote.c
7677
if(fr->worker->daemon->fast_reload_drop_mesh) {
usr.sbin/unbound/daemon/remote.c
7699
struct daemon* daemon = fr->worker->daemon;
usr.sbin/unbound/daemon/remote.c
7704
for(i=0; i<daemon->num; i++) {
usr.sbin/unbound/daemon/remote.c
7707
worker_send_cmd(daemon->workers[i], worker_cmd_reload_poll);
usr.sbin/unbound/daemon/remote.c
7799
while(worker->daemon->fast_reload_thread) {
usr.sbin/unbound/daemon/remote.c
7804
if(worker->daemon->fast_reload_thread)
usr.sbin/unbound/daemon/remote.c
7805
ub_winsock_tcp_wouldblock(worker->daemon->
usr.sbin/unbound/daemon/remote.c
7813
if(worker->daemon->fast_reload_thread)
usr.sbin/unbound/daemon/remote.c
7814
ub_winsock_tcp_wouldblock(worker->daemon->
usr.sbin/unbound/daemon/remote.c
7833
if(worker->daemon->fast_reload_thread != NULL) {
usr.sbin/unbound/daemon/remote.c
8101
fr_printq_list_insert(struct fast_reload_printq* printq, struct daemon* daemon)
usr.sbin/unbound/daemon/remote.c
8105
printq->next = daemon->fast_reload_printq_list;
usr.sbin/unbound/daemon/remote.c
8110
daemon->fast_reload_printq_list = printq;
usr.sbin/unbound/daemon/remote.c
8129
struct daemon* daemon = printq->worker->daemon;
usr.sbin/unbound/daemon/remote.c
8131
daemon->fast_reload_printq_list = printq->next;
usr.sbin/unbound/daemon/remote.c
8145
if(printq->worker->daemon->fast_reload_thread &&
usr.sbin/unbound/daemon/remote.c
8146
printq->worker->daemon->fast_reload_thread->printq == printq)
usr.sbin/unbound/daemon/remote.c
8147
printq->worker->daemon->fast_reload_thread->printq = NULL;
usr.sbin/unbound/daemon/remote.c
8165
if(worker->daemon->fast_reload_thread) {
usr.sbin/unbound/daemon/remote.c
8175
worker->daemon->fast_reload_thread->started = 1;
usr.sbin/unbound/daemon/remote.c
8185
fd_set_nonblock(worker->daemon->fast_reload_thread->commpair[0]);
usr.sbin/unbound/daemon/remote.c
8186
worker->daemon->fast_reload_thread->service_event = ub_event_new(
usr.sbin/unbound/daemon/remote.c
8188
worker->daemon->fast_reload_thread->commpair[0],
usr.sbin/unbound/daemon/remote.c
8190
worker->daemon->fast_reload_thread);
usr.sbin/unbound/daemon/remote.c
8191
if(!worker->daemon->fast_reload_thread->service_event) {
usr.sbin/unbound/daemon/remote.c
8192
fast_reload_thread_desetup(worker->daemon->fast_reload_thread);
usr.sbin/unbound/daemon/remote.c
8197
if(ub_event_add(worker->daemon->fast_reload_thread->service_event,
usr.sbin/unbound/daemon/remote.c
8199
fast_reload_thread_desetup(worker->daemon->fast_reload_thread);
usr.sbin/unbound/daemon/remote.c
8204
worker->daemon->fast_reload_thread->service_event_is_added = 1;
usr.sbin/unbound/daemon/remote.c
8216
worker->daemon->fast_reload_thread->printq = fr_printq_create(s->c,
usr.sbin/unbound/daemon/remote.c
8218
if(!worker->daemon->fast_reload_thread->printq) {
usr.sbin/unbound/daemon/remote.c
8219
fast_reload_thread_desetup(worker->daemon->fast_reload_thread);
usr.sbin/unbound/daemon/remote.c
8224
worker->daemon->fast_reload_thread->printq->remote = *ssl;
usr.sbin/unbound/daemon/remote.c
8227
comm_point_stop_listening(worker->daemon->fast_reload_thread->printq->client_cp);
usr.sbin/unbound/daemon/remote.c
8230
ub_thread_create(&worker->daemon->fast_reload_thread->tid,
usr.sbin/unbound/daemon/remote.c
8231
fast_reload_thread_main, worker->daemon->fast_reload_thread);
usr.sbin/unbound/daemon/remote.c
8244
if(worker->daemon->fast_reload_thread != NULL) {
usr.sbin/unbound/daemon/remote.c
889
print_mem(RES* ssl, struct worker* worker, struct daemon* daemon,
usr.sbin/unbound/daemon/remote.c
906
msg = slabhash_get_mem(daemon->env->msg_cache);
usr.sbin/unbound/daemon/remote.c
907
rrset = slabhash_get_mem(&daemon->env->rrset_cache->table);
usr.sbin/unbound/daemon/remote.c
918
if(daemon->dnscenv) {
usr.sbin/unbound/daemon/remote.c
920
daemon->dnscenv->shared_secrets_cache);
usr.sbin/unbound/daemon/remote.c
921
dnscrypt_nonce = slabhash_get_mem(daemon->dnscenv->nonces_cache);
usr.sbin/unbound/daemon/remote.c
980
timeval_subtract(&up, &now, &worker->daemon->time_boot);
usr.sbin/unbound/daemon/remote.c
981
timeval_subtract(&dt, &now, &worker->daemon->time_last_stat);
usr.sbin/unbound/daemon/remote.c
983
worker->daemon->time_last_stat = now;
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
313
if(worker->daemon->dnscenv) {
usr.sbin/unbound/daemon/stats.c
317
worker->daemon->dnscenv->shared_secrets_cache);
usr.sbin/unbound/daemon/stats.c
319
worker->daemon->dnscenv->nonces_cache);
usr.sbin/unbound/daemon/stats.c
346
worker->daemon->doq_table);
usr.sbin/unbound/daemon/stats.c
437
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
484
setup_sslctxs(struct daemon* daemon, struct config_file* cfg)
usr.sbin/unbound/daemon/unbound.c
487
if(!(daemon->rc = daemon_remote_create(cfg)))
usr.sbin/unbound/daemon/unbound.c
499
(void)setup_listen_sslctx(&daemon->listen_dot_sslctx, 1, 0, cfg);
usr.sbin/unbound/daemon/unbound.c
502
(void)setup_listen_sslctx(&daemon->listen_doh_sslctx, 0, 1, cfg);
usr.sbin/unbound/daemon/unbound.c
507
if(!(daemon->listen_quic_sslctx = quic_sslctx_create(
usr.sbin/unbound/daemon/unbound.c
514
if(!(daemon->connect_dot_sslctx = connect_sslctx_create(NULL, NULL,
usr.sbin/unbound/daemon/unbound.c
518
(void)daemon;(void)cfg;
usr.sbin/unbound/daemon/unbound.c
524
perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
usr.sbin/unbound/daemon/unbound.c
534
if(!daemon_privileged(daemon))
usr.sbin/unbound/daemon/unbound.c
548
(void)setup_sslctxs(daemon, cfg);
usr.sbin/unbound/daemon/unbound.c
572
daemon->pidfile = strdup(cfg->pidfile);
usr.sbin/unbound/daemon/unbound.c
573
else daemon->pidfile = fname_after_chroot(cfg->pidfile,
usr.sbin/unbound/daemon/unbound.c
575
if(!daemon->pidfile)
usr.sbin/unbound/daemon/unbound.c
585
checkoldpid(daemon->pidfile, pidinchroot);
usr.sbin/unbound/daemon/unbound.c
597
writepid(daemon->pidfile, getpid());
usr.sbin/unbound/daemon/unbound.c
600
(void)daemon;
usr.sbin/unbound/daemon/unbound.c
641
if(daemon->pidfile && daemon->pidfile[0] &&
usr.sbin/unbound/daemon/unbound.c
642
strncmp(daemon->pidfile, cfg->chrootdir,
usr.sbin/unbound/daemon/unbound.c
644
char* old = daemon->pidfile;
usr.sbin/unbound/daemon/unbound.c
645
daemon->pidfile = strdup(old+strlen(cfg->chrootdir));
usr.sbin/unbound/daemon/unbound.c
647
if(!daemon->pidfile)
usr.sbin/unbound/daemon/unbound.c
650
daemon->chroot = strdup(cfg->chrootdir);
usr.sbin/unbound/daemon/unbound.c
651
if(!daemon->chroot)
usr.sbin/unbound/daemon/unbound.c
711
daemon->cfgfile = strdup(*cfgfile);
usr.sbin/unbound/daemon/unbound.c
712
if(!daemon->cfgfile)
usr.sbin/unbound/daemon/unbound.c
728
struct daemon* daemon = NULL;
usr.sbin/unbound/daemon/unbound.c
731
if(!(daemon = daemon_init()))
usr.sbin/unbound/daemon/unbound.c
733
while(!daemon->need_to_exit) {
usr.sbin/unbound/daemon/unbound.c
741
if(!config_read(cfg, cfgfile, daemon->chroot)) {
usr.sbin/unbound/daemon/unbound.c
750
apply_settings(daemon, cfg, cmdline_verbose, debug_mode);
usr.sbin/unbound/daemon/unbound.c
755
if(!daemon_open_shared_ports(daemon))
usr.sbin/unbound/daemon/unbound.c
758
perform_setup(daemon, cfg, debug_mode, &cfgfile, need_pidfile);
usr.sbin/unbound/daemon/unbound.c
766
daemon_fork(daemon);
usr.sbin/unbound/daemon/unbound.c
770
daemon_cleanup(daemon);
usr.sbin/unbound/daemon/unbound.c
776
if(daemon->pidfile) {
usr.sbin/unbound/daemon/unbound.c
779
fd = open(daemon->pidfile, O_WRONLY | O_TRUNC
usr.sbin/unbound/daemon/unbound.c
787
unlink(daemon->pidfile);
usr.sbin/unbound/daemon/unbound.c
789
daemon_delete(daemon);
usr.sbin/unbound/daemon/worker.c
139
superac = alloc_get_mem(&worker->daemon->superalloc);
usr.sbin/unbound/daemon/worker.c
1397
*acladdr = acl_addr_lookup(worker->daemon->acl,
usr.sbin/unbound/daemon/worker.c
1400
*acladdr = acl_addr_lookup(worker->daemon->acl,
usr.sbin/unbound/daemon/worker.c
1499
repinfo->max_udp_size = worker->daemon->cfg->max_udp_size;
usr.sbin/unbound/daemon/worker.c
1500
if(!dnsc_handle_curved_request(worker->daemon->dnscenv, repinfo)) {
usr.sbin/unbound/daemon/worker.c
1527
worker->daemon->dnscenv->provider_name) == 0)) {
usr.sbin/unbound/daemon/worker.c
1530
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
1662
worker->daemon->cookie_secrets)) != 0) {
usr.sbin/unbound/daemon/worker.c
169
me += acl_list_get_mem(worker->daemon->acl);
usr.sbin/unbound/daemon/worker.c
1690
worker->daemon->cfg->harden_short_bufsize) {
usr.sbin/unbound/daemon/worker.c
1755
if(edns.udp_size > worker->daemon->cfg->max_udp_size &&
usr.sbin/unbound/daemon/worker.c
1762
edns.udp_size = worker->daemon->cfg->max_udp_size;
usr.sbin/unbound/daemon/worker.c
1796
if(local_zones_answer(worker->daemon->local_zones, &worker->env, &qinfo,
usr.sbin/unbound/daemon/worker.c
1800
acladdr->tag_datas_size, worker->daemon->cfg->tagname,
usr.sbin/unbound/daemon/worker.c
1801
worker->daemon->cfg->num_tags, acladdr->view)) {
usr.sbin/unbound/daemon/worker.c
1887
if((worker->daemon->use_response_ip || worker->daemon->use_rpz) &&
usr.sbin/unbound/daemon/worker.c
2124
if (worker->daemon->cfg->shm_enable) {
usr.sbin/unbound/daemon/worker.c
2127
if(!worker->daemon->cfg->stat_cumulative) {
usr.sbin/unbound/daemon/worker.c
2147
worker_create(struct daemon* daemon, int id, int* ports, int n)
usr.sbin/unbound/daemon/worker.c
2160
worker->daemon = daemon;
usr.sbin/unbound/daemon/worker.c
2168
if(!(worker->rndstate = ub_initstate(daemon->rand))) {
usr.sbin/unbound/daemon/worker.c
2232
if(!daemon_remote_open_accept(worker->daemon->rc,
usr.sbin/unbound/daemon/worker.c
2233
worker->daemon->rc_ports, worker)) {
usr.sbin/unbound/daemon/worker.c
2245
log_assert(worker->daemon->dtenv != NULL);
usr.sbin/unbound/daemon/worker.c
2246
memcpy(&worker->dtenv, worker->daemon->dtenv, sizeof(struct dt_env));
usr.sbin/unbound/daemon/worker.c
2258
worker->daemon->tcl, worker->daemon->listen_dot_sslctx,
usr.sbin/unbound/daemon/worker.c
2259
worker->daemon->listen_doh_sslctx,
usr.sbin/unbound/daemon/worker.c
2260
worker->daemon->listen_quic_sslctx,
usr.sbin/unbound/daemon/worker.c
2261
dtenv, worker->daemon->doq_table, worker->env.rnd,
usr.sbin/unbound/daemon/worker.c
2272
worker->daemon->env->infra_cache, worker->rndstate,
usr.sbin/unbound/daemon/worker.c
2277
worker->daemon->connect_dot_sslctx, cfg->delay_close,
usr.sbin/unbound/daemon/worker.c
2286
iterator_set_ip46_support(&worker->daemon->mods, worker->daemon->env,
usr.sbin/unbound/daemon/worker.c
2311
worker->alloc = worker->daemon->worker_allocs[worker->thread_num];
usr.sbin/unbound/daemon/worker.c
2313
worker->env = *worker->daemon->env;
usr.sbin/unbound/daemon/worker.c
2332
worker->env.mesh = mesh_create(&worker->daemon->mods, &worker->env);
usr.sbin/unbound/daemon/worker.c
2339
worker->env.mesh->use_response_ip = worker->daemon->use_response_ip;
usr.sbin/unbound/daemon/worker.c
2340
worker->env.mesh->use_rpz = worker->daemon->use_rpz;
usr.sbin/unbound/daemon/worker.c
2382
if(worker->daemon->cfg->dnstap
usr.sbin/unbound/daemon/worker.c
2388
worker->base), worker->daemon->num)) {
usr.sbin/unbound/daemon/worker.c
2438
if(worker->daemon->cfg->dnstap
usr.sbin/unbound/daemon/worker.c
2501
daemon_remote_start_accept(worker->daemon->rc);
usr.sbin/unbound/daemon/worker.c
2509
daemon_remote_stop_accept(worker->daemon->rc);
usr.sbin/unbound/daemon/worker.c
321
worker->daemon->cfg->harden_large_queries) {
usr.sbin/unbound/daemon/worker.c
390
ret = send(worker->daemon->fast_reload_thread->commreload[1],
usr.sbin/unbound/daemon/worker.c
443
if(worker->daemon->fast_reload_drop_mesh) {
usr.sbin/unbound/daemon/worker.c
844
if((worker->daemon->use_response_ip || worker->daemon->use_rpz) &&
usr.sbin/unbound/daemon/worker.h
153
struct worker* worker_create(struct daemon* daemon, int id, int* ports, int n);
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
153
struct daemon;
usr.sbin/unbound/testcode/replay.h
308
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
189
(void)daemon;
usr.sbin/unbound/util/shm_side/shm_main.c
194
void shm_main_shutdown(struct daemon* daemon)
usr.sbin/unbound/util/shm_side/shm_main.c
198
if(!daemon->cfg->shm_enable || !daemon->shm_info)
usr.sbin/unbound/util/shm_side/shm_main.c
202
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
205
if (daemon->shm_info->id_ctl >= 0)
usr.sbin/unbound/util/shm_side/shm_main.c
206
shmctl(daemon->shm_info->id_ctl, IPC_RMID, NULL);
usr.sbin/unbound/util/shm_side/shm_main.c
208
if (daemon->shm_info->id_arr >= 0)
usr.sbin/unbound/util/shm_side/shm_main.c
209
shmctl(daemon->shm_info->id_arr, IPC_RMID, NULL);
usr.sbin/unbound/util/shm_side/shm_main.c
211
if (daemon->shm_info->ptr_ctl)
usr.sbin/unbound/util/shm_side/shm_main.c
212
shmdt(daemon->shm_info->ptr_ctl);
usr.sbin/unbound/util/shm_side/shm_main.c
214
if (daemon->shm_info->ptr_arr)
usr.sbin/unbound/util/shm_side/shm_main.c
215
shmdt(daemon->shm_info->ptr_arr);
usr.sbin/unbound/util/shm_side/shm_main.c
217
free(daemon->shm_info);
usr.sbin/unbound/util/shm_side/shm_main.c
218
daemon->shm_info = NULL;
usr.sbin/unbound/util/shm_side/shm_main.c
220
(void)daemon;
usr.sbin/unbound/util/shm_side/shm_main.c
234
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
238
stat_total = worker->daemon->shm_info->ptr_arr;
usr.sbin/unbound/util/shm_side/shm_main.c
239
stat_info = worker->daemon->shm_info->ptr_arr + offset;
usr.sbin/unbound/util/shm_side/shm_main.c
252
shm_stat = worker->daemon->shm_info->ptr_ctl;
usr.sbin/unbound/util/shm_side/shm_main.c
257
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
258
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
264
if(worker->daemon->dnscenv) {
usr.sbin/unbound/util/shm_side/shm_main.c
266
worker->daemon->dnscenv->shared_secrets_cache);
usr.sbin/unbound/util/shm_side/shm_main.c
268
worker->daemon->dnscenv->nonces_cache);
usr.sbin/unbound/util/shm_side/shm_main.c
303
stat_total->mesh_time_median /= (double)worker->daemon->num;
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
64
int shm_main_init(struct daemon* daemon);
usr.sbin/unbound/util/shm_side/shm_main.h
65
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
565
if (daemon(1, 0) == -1)