Data Structures | Functions
daemon.h File Reference

The daemon consists of global settings and a number of workers. More...

#include "util/locks.h"
#include "util/alloc.h"
#include "services/modstack.h"
#include "dnstap/dnstap_config.h"

Data Structures

struct  daemon
 Structure holding worker list. More...
 

Functions

struct daemondaemon_init (void)
 Initialize daemon structure. More...
 
int daemon_open_shared_ports (struct daemon *daemon)
 Open shared listening ports (if needed). More...
 
void daemon_fork (struct daemon *daemon)
 Fork workers and start service. More...
 
void daemon_cleanup (struct daemon *daemon)
 Close off the worker thread information. More...
 
void daemon_delete (struct daemon *daemon)
 Delete workers, close listening ports. More...
 
void daemon_apply_cfg (struct daemon *daemon, struct config_file *cfg)
 Apply config settings. More...
 

Detailed Description

The daemon consists of global settings and a number of workers.

Function Documentation

struct daemon* daemon_init ( void  )
int daemon_open_shared_ports ( struct daemon daemon)
void daemon_fork ( struct daemon daemon)
void daemon_cleanup ( struct daemon daemon)

Close off the worker thread information.

Bring the daemon back into state ready for daemon_fork again.

Parameters
daemonthe daemon.

References daemon::cfg, daemon_remote_clear(), daemon::env, daemon::local_zones, local_zones_delete(), log_assert, log_thread_set(), module_env::msg_cache, daemon::num, daemon::rc, module_env::rrset_cache, signal_handling_record(), slabhash_clear(), rrset_cache::table, worker_delete(), and daemon::workers.

Referenced by run_daemon(), service_deinit(), and service_main().

void daemon_delete ( struct daemon daemon)
void daemon_apply_cfg ( struct daemon daemon,
struct config_file cfg 
)