engine.h File Reference
`#include "config.h"`
`#include <signal.h>`
`#include "daemon/cfg.h"`
`#include "cmdhandler.h"`
`#include "daemon/dnshandler.h"`
`#include "daemon/xfrhandler.h"`
`#include "scheduler/worker.h"`
`#include "scheduler/schedule.h"`
`#include "status.h"`
`#include "locks.h"`
`#include "signer/zonelist.h"`
`#include "wire/edns.h"`

Go to the source code of this file.

## Data Structures

struct | engine_struct

## Typedefs

typedef struct engine_struct | engine_type

## Functions

int | engine_start (const char *cfgfile, int cmdline_verbosity, int daemonize, int info)
void | engine_wakeup_workers (engine_type *engine)
void | engine_update_zones (engine_type *engine, ods_status zl_changed)
void | engine_cleanup (engine_type *engine)

## Typedef Documentation

## engine_type

typedef struct engine_struct engine_type

The engine.

Definition at line 38 of file engine.h.

## Function Documentation

## engine_cleanup()

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

extern

Clean up engine.

Parameters

  [in] | engine | engine

Clean up engine.

Definition at line 889 of file engine.c.

References dnshandler_cleanup(), engine_config_cleanup(), xfrhandler_cleanup(), and zonelist_cleanup().

Referenced by engine_start().

## engine_start()

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

extern

Start engine.

Parameters

  [in] | cfgfile | configuration file
  [in] | cmdline_verbosity | how many -v on the command line
  [in] | daemonize | to run as daemon or not
  [in] | info | print info and exit
  [in] | single_run | run once

Returns
  0 if successful, 1 on error

Start engine.

Definition at line 768 of file engine.c.

References engine_cleanup(), engine_config(), engine_config_check(), engine_config_print(), engine_update_zones(), tsig_handler_cleanup(), and zonelist_update().

Referenced by main().

## engine_update_zones()

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

extern

Update zones.

Parameters

  [in] | engine | engine
  [in] | zl_changed | whether the zonelist has changed or not

Update zones.

Definition at line 617 of file engine.c.

References adapter_load_config(), zone_struct::adinbound, zone_struct::adoutbound, dnshandler_fwd_notify(), engine_wakeup_workers(), xfrd_struct::handler, zone_struct::name, netio_remove_handler(), zone_struct::notify_command, zone_struct::notify_ns, ODS_SE_NOTIFY_CMD, zone_struct::xfrd, zone_struct::zl_status, zone_cleanup(), zone_struct::zone_lock, ZONE_ZL_ADDED, ZONE_ZL_OK, ZONE_ZL_REMOVED, and zonelist_del_zone().

Referenced by engine_start().

## engine_wakeup_workers()

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

extern

Wake up workers.

Parameters

  [in] | engine | engine

Wake up all workers.

Definition at line 291 of file engine.c.

Referenced by engine_update_zones().