Subversion Repositories Tewi

Rev

Rev 140 | Rev 187 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 140 Rev 156
Line 1... Line 1...
1
/* $Id: tw_config.h 140 2024-09-23 11:31:18Z nishi $ */
1
/* $Id: tw_config.h 156 2024-09-25 12:28:10Z nishi $ */
2
 
2
 
3
#ifndef __TW_CONFIG_H__
3
#ifndef __TW_CONFIG_H__
4
#define __TW_CONFIG_H__
4
#define __TW_CONFIG_H__
5
 
5
 
6
#ifdef __cplusplus
6
#ifdef __cplusplus
7
extern "C" {
7
extern "C" {
8
#endif
8
#endif
9
 
9
 
-
 
10
#include "../config.h"
-
 
11
 
10
#include "tw_http.h"
12
#include "tw_http.h"
11
 
13
 
12
#include <stdint.h>
14
#include <stdint.h>
13
#include <stdbool.h>
15
#include <stdbool.h>
14
 
16
 
Line 59... Line 61...
59
};
61
};
60
 
62
 
61
struct tw_config_entry {
63
struct tw_config_entry {
62
	char* name;
64
	char* name;
63
	int port;
65
	int port;
-
 
66
#ifndef NO_SSL
64
	char* sslkey;
67
	char* sslkey;
65
	char* sslcert;
68
	char* sslcert;
-
 
69
#endif
66
	char* root;
70
	char* root;
67
	int hideport;
71
	int hideport;
68
	struct tw_dir_entry dirs[MAX_DIRS];
72
	struct tw_dir_entry dirs[MAX_DIRS];
69
	int dir_count;
73
	int dir_count;
70
	struct tw_mime_entry mimes[MAX_DIRS];
74
	struct tw_mime_entry mimes[MAX_DIRS];
Line 73... Line 77...
73
	int icon_count;
77
	int icon_count;
74
	char* indexes[MAX_INDEX];
78
	char* indexes[MAX_INDEX];
75
	int index_count;
79
	int index_count;
76
	char* readmes[MAX_README];
80
	char* readmes[MAX_README];
77
	int readme_count;
81
	int readme_count;
-
 
82
#ifdef HAS_CHROOT
-
 
83
	char* chroot_path;
-
 
84
#endif
78
};
85
};
79
 
86
 
80
struct tw_config {
87
struct tw_config {
81
	uint64_t ports[MAX_PORTS + 1]; /* If port & (1 << 32) is non-zero, it is SSL */
88
	uint64_t ports[MAX_PORTS + 1]; /* If port & (1 << 32) is non-zero, it is SSL */
82
	char hostname[1025];
89
	char hostname[1025];
-
 
90
	char* defined[1025];
83
	struct tw_config_entry root;
91
	struct tw_config_entry root;
84
	struct tw_config_entry vhosts[MAX_VHOSTS];
92
	struct tw_config_entry vhosts[MAX_VHOSTS];
85
	void* modules[MAX_MODULES];
93
	void* modules[MAX_MODULES];
86
	int module_count;
94
	int module_count;
87
	int vhost_count;
95
	int vhost_count;