X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=postlicyd%2Fconfig.h;h=26fb619e8d2a0e6c97a0cd65ca1d7e58f4fd07ad;hb=56eeb7d73ed0c82f2a8165b6aba525af73c58f73;hp=00d4324d6d329a3d525a4d27230b70934dd88d53;hpb=db33734000d10dde33e52777bc76b0ee398be406;p=apps%2Fpfixtools.git diff --git a/postlicyd/config.h b/postlicyd/config.h index 00d4324..26fb619 100644 --- a/postlicyd/config.h +++ b/postlicyd/config.h @@ -41,14 +41,41 @@ typedef struct config_t config_t; struct config_t { - A(filter_t) filters; + /* SOURCE */ + /* Root configuration file. + */ + const char *filename; + + /* Parameters. + */ A(filter_param_t) params; - int entry_point; + + + /* 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_check(const char *file); + +__attribute__((nonnull(1))) +bool config_reload(config_t *config); + void config_delete(config_t **config); #endif