summaryrefslogtreecommitdiff
path: root/src/http_stat_header.h
blob: a7dd42ad6927153e2e52dfab99ebd4ca97d9b9ec (plain)
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
47
48
#ifndef HTTP_STAT_HEADER_
#define HTTP_STAT_HEADER_
#include "http_header_v1.hpp"

#define CONF_PATH "./conf/http_stat_header.conf"
#define CONT_TYPE "content_type"
#define CONT_ENCODING "content_encoding"
#define CONT_LENGHT "content_lenght"
#define DEFAULT_LOG_PATH "./log/http_statistic_runtime"
#define DEFAULT_FS_PATH "./log/http_statistic_fs"

typedef struct _content_header_flag
{
    int type_flag;
    int encoding_flag;
    int uri_flag;
    long long bflag;
}content_header_flag;

typedef struct _g_env_conf_t
{
    void * logger;
    char log_path[512];
    short log_level;
    char fs_path[512];
    screen_stat_handle_t cont_type_handle;
    screen_stat_handle_t cont_encoding_handle;
    ContentTable * cont_type_fs;
    ContentTable * cont_encoding_fs;
    ContentHistogram * cont_lenght_fs;
    long long pend_sum;
    long long close_sum;
    long long data_sum;

}g_env_conf_t;

#ifdef __cplusplus
extern "C" {
#endif
char HTTP_STAT_HEADER_ENTRY(stSessionInfo * session_info,void **pme, int thread_seq,struct streaminfo *a_stream,void *a_packet);
int HTTP_STAT_HEADER_INIT();
void HTTP_STAT_HEADER_DESTROY();

#ifdef __cplusplus
}
#endif

#endif