X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=postlicyd%2Fconfig.h;h=6584919292c986d67bcc6d87b733ba5f0940eaf7;hb=7961b29b3aae8dee45748bf66e30a45c76a47272;hp=f823bce3e00377ab703817b6c16f32d7fa0849e2;hpb=9b993811fe1fd208afd954e86c0bfc81a78af04f;p=apps%2Fpfixtools.git diff --git a/postlicyd/config.h b/postlicyd/config.h index f823bce..6584919 100644 --- a/postlicyd/config.h +++ b/postlicyd/config.h @@ -36,11 +36,43 @@ #ifndef PFIXTOOLS_CONFIG_H #define PFIXTOOLS_CONFIG_H +#include "filter.h" + typedef struct config_t config_t; +struct config_t { + /* SOURCE */ + /* Root configuration file. + */ + const char *filename; + + /* Parameters. + */ + A(filter_param_t) params; + + + /* INTERPRETED */ + /* Filters. + */ + A(filter_t) filters; + + /* Entry point of the filters. + * (one per smtp state) + */ + int entry_points[SMTP_count]; + + /* Port on which the program have to bind to. + * The parameter from CLI override the parameter from configuration file. + */ + uint16_t port; +}; + __attribute__((nonnull(1))) config_t *config_read(const char *file); +__attribute__((nonnull(1))) +bool config_reload(config_t *config); + void config_delete(config_t **config); #endif