OpenDNSSEC-signer
1.4.3
|
#include "config.h"
#include "daemon/cfg.h"
#include "daemon/engine.h"
#include "daemon/signal.h"
#include "shared/allocator.h"
#include "shared/duration.h"
#include "shared/file.h"
#include "shared/hsm.h"
#include "shared/locks.h"
#include "shared/log.h"
#include "shared/privdrop.h"
#include "shared/status.h"
#include "shared/util.h"
#include "signer/zonelist.h"
#include "wire/tsig.h"
#include <errno.h>
#include <libhsm.h>
#include <libxml/parser.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/un.h>
#include <time.h>
#include <unistd.h>
Go to the source code of this file.
Functions | |
void | engine_start_drudgers (engine_type *engine) |
void | engine_stop_drudgers (engine_type *engine) |
void | engine_wakeup_workers (engine_type *engine) |
void | engine_update_zones (engine_type *engine, ods_status zl_changed) |
void | engine_start (const char *cfgfile, int cmdline_verbosity, int daemonize, int info, int single_run) |
void | engine_cleanup (engine_type *engine) |
void engine_cleanup | ( | engine_type * | engine | ) |
Clean up engine.
Definition at line 1104 of file engine.c.
References engine_struct::allocator, allocator_cleanup(), allocator_deallocate(), engine_struct::cmdhandler, cmdhandler_cleanup(), engine_struct::config, engine_struct::dnshandler, dnshandler_cleanup(), engine_struct::drudgers, engine_config_cleanup(), fifoq_cleanup(), lock_basic_destroy, lock_basic_off, engineconfig_struct::num_signer_threads, engineconfig_struct::num_worker_threads, schedule_cleanup(), engine_struct::signal_cond, engine_struct::signal_lock, engine_struct::signq, engine_struct::taskq, worker_cleanup(), engine_struct::workers, engine_struct::xfrhandler, xfrhandler_cleanup(), engine_struct::zonelist, and zonelist_cleanup().
Referenced by engine_start().
void engine_start | ( | const char * | cfgfile, |
int | cmdline_verbosity, | ||
int | daemonize, | ||
int | info, | ||
int | single_run | ||
) |
Start engine.
Definition at line 982 of file engine.c.
References engine_struct::allocator, engineconfig_struct::clisock_filename, engine_struct::cmdhandler_done, engine_struct::config, engine_struct::daemonize, engine_cleanup(), engine_config(), engine_config_check(), engine_config_print(), engine_update_zones(), zonelist_struct::just_added, zonelist_struct::just_removed, zonelist_struct::just_updated, lock_basic_lock, lock_basic_unlock, engineconfig_struct::log_filename, engine_struct::need_to_exit, engine_struct::need_to_reload, ods_fatal_exit(), ods_log_assert, ods_log_close(), ods_log_error(), ods_log_info(), ods_log_init(), ods_log_verbose(), ods_status2str(), ODS_STATUS_OK, ODS_STATUS_UNCHANGED, ODS_STATUS_WRITE_PIDFILE_ERR, engine_struct::pid, engineconfig_struct::pid_filename, tsig_handler_cleanup(), engineconfig_struct::use_syslog, util_check_pidfile(), engineconfig_struct::verbosity, zonelist_struct::zl_lock, engine_struct::zonelist, engineconfig_struct::zonelist_filename, and zonelist_update().
Referenced by main().
void engine_start_drudgers | ( | engine_type * | engine | ) |
Start drudgers.
[in] | engine | engine |
Definition at line 392 of file engine.c.
References engine_struct::config, engine_struct::drudgers, worker_struct::engine, worker_struct::need_to_exit, engineconfig_struct::num_signer_threads, ods_log_assert, ods_log_debug(), ods_thread_create, and worker_struct::thread_id.
Referenced by lhsm_check_connection().
void engine_stop_drudgers | ( | engine_type * | engine | ) |
Stop drudgers.
[in] | engine | engine |
Definition at line 429 of file engine.c.
References engine_struct::config, engine_struct::drudgers, worker_struct::engine, worker_struct::need_to_exit, engineconfig_struct::num_signer_threads, ods_log_assert, ods_log_debug(), ods_thread_join, fifoq_struct::q_lock, fifoq_struct::q_threshold, engine_struct::signq, worker_struct::thread_id, and worker_notify_all().
Referenced by lhsm_check_connection().
void engine_update_zones | ( | engine_type * | engine, |
ods_status | zl_changed | ||
) |
Update zones.
Definition at line 791 of file engine.c.
References adapter_load_config(), zone_struct::adinbound, zone_struct::adoutbound, engine_struct::config, engine_struct::dnshandler, dnshandler_fwd_notify(), engine_wakeup_workers(), xfrd_struct::handler, lock_basic_lock, lock_basic_unlock, zone_struct::name, xfrhandler_struct::netio, netio_remove_handler(), engineconfig_struct::notify_command, zone_struct::notify_ns, ods_log_assert, ods_log_crit(), ods_log_debug(), ods_log_error(), ods_log_warning(), ODS_SE_NOTIFY_CMD, ods_status2str(), ODS_STATUS_OK, schedule_struct::schedule_lock, schedule_task(), zone_struct::task, task_cleanup(), task_create(), TASK_SIGNCONF, engine_struct::taskq, time_now(), unschedule_task(), zone_struct::xfrd, engine_struct::xfrhandler, zonelist_struct::zl_lock, zone_struct::zl_status, zone_cleanup(), zone_struct::zone_lock, zone_reschedule_task(), ZONE_ZL_ADDED, ZONE_ZL_OK, ZONE_ZL_REMOVED, engine_struct::zonelist, zonelist_del_zone(), and zonelist_struct::zones.
Referenced by engine_start().
void engine_wakeup_workers | ( | engine_type * | engine | ) |
Wake up all workers.
Definition at line 456 of file engine.c.
References engine_struct::config, engineconfig_struct::num_worker_threads, ods_log_assert, ods_log_debug(), worker_wakeup(), and engine_struct::workers.
Referenced by engine_update_zones().