#ifndef CONFPARSER_H #define CONFPARSER_H #include "log.h" #define MAXPATHSIZE 256 #define HOSTNAMESIZE 128 #define CFGLINESIZE 300 struct conf_db { char type[15]; char hostname[HOSTNAMESIZE]; char port[6]; char pass[60]; /* random decision */ }; struct conf_rmps { char agent_ip[13]; char agent_port[6]; char client_ip[13]; char client_port[6]; char logfile[MAXPATHSIZE]; char errlog[MAXPATHSIZE]; enum LOG_LEVEL loglevel; char pidfile[MAXPATHSIZE]; char agent_tls_crt[MAXPATHSIZE]; char agent_tls_key[MAXPATHSIZE]; char cafile[MAXPATHSIZE]; char cipherlist[1024]; int agent_poolsize; char client_tls_crt[MAXPATHSIZE]; char client_tls_key[MAXPATHSIZE]; int client_poolsize; }; struct conf_nfs { int TODO; }; struct conf_table { int isvalid; struct conf_db db; struct conf_rmps rmps; struct conf_nfs nfs; }; extern struct conf_table conf; extern int confparse(void); extern void confexport(void); extern const char *conf_db_pass(void); extern const char *conf_db_hostname(void); #endif /* CONFPARSER_H */