-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathhttpd.h
46 lines (36 loc) · 909 Bytes
/
httpd.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
* Copyright 2022 zhenwei pi
*
* Authors:
* zhenwei pi <[email protected]>
*
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
#ifndef _HTTPD_H_
#define _HTTPD_H_
extern int __debug;
#include "connection.h"
#define log_debug(fmt, args...) \
if (__debug) { \
fprintf(stdout, "%s[%d] " fmt, \
__func__, __LINE__, ##args); \
}
int rawlog_parse_all(const char *path);
int rawlog_get_record(time_t ts, char *lables, connection *conn);
typedef struct atophttpd_tls_context_config {
int tls_port;
char *tls_addr;
char *ca_cert_file;
char *cert_file;
char *key_file;
} atophttpd_tls_context_config;
struct atophttd_context {
int port;
int daemonmode;
char *addr;
char *log_path;
atophttpd_tls_context_config tls_ctx_config;
connection* listeners[CONN_TYPE_MAX];
};
#endif