1
0
mirror of https://git.sr.ht/~sircmpwn/gmnisrv synced 2024-09-15 06:08:06 -04:00
gmnisrv/include/config.h

35 lines
622 B
C
Raw Normal View History

2020-09-23 11:19:29 -04:00
#ifndef GMNISRV_CONFIG
#define GMNISRV_CONFIG
#include <arpa/inet.h>
struct gmnisrv_tls {
char *store;
char *organization;
char *email;
};
struct gmnisrv_host {
char *hostname;
char *root;
struct gmnisrv_host *next;
};
struct gmnisrv_bind {
2020-09-23 11:33:05 -04:00
int family, port;
2020-09-23 11:19:29 -04:00
char addr[sizeof(struct in6_addr)];
struct gmnisrv_bind *next;
};
struct gmnisrv_config {
struct gmnisrv_tls tls;
struct gmnisrv_host *hosts;
struct gmnisrv_bind *binds;
};
int load_config(struct gmnisrv_config *conf, const char *path);
struct gmnisrv_host *gmnisrv_config_get_host(
struct gmnisrv_config *conf, const char *hostname);
#endif