cfg.h File Reference
`#include "config.h"`
`#include <stdio.h>`
`#include "status.h"`
`#include "hsm.h"`
`#include "locks.h"`
`#include "wire/listener.h"`

Go to the source code of this file.

## Data Structures

struct | engineconfig_struct

## Typedefs

typedef struct engineconfig_struct | engineconfig_type

## Functions

engineconfig_type * | engine_config (const char *cfgfile, int cmdline_verbosity)
ods_status | engine_config_check (engineconfig_type *config)
void | engine_config_print (FILE *out, engineconfig_type *config)
void | engine_config_cleanup (engineconfig_type *config)

## Typedef Documentation

## engineconfig_type

typedef struct engineconfig_struct engineconfig_type

Definition at line 33 of file cfg.h.

## Function Documentation

## engine_config()

engineconfig_type* engine_config | ( | const char * | cfgfile,
|  | int | cmdline_verbosity
| ) |  |

Configure engine.

Parameters

  [in] | allocator | memory allocator
  [in] | cfgfile | config file
  [in] | cmdline_verbosity | log level

Returns
  engineconfig_type* engine configuration

Configure engine.

Definition at line 51 of file cfg.c.

References parse_file_check().

## engine_config_check()

ods_status engine_config_check | ( | engineconfig_type * | config | ) |

Check configuration.

Parameters

  [in] | config | engine configuration

Returns
  ods_status status ODS_STATUS_OK: configuration settings ok else: error in configuration settings

Check configuration.

Definition at line 110 of file cfg.c.

## engine_config_cleanup()

void engine_config_cleanup | ( | engineconfig_type * | config | ) |

Clean up config.

Parameters

  [in] | config | engine configuration

Clean up config.

Definition at line 243 of file cfg.c.

References engineconfig_struct::cfg_filename, engineconfig_struct::chroot, engineconfig_struct::clisock_filename, engineconfig_struct::group, engineconfig_struct::interfaces, listener_cleanup(), engineconfig_struct::log_filename, engineconfig_struct::notify_command, engineconfig_struct::pid_filename, engineconfig_struct::repositories, engineconfig_struct::username, engineconfig_struct::working_dir, and engineconfig_struct::zonelist_filename.

Referenced by engine_cleanup().

## engine_config_print()

void engine_config_print | ( | FILE * | out,
|  | engineconfig_type * | config
| ) |  |

Print engine configuration.

Parameters

  [in] | out | output file descriptor
  [in] | config | engine configuration

Print configuration.

Definition at line 146 of file cfg.c.

References interface_struct::address, engineconfig_struct::chroot, listener_struct::count, engineconfig_struct::group, engineconfig_struct::interfaces, listener_struct::interfaces, engineconfig_struct::log_filename, engineconfig_struct::notify_command, engineconfig_struct::num_signer_threads, engineconfig_struct::num_worker_threads, interface_struct::port, engineconfig_struct::use_syslog, engineconfig_struct::username, engineconfig_struct::working_dir, and engineconfig_struct::zonelist_filename.