source: Main/trunk/Server/tw_config.h@ 20

Last change on this file since 20 was 19, checked in by Nishi, on Sep 14, 2024 at 9:51:41 AM

add fallback option

  • Property svn:keywords set to Id
File size: 697 bytes
Line 
1/* $Id: tw_config.h 19 2024-09-14 00:51:41Z nishi $ */
2
3#ifndef __TW_CONFIG_H__
4#define __TW_CONFIG_H__
5
6#include <stdint.h>
7
8#define MAX_PORTS 1024
9#define MAX_VHOSTS 1024
10#define MAX_MODULES 1024
11
12struct tw_config_entry {
13 char* name;
14 int port;
15 char* sslkey;
16 char* sslcert;
17 char* root;
18};
19
20struct tw_config {
21 uint64_t ports[MAX_PORTS + 1]; /* If port & (1 << 32) is non-zero, it is SSL */
22 char hostname[1025];
23 struct tw_config_entry root;
24 struct tw_config_entry vhosts[MAX_VHOSTS];
25 void* modules[MAX_MODULES];
26 int module_count;
27 int vhost_count;
28 char* server_root;
29 char* extension;
30};
31
32void tw_config_init(void);
33int tw_config_read(const char* path);
34struct tw_config_entry* tw_vhost_match(const char* name, int port);
35
36#endif
Note: See TracBrowser for help on using the repository browser.