47 lines
772 B
C
47 lines
772 B
C
#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];
|
|
};
|
|
|
|
struct conf_rmps {
|
|
char bind_on_ip[13];
|
|
char bind_on_port[6];
|
|
char logfile[MAXPATHSIZE];
|
|
char errlog[MAXPATHSIZE];
|
|
LOG_LEVEL loglevel;
|
|
char pidfile[MAXPATHSIZE];
|
|
char certfile[MAXPATHSIZE];
|
|
char keyfile[MAXPATHSIZE];
|
|
char cafile[MAXPATHSIZE];
|
|
char cipherlist[1024];
|
|
int threadpoolsize;
|
|
};
|
|
|
|
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);
|
|
|
|
#endif /* CONFPARSER_H */
|
|
|