engine.c File Reference
`#include "config.h"`
`#include "daemon/cfg.h"`
`#include "daemon/engine.h"`
`#include "duration.h"`
`#include "file.h"`
`#include "str.h"`
`#include "hsm.h"`
`#include "locks.h"`
`#include "log.h"`
`#include "privdrop.h"`
`#include "status.h"`
`#include "util.h"`
`#include "signer/zonelist.h"`
`#include "wire/tsig.h"`
`#include "libhsm.h"`
`#include "signertasks.h"`
`#include "signercommands.h"`
`#include <ctype.h>`
`#include <errno.h>`
`#include <libxml/parser.h>`
`#include <signal.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_wakeup_workers (engine_type *engine)
void | engine_update_zones (engine_type *engine, ods_status zl_changed)
int | engine_start (const char *cfgfile, int cmdline_verbosity, int daemonize, int info)
void | engine_cleanup (engine_type *engine)

## Function Documentation

## engine_cleanup()

void engine_cleanup | ( | engine_type * | engine | ) |

Clean up engine.

Definition at line 889 of file engine.c.

References engine_struct::cmdhandler, engine_struct::config, engine_struct::dnshandler, dnshandler_cleanup(), engine_config_cleanup(), engineconfig_struct::num_signer_threads, engineconfig_struct::num_worker_threads, engine_struct::signal_cond, engine_struct::signal_lock, engine_struct::taskq, engine_struct::workers, engine_struct::xfrhandler, xfrhandler_cleanup(), engine_struct::zonelist, and zonelist_cleanup().

Referenced by engine_start().

## engine_start()

int engine_start | ( | const char * | cfgfile,
|  | int | cmdline_verbosity,
|  | int | daemonize,
|  | int | info
| ) |  |

Start engine.

Definition at line 768 of file engine.c.

References engineconfig_struct::clisock_filename, engine_struct::cmdhandler, 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, engine_struct::need_to_exit, engine_struct::need_to_reload, engine_struct::pid, engineconfig_struct::pid_filename, engineconfig_struct::repositories, tsig_handler_cleanup(), zonelist_struct::zl_lock, engine_struct::zonelist, engineconfig_struct::zonelist_filename, and zonelist_update().

Referenced by main().

## engine_update_zones()

void engine_update_zones | ( | engine_type * | engine,
|  | ods_status | zl_changed
| ) |  |

Update zones.

Definition at line 617 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, zone_struct::name, xfrhandler_struct::netio, netio_remove_handler(), engineconfig_struct::notify_command, zone_struct::notify_ns, ODS_SE_NOTIFY_CMD, engine_struct::taskq, zone_struct::xfrd, engine_struct::xfrhandler, zonelist_struct::zl_lock, zone_struct::zl_status, zone_cleanup(), zone_struct::zone_lock, ZONE_ZL_ADDED, ZONE_ZL_OK, ZONE_ZL_REMOVED, engine_struct::zonelist, zonelist_del_zone(), and zonelist_struct::zones.

Referenced by engine_start().

## engine_wakeup_workers()

void engine_wakeup_workers | ( | engine_type * | engine | ) |

Wake up all workers.

Definition at line 291 of file engine.c.

References engine_struct::config, worker_context::engine, and engine_struct::taskq.

Referenced by engine_update_zones().