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

§ daemon_init()

struct daemon* daemon_init ( void  )

Initialize daemon structure.

Returns
: The daemon structure, or NULL on error.

Referenced by run_daemon().

§ daemon_open_shared_ports()

int daemon_open_shared_ports ( struct daemon daemon)

§ daemon_fork()

void daemon_fork ( struct daemon daemon)

Fork workers and start service.

When the routine exits, it is no longer forked.

Parameters
daemonthe daemon.

References log_assert, daemon::views, and views_create().

§ daemon_cleanup()

void daemon_cleanup ( struct daemon daemon)

§ daemon_delete()

void daemon_delete ( struct daemon daemon)

§ daemon_apply_cfg()

void daemon_apply_cfg ( struct daemon daemon,
struct config_file cfg 
)