sammler/configfile.h

28 lines
638 B
C
Raw Normal View History

2006-06-13 21:34:36 +02:00
#ifndef _CONFIG_H_
#define _CONFIG_H_
2006-10-08 16:33:07 +02:00
#include <netinet/in.h>
2006-06-13 21:34:36 +02:00
#include "list.h"
struct conf_section {
struct list_head list;
char name[32];
struct list_head tupel;
};
struct conf_tupel {
struct list_head list;
char *option;
char *parameter;
};
int config_parse(char *config);
struct conf_section * config_get_section(char *name);
char * config_get_parameter(struct conf_section *section, char *option);
char * config_get_string(char *section, char *option, char *def);
int config_get_int(char *section, char *option, int def);
2006-10-08 16:33:07 +02:00
int config_get_saddr(char *section, char *option, struct sockaddr_in *sa);
2006-06-13 21:34:36 +02:00
#endif /* _CONFIG_H_ */