summaryrefslogtreecommitdiff
path: root/src/HTTP_Analyze.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/HTTP_Analyze.h')
-rw-r--r--src/HTTP_Analyze.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/HTTP_Analyze.h b/src/HTTP_Analyze.h
new file mode 100644
index 0000000..2f78ab1
--- /dev/null
+++ b/src/HTTP_Analyze.h
@@ -0,0 +1,60 @@
+#ifndef HTTP_ANALYZE_H_
+#define HTTP_ANALYZE_H_
+
+#include "HTTP_Message.h"
+
+#define MAX_UNCOMPLETE_COUNT 256
+
+typedef struct http_stream
+{
+ uint32 create_infor_num; //data for tcp create stream, not for syn
+ int http_session_num;
+
+ http_parser_t* first_link_node; //��Ҫ���ڴ�����ʽ����/��Ӧ�Ե���Ӧ��Ϣ
+ http_parser_t* last_link_node; //��Ҫ���ڴ�����ʽ����/��Ӧ�Ե�������Ϣ
+
+ uint32 uncomplete_count; //��¼��ǰ��Ҫ����������/��Ӧ������
+ uint32 packet_offset; //�Ѵ��������ڵ�ǰ����ƫ����,��������һ������Ҫ����
+
+ char* pbuf;
+ uint32 buflen;
+ uint32 reset_count;
+#if HTTP_PROXY
+ struct streaminfo* p_stream_proxy;
+ uchar is_proxy; //callback set_proxy_fstream
+#endif
+ uchar maybe_http_stream;
+ uchar res_req; //���账��������������Ӧ
+ uchar dir; //��˫����
+ uchar is_http_falgs;
+ uchar proc_pkt_continue;
+}http_stream;
+
+/*string map func*/
+typedef uchar (*STRING_MAP_FUNC)(http_parser_t* a_http, http_stream* a_http_stream, char* value, uint32 valuelen, struct streaminfo *a_tcp,int thread_seq, void *a_packet);
+typedef struct string_map_s
+{
+ const char* string;
+ uint32 stringid;
+ STRING_MAP_FUNC handler;
+}string_map_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void http_initHttpStream(http_stream**pme, int thread_seq);
+void http_releaseHttpStream(http_stream **a_http_stream,struct streaminfo *a_tcp, int thread_seq, void *a_packet);
+void http_resetHttpStream(http_stream **ppa_http_stream,struct streaminfo *a_tcp, int thread_seq, void *a_packet);
+void http_callPlugin(http_parser_t* cur_http_node, struct streaminfo *a_tcp, int thread_seq, void *a_packet);
+int http_getLinkState(http_parser_t *cur_http_node);
+void http_resetHttpLinkNode(http_parser_t *cur_node,struct streaminfo *a_tcp, int thread_seq, void *a_packet);
+void http_releaseHttpLinkNode(http_stream *a_http_stream,struct streaminfo *a_tcp, int thread_seq, void *a_packet);
+uchar http_analyseHttpConnection(http_stream* a_http_stream,struct streaminfo *a_tcp, int thread_seq, void *a_packet);
+void http_updatePktOffset(http_parser_t *a_http, http_stream* a_http_stream, struct streaminfo *a_tcp);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif