diff options
| author | git commit -m first <[email protected]> | 2019-08-29 10:14:11 +0800 |
|---|---|---|
| committer | git commit -m first <[email protected]> | 2019-08-29 10:14:11 +0800 |
| commit | d962394a02426072737d50318e71e2286023fab6 (patch) | |
| tree | b29dfda5f90f237b356b6cd65fcf1557b3096daf /src/http_stat_header.h | |
Diffstat (limited to 'src/http_stat_header.h')
| -rw-r--r-- | src/http_stat_header.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/http_stat_header.h b/src/http_stat_header.h new file mode 100644 index 0000000..a7dd42a --- /dev/null +++ b/src/http_stat_header.h @@ -0,0 +1,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 |
