OpenDNSSEC-signer 1.2.1
Data Structures | Defines | Typedefs | Functions

/build/buildd-opendnssec_1.2.1.dfsg-1-mips-p9AT07/opendnssec-1.2.1.dfsg/signer/src/daemon/engine.h File Reference

#include "config.h"
#include "daemon/cmdhandler.h"
#include "daemon/cfg.h"
#include "daemon/worker.h"
#include "scheduler/locks.h"
#include "scheduler/task.h"
#include "signer/zonelist.h"
#include <signal.h>
Include dependency graph for engine.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  engine_struct

Defines

#define SIGNAL_RUN   0
#define SIGNAL_INIT   1
#define SIGNAL_RELOAD   2
#define SIGNAL_SHUTDOWN   3

Typedefs

typedef struct engine_struct engine_type

Functions

engine_typeengine_create (void)
void engine_start (const char *cfgfile, int cmdline_verbosity, int daemonize, int info, int single_run)
void set_notify_ns (zone_type *zone, const char *cmd)
int engine_update_zonelist (engine_type *engine, char *buf)
int engine_update_zones (engine_type *engine, const char *zone_name, char *buf, int first_try)
int engine_search_workers (engine_type *engine, const char *zone_name)
void engine_cleanup (engine_type *engine)

Define Documentation

#define SIGNAL_INIT   1

Definition at line 48 of file engine.h.

#define SIGNAL_RELOAD   2

Definition at line 49 of file engine.h.

Referenced by signal_capture().

#define SIGNAL_RUN   0

The engine.

Definition at line 47 of file engine.h.

#define SIGNAL_SHUTDOWN   3

Definition at line 50 of file engine.h.

Referenced by signal_capture().


Typedef Documentation

typedef struct engine_struct engine_type

Engine stuff.

Definition at line 56 of file engine.h.


Function Documentation

void engine_cleanup ( engine_type engine)
engine_type* engine_create ( void  )
int engine_search_workers ( engine_type engine,
const char *  zone_name 
)

Search for zone in workers

Parameters:
[in]enginethe signer engine [in] zone_name search for this zone
Returns:
int 1 if zone was not found

Search for zone in workers

Definition at line 380 of file engine.c.

References engine_struct::config, engineconfig_struct::num_worker_threads, se_log_assert, se_strcmp(), worker_struct::task, task_struct::who, and engine_struct::workers.

void engine_start ( const char *  cfgfile,
int  cmdline_verbosity,
int  daemonize,
int  info,
int  single_run 
)
int engine_update_zonelist ( engine_type engine,
char *  buf 
)

Update zone list.

Parameters:
[in]thesigner engine
[in]bufresponse message
Returns:
int 0 if zonelist changed, 1 otherwise

Update zone list.

Definition at line 753 of file engine.c.

References engine_struct::config, zonelist_struct::last_modified, engineconfig_struct::notify_command, se_log_assert, se_log_debug(), engine_struct::tasklist, engine_struct::zonelist, engineconfig_struct::zonelist_filename, zonelist_lock(), zonelist_merge(), zonelist_read(), zonelist_unlock(), and zonelist_update().

Referenced by engine_start().

int engine_update_zones ( engine_type engine,
const char *  zone_name,
char *  buf,
int  first_try 
)

Update zones.

Parameters:
[in]enginethe signer engine [in] zone_name update only this zone
[in]bufresponse message
[in]first_tryif true, update zone list if zone not found
Returns:
int 1 if zone was not found (zone_name != NULL)

Update zones.

Definition at line 811 of file engine.c.

References engine_struct::config, zone_struct::fetch, tasklist_struct::loading, lock_basic_lock, lock_basic_unlock, zone_struct::name, se_log_assert, se_log_debug(), se_strcmp(), zone_struct::signconf_filename, engine_struct::tasklist, tasklist_struct::tasklist_lock, zone_struct::zone_lock, zone_update_signconf(), engineconfig_struct::zonefetch_filename, engine_struct::zonelist, and zonelist_struct::zones.

Referenced by engine_start().

void set_notify_ns ( zone_type zone,
const char *  cmd 
)

Parse notify command.

Parameters:
[in]zonezone
[in]cmdnotify command.

Parse notify command.

Definition at line 785 of file engine.c.

References adapter_struct::filename, zone_struct::name, zone_struct::notify_ns, zone_struct::outbound_adapter, se_free(), se_log_assert, se_log_debug(), and se_replace().

Referenced by zonelist_update().