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