tewi/Server/tw_config.h
Nishi fb2de8c01f add fallback option
git-svn-id: file:///raid/svn-personal/tewi/trunk@19 8739d7e6-ffea-ec47-b151-bdff447c6205
2024-09-14 00:51:41 +00:00

37 lines
697 B
C

/* $Id$ */
#ifndef __TW_CONFIG_H__
#define __TW_CONFIG_H__
#include <stdint.h>
#define MAX_PORTS 1024
#define MAX_VHOSTS 1024
#define MAX_MODULES 1024
struct tw_config_entry {
char* name;
int port;
char* sslkey;
char* sslcert;
char* root;
};
struct tw_config {
uint64_t ports[MAX_PORTS + 1]; /* If port & (1 << 32) is non-zero, it is SSL */
char hostname[1025];
struct tw_config_entry root;
struct tw_config_entry vhosts[MAX_VHOSTS];
void* modules[MAX_MODULES];
int module_count;
int vhost_count;
char* server_root;
char* extension;
};
void tw_config_init(void);
int tw_config_read(const char* path);
struct tw_config_entry* tw_vhost_match(const char* name, int port);
#endif