cfg.h File Reference
`#include "config.h"`
`#include "status.h"`
`#include <stdio.h>`
`#include <time.h>`
`#include "libhsm.h"`

Go to the source code of this file.

## Data Structures

struct | engineconfig_struct

## Typedefs

typedef struct engineconfig_struct | engineconfig_type

## Enumerations

enum | engineconfig_database_type_t { ENFORCER_DATABASE_TYPE_NONE, ENFORCER_DATABASE_TYPE_SQLITE, ENFORCER_DATABASE_TYPE_MYSQL }

## Functions

engineconfig_type * | engine_config (const char *cfgfile, int cmdline_verbosity, engineconfig_type *oldcfg)
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

Engine configuration.

Definition at line 53 of file cfg.h.

## Enumeration Type Documentation

## engineconfig_database_type_t

enum engineconfig_database_type_t

Enforcer configuration.

Enumerator
ENFORCER_DATABASE_TYPE_NONE |
ENFORCER_DATABASE_TYPE_SQLITE |
ENFORCER_DATABASE_TYPE_MYSQL |

Definition at line 43 of file cfg.h.

## Function Documentation

## engine_config()

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

Configure engine.

Parameters

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

Returns
  engineconfig_type* engine configuration

Configure engine.

Definition at line 59 of file cfg.c.

## engine_config_check()

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

Check configuration.

Parameters

  [in] | config | engine configuration

Returns
  ods_status status

Check configuration.

Definition at line 155 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 278 of file cfg.c.

References engineconfig_struct::cfg_filename, engineconfig_struct::chroot, engineconfig_struct::clisock_filename, engineconfig_struct::datastore, engineconfig_struct::db_host, engineconfig_struct::db_password, engineconfig_struct::db_username, engineconfig_struct::delegation_signer_retract_command, engineconfig_struct::delegation_signer_submit_command, engineconfig_struct::group, engineconfig_struct::log_filename, engineconfig_struct::pid_filename, engineconfig_struct::policy_filename, engineconfig_struct::repositories, engineconfig_struct::username, engineconfig_struct::working_dir, engineconfig_struct::zonefetch_filename, and engineconfig_struct::zonelist_filename.

## 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 189 of file cfg.c.

References engineconfig_struct::chroot, engineconfig_struct::delegation_signer_retract_command, engineconfig_struct::delegation_signer_submit_command, engineconfig_struct::group, engineconfig_struct::log_filename, engineconfig_struct::manual_keygen, engineconfig_struct::num_worker_threads, engineconfig_struct::policy_filename, engineconfig_struct::use_syslog, engineconfig_struct::username, engineconfig_struct::working_dir, engineconfig_struct::zonefetch_filename, and engineconfig_struct::zonelist_filename.