From d962394a02426072737d50318e71e2286023fab6 Mon Sep 17 00:00:00 2001 From: git commit -m first Date: Thu, 29 Aug 2019 10:14:11 +0800 Subject: post all srccode --- src/http_stat_header.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/http_stat_header.h (limited to 'src/http_stat_header.h') 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 -- cgit v1.2.3