suricata
app-layer-htp.h
Go to the documentation of this file.
1 /* Copyright (C) 2007-2020 Open Information Security Foundation
2  *
3  * You can copy, redistribute or modify this Program under the terms of
4  * the GNU General Public License version 2 as published by the Free
5  * Software Foundation.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * version 2 along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15  * 02110-1301, USA.
16  */
17 
18 /**
19  * \defgroup httplayer HTTP layer support
20  *
21  * @{
22  */
23 
24 /**
25  * \file
26  *
27  * \author Gurvinder Singh <gurvindersinghdahiya@gmail.com>
28  * \author Pablo Rincon <pablo.rincon.crespo@gmail.com>
29  *
30  * This file provides a HTTP protocol support for the engine using HTP library.
31  */
32 
33 #ifndef __APP_LAYER_HTP_H__
34 #define __APP_LAYER_HTP_H__
35 
36 #include "util-radix-tree.h"
37 #include "util-file.h"
38 #include "app-layer-htp-mem.h"
39 #include "detect-engine-state.h"
40 #include "util-streaming-buffer.h"
41 #include "rust.h"
42 
43 #include <htp/htp.h>
44 
45 /* default request body limit */
46 #define HTP_CONFIG_DEFAULT_REQUEST_BODY_LIMIT 4096U
47 #define HTP_CONFIG_DEFAULT_RESPONSE_BODY_LIMIT 4096U
48 #define HTP_CONFIG_DEFAULT_REQUEST_INSPECT_MIN_SIZE 32768U
49 #define HTP_CONFIG_DEFAULT_REQUEST_INSPECT_WINDOW 4096U
50 #define HTP_CONFIG_DEFAULT_RESPONSE_INSPECT_MIN_SIZE 32768U
51 #define HTP_CONFIG_DEFAULT_RESPONSE_INSPECT_WINDOW 4096U
52 #define HTP_CONFIG_DEFAULT_FIELD_LIMIT_SOFT 9000U
53 #define HTP_CONFIG_DEFAULT_FIELD_LIMIT_HARD 18000U
54 
55 #define HTP_CONFIG_DEFAULT_LZMA_LAYERS 0U
56 /* default libhtp lzma limit, taken from libhtp. */
57 #define HTP_CONFIG_DEFAULT_LZMA_MEMLIMIT 1048576U
58 #define HTP_CONFIG_DEFAULT_COMPRESSION_BOMB_LIMIT 1048576U
59 // 100000 usec is 0.1 sec
60 #define HTP_CONFIG_DEFAULT_COMPRESSION_TIME_LIMIT 100000
61 
62 #define HTP_CONFIG_DEFAULT_RANDOMIZE 1
63 #define HTP_CONFIG_DEFAULT_RANDOMIZE_RANGE 10
64 
65 /** a boundary should be smaller in size */
66 #define HTP_BOUNDARY_MAX 200U
67 
68 // 0x0001 not used
69 #define HTP_FLAG_STATE_CLOSED_TS 0x0002 /**< Flag to indicate that HTTP
70  connection is closed */
71 #define HTP_FLAG_STATE_CLOSED_TC 0x0004 /**< Flag to indicate that HTTP
72  connection is closed */
73 #define HTP_FLAG_STORE_FILES_TS 0x0040
74 #define HTP_FLAG_STORE_FILES_TC 0x0080
75 #define HTP_FLAG_STORE_FILES_TX_TS 0x0100
76 #define HTP_FLAG_STORE_FILES_TX_TC 0x0200
77 
78 enum {
81  HTP_BODY_REQUEST_POST, /* POST, no MP */
83 };
84 
85 enum {
86  /* libhtp errors/warnings */
131 
134 
135  /* suricata errors/warnings */
139 
141 };
142 
143 typedef enum HtpSwfCompressType_ {
149 
150 typedef struct HTPCfgDir_ {
151  uint32_t body_limit;
153  uint32_t inspect_window;
156 
157 /** Need a linked list in order to keep track of these */
158 typedef struct HTPCfgRec_ {
159  htp_cfg_t *cfg;
160  struct HTPCfgRec_ *next;
161 
162  int uri_include_all; /**< use all info in uri (bool) */
163 
164  /** max size of the client body we inspect */
168 
173 
177 
178 /** Struct used to hold chunks of a body on a request */
180  struct HtpBodyChunk_ *next; /**< Pointer to the next chunk */
181  int logged;
182  StreamingBufferSegment sbseg;
183 } __attribute__((__packed__));
184 typedef struct HtpBodyChunk_ HtpBodyChunk;
185 
186 /** Struct used to hold all the chunks of a body on a request */
187 typedef struct HtpBody_ {
188  HtpBodyChunk *first; /**< Pointer to the first chunk */
189  HtpBodyChunk *last; /**< Pointer to the last chunk */
190 
192 
193  /* Holds the length of the htp request body seen so far */
195  /* parser tracker */
196  uint64_t body_parsed;
197  /* inspection tracker */
198  uint64_t body_inspected;
200 
201 #define HTP_CONTENTTYPE_SET BIT_U8(0) /**< We have the content type */
202 #define HTP_BOUNDARY_SET BIT_U8(1) /**< We have a boundary string */
203 #define HTP_BOUNDARY_OPEN BIT_U8(2) /**< We have a boundary string */
204 #define HTP_FILENAME_SET BIT_U8(3) /**< filename is registered in the flow */
205 #define HTP_DONTSTORE BIT_U8(4) /**< not storing this file */
206 #define HTP_STREAM_DEPTH_SET BIT_U8(5) /**< stream-depth is set */
207 
208 /** Now the Body Chunks will be stored per transaction, at
209  * the tx user data */
210 typedef struct HtpTxUserData_ {
211  /* Body of the request (if any) */
214 
217 
220 
222 
227 
228  AppLayerDecoderEvents *decoder_events; /**< per tx events */
229 
230  /** Holds the boundary identification string if any (used on
231  * multipart/form-data only)
232  */
233  uint8_t *boundary;
234  uint8_t boundary_len;
235 
236  uint8_t tsflags;
237  uint8_t tcflags;
238 
240 
242  AppLayerTxData tx_data;
244 
245 typedef struct HtpState_ {
246  /* Connection parser structure for each connection */
247  htp_connp_t *connp;
248  /* Connection structure for each connection */
249  htp_conn_t *conn;
250  Flow *f; /**< Needed to retrieve the original flow when using HTPLib callbacks */
251  uint64_t transaction_cnt;
252  uint64_t store_tx_id;
255  const struct HTPCfgRec_ *cfg;
256  uint16_t flags;
257  uint16_t events;
258  uint16_t htp_messages_offset; /**< offset into conn->messages list */
259  uint32_t file_track_id; /**< used to assign file track ids to files */
263 
264 /** part of the engine needs the request body (e.g. http_client_body keyword) */
265 #define HTP_REQUIRE_REQUEST_BODY (1 << 0)
266 /** part of the engine needs the request body multipart header (e.g. filename
267  * and / or fileext keywords) */
268 #define HTP_REQUIRE_REQUEST_MULTIPART (1 << 1)
269 /** part of the engine needs the request file (e.g. log-file module) */
270 #define HTP_REQUIRE_REQUEST_FILE (1 << 2)
271 /** part of the engine needs the request body (e.g. file_data keyword) */
272 #define HTP_REQUIRE_RESPONSE_BODY (1 << 3)
273 
274 SC_ATOMIC_EXTERN(uint32_t, htp_config_flags);
275 
276 void RegisterHTPParsers(void);
277 void HTPAtExitPrintStats(void);
278 void HTPFreeConfig(void);
279 
280 void HtpBodyPrint(HtpBody *);
281 void HtpBodyFree(HtpBody *);
282 /* To free the state from unittests using app-layer-htp */
283 void HTPStateFree(void *);
287 void AppLayerHtpPrintStats(void);
288 
289 void HTPConfigure(void);
290 
291 void HtpConfigCreateBackup(void);
292 void HtpConfigRestoreBackup(void);
293 
294 void *HtpGetTxForH2(void *);
295 
296 #endif /* __APP_LAYER_HTP_H__ */
297 
298 /**
299  * @}
300  */
HtpState
struct HtpState_ HtpState
HtpState_::cfg
const struct HTPCfgRec_ * cfg
Definition: app-layer-htp.h:255
HTTP_DECODER_EVENT_INVALID_CONTENT_LENGTH_FIELD_IN_RESPONSE
@ HTTP_DECODER_EVENT_INVALID_CONTENT_LENGTH_FIELD_IN_RESPONSE
Definition: app-layer-htp.h:96
FileContainer_
Definition: util-file.h:107
HTP_BODY_REQUEST_POST
@ HTP_BODY_REQUEST_POST
Definition: app-layer-htp.h:81
AppLayerHtpNeedFileInspection
void AppLayerHtpNeedFileInspection(void)
Sets a flag that informs the HTP app layer that some module in the engine needs the http request file...
Definition: app-layer-htp.c:514
HTTP_DECODER_EVENT_HOST_HEADER_AMBIGUOUS
@ HTTP_DECODER_EVENT_HOST_HEADER_AMBIGUOUS
Definition: app-layer-htp.h:106
HTTP_DECODER_EVENT_REQUEST_SERVER_PORT_TCP_PORT_MISMATCH
@ HTTP_DECODER_EVENT_REQUEST_SERVER_PORT_TCP_PORT_MISMATCH
Definition: app-layer-htp.h:111
HTTP_DECODER_EVENT_UNKNOWN_ERROR
@ HTTP_DECODER_EVENT_UNKNOWN_ERROR
Definition: app-layer-htp.h:87
HTTP_DECODER_EVENT_TOO_MANY_WARNINGS
@ HTTP_DECODER_EVENT_TOO_MANY_WARNINGS
Definition: app-layer-htp.h:140
HtpTxUserData_::request_headers_raw_len
uint32_t request_headers_raw_len
Definition: app-layer-htp.h:225
DetectEngineState_
Definition: detect-engine-state.h:93
HTPCfgDir_
Definition: app-layer-htp.h:150
HtpBody_::sb
StreamingBuffer * sb
Definition: app-layer-htp.h:191
HTTP_DECODER_EVENT_COMPRESSION_BOMB
@ HTTP_DECODER_EVENT_COMPRESSION_BOMB
Definition: app-layer-htp.h:133
HTPCfgRec_::response
HTPCfgDir response
Definition: app-layer-htp.h:175
HTTP_DECODER_EVENT_DUPLICATE_CONTENT_LENGTH_FIELD_IN_REQUEST
@ HTTP_DECODER_EVENT_DUPLICATE_CONTENT_LENGTH_FIELD_IN_REQUEST
Definition: app-layer-htp.h:97
HtpTxUserData
struct HtpTxUserData_ HtpTxUserData
AppLayerHtpPrintStats
void AppLayerHtpPrintStats(void)
Definition: app-layer-htp.c:2925
HTPCfgDir_::body_limit
uint32_t body_limit
Definition: app-layer-htp.h:151
HTTP_DECODER_EVENT_INVALID_RESPONSE_FIELD_FOLDING
@ HTTP_DECODER_EVENT_INVALID_RESPONSE_FIELD_FOLDING
Definition: app-layer-htp.h:108
HtpSwfCompressType_
HtpSwfCompressType_
Definition: app-layer-htp.h:143
HTTP_DECODER_EVENT_MULTIPART_INVALID_HEADER
@ HTTP_DECODER_EVENT_MULTIPART_INVALID_HEADER
Definition: app-layer-htp.h:138
Flow_
Flow data structure.
Definition: flow.h:347
HtpGetTxForH2
void * HtpGetTxForH2(void *)
Definition: app-layer-htp.c:2987
HtpState_::flags
uint16_t flags
Definition: app-layer-htp.h:256
HTTP_DECODER_EVENT_UNABLE_TO_MATCH_RESPONSE_TO_REQUEST
@ HTTP_DECODER_EVENT_UNABLE_TO_MATCH_RESPONSE_TO_REQUEST
Definition: app-layer-htp.h:100
HtpState_::f
Flow * f
Definition: app-layer-htp.h:250
HTTP_DECODER_EVENT_RESPONSE_HEADER_INVALID
@ HTTP_DECODER_EVENT_RESPONSE_HEADER_INVALID
Definition: app-layer-htp.h:104
HtpBody_::last
HtpBodyChunk * last
Definition: app-layer-htp.h:189
HtpTxUserData_::request_body
HtpBody request_body
Definition: app-layer-htp.h:218
HTTP_DECODER_EVENT_RESPONSE_HEADER_REPETITION
@ HTTP_DECODER_EVENT_RESPONSE_HEADER_REPETITION
Definition: app-layer-htp.h:121
HtpSwfCompressType
enum HtpSwfCompressType_ HtpSwfCompressType
HTTP_DECODER_EVENT_INVALID_AUTHORITY_PORT
@ HTTP_DECODER_EVENT_INVALID_AUTHORITY_PORT
Definition: app-layer-htp.h:102
rust.h
HTTP_SWF_COMPRESSION_ZLIB
@ HTTP_SWF_COMPRESSION_ZLIB
Definition: app-layer-htp.h:145
HtpTxUserData_::request_uri_normalized
bstr * request_uri_normalized
Definition: app-layer-htp.h:221
HTP_BODY_REQUEST_NONE
@ HTP_BODY_REQUEST_NONE
Definition: app-layer-htp.h:79
HtpState_::transaction_cnt
uint64_t transaction_cnt
Definition: app-layer-htp.h:251
HTPCfgRec_::swf_compress_depth
uint32_t swf_compress_depth
Definition: app-layer-htp.h:172
HTPStateFree
void HTPStateFree(void *)
Function to frees the HTTP state memory and also frees the HTTP connection parser memory which was us...
Definition: app-layer-htp.c:387
AppLayerDecoderEvents_
Data structure to store app layer decoder events.
Definition: app-layer-events.h:34
HTPCfgDir_::inspect_window
uint32_t inspect_window
Definition: app-layer-htp.h:153
HTPConfigure
void HTPConfigure(void)
Definition: app-layer-htp.c:2853
HtpBody_::first
HtpBodyChunk * first
Definition: app-layer-htp.h:188
HTTP_DECODER_EVENT_INVALID_TRANSFER_ENCODING_VALUE_IN_REQUEST
@ HTTP_DECODER_EVENT_INVALID_TRANSFER_ENCODING_VALUE_IN_REQUEST
Definition: app-layer-htp.h:93
HTTP_DECODER_EVENT_LZMA_MEMLIMIT_REACHED
@ HTTP_DECODER_EVENT_LZMA_MEMLIMIT_REACHED
Definition: app-layer-htp.h:132
HtpState_
Definition: app-layer-htp.h:245
HTTP_DECODER_EVENT_HEADER_HOST_INVALID
@ HTTP_DECODER_EVENT_HEADER_HOST_INVALID
Definition: app-layer-htp.h:113
HTTP_DECODER_EVENT_URI_HOST_INVALID
@ HTTP_DECODER_EVENT_URI_HOST_INVALID
Definition: app-layer-htp.h:112
HtpBody_::content_len_so_far
uint64_t content_len_so_far
Definition: app-layer-htp.h:194
__attribute__
struct HtpBodyChunk_ __attribute__((__packed__))
DNP3 link header.
Definition: decode-vlan.c:116
HTTP_DECODER_EVENT_RESPONSE_INVALID_PROTOCOL
@ HTTP_DECODER_EVENT_RESPONSE_INVALID_PROTOCOL
Definition: app-layer-htp.h:125
HTTP_DECODER_EVENT_MULTIPART_NO_FILEDATA
@ HTTP_DECODER_EVENT_MULTIPART_NO_FILEDATA
Definition: app-layer-htp.h:137
HTTP_DECODER_EVENT_REQUEST_BODY_UNEXPECTED
@ HTTP_DECODER_EVENT_REQUEST_BODY_UNEXPECTED
Definition: app-layer-htp.h:130
HtpState_::last_request_data_stamp
uint64_t last_request_data_stamp
Definition: app-layer-htp.h:260
HtpBody_::body_parsed
uint64_t body_parsed
Definition: app-layer-htp.h:196
HTPCfgRec_::http_body_inline
int http_body_inline
Definition: app-layer-htp.h:167
HTPCfgRec_::randomize_range
int randomize_range
Definition: app-layer-htp.h:166
HTTP_SWF_COMPRESSION_NONE
@ HTTP_SWF_COMPRESSION_NONE
Definition: app-layer-htp.h:144
HtpConfigCreateBackup
void HtpConfigCreateBackup(void)
Definition: app-layer-htp.c:3185
HtpState_::file_track_id
uint32_t file_track_id
Definition: app-layer-htp.h:259
HTPCfgRec_::randomize
int randomize
Definition: app-layer-htp.h:165
HTPCfgDir_::inspect_min_size
uint32_t inspect_min_size
Definition: app-layer-htp.h:152
HTPCfgRec_::uri_include_all
int uri_include_all
Definition: app-layer-htp.h:162
HTTP_DECODER_EVENT_RESPONSE_MULTIPART_BYTERANGES
@ HTTP_DECODER_EVENT_RESPONSE_MULTIPART_BYTERANGES
Definition: app-layer-htp.h:122
AppLayerHtpEnableRequestBodyCallback
void AppLayerHtpEnableRequestBodyCallback(void)
Sets a flag that informs the HTP app layer that some module in the engine needs the http request body...
Definition: app-layer-htp.c:472
HTTP_DECODER_EVENT_RESPONSE_FIELD_MISSING_COLON
@ HTTP_DECODER_EVENT_RESPONSE_FIELD_MISSING_COLON
Definition: app-layer-htp.h:90
HTTP_DECODER_EVENT_REQUEST_LINE_LEADING_WHITESPACE
@ HTTP_DECODER_EVENT_REQUEST_LINE_LEADING_WHITESPACE
Definition: app-layer-htp.h:116
HtpTxUserData_::response_has_trailers
uint8_t response_has_trailers
Definition: app-layer-htp.h:216
HtpTxUserData_::request_headers_raw
uint8_t * request_headers_raw
Definition: app-layer-htp.h:223
HtpState_::conn
htp_conn_t * conn
Definition: app-layer-htp.h:249
HTPCfgRec_::swf_decompress_depth
uint32_t swf_decompress_depth
Definition: app-layer-htp.h:171
HTTP_DECODER_EVENT_METHOD_DELIM_NON_COMPLIANT
@ HTTP_DECODER_EVENT_METHOD_DELIM_NON_COMPLIANT
Definition: app-layer-htp.h:114
HTPCfgRec_::swf_decompression_enabled
int swf_decompression_enabled
Definition: app-layer-htp.h:169
HtpTxUserData_::tx_data
AppLayerTxData tx_data
Definition: app-layer-htp.h:242
HTPAtExitPrintStats
void HTPAtExitPrintStats(void)
Print the stats of the HTTP requests.
Definition: app-layer-htp.c:2014
HtpTxUserData_::request_has_trailers
uint8_t request_has_trailers
Definition: app-layer-htp.h:215
HTPCfgRec
struct HTPCfgRec_ HTPCfgRec
HtpTxUserData_::boundary
uint8_t * boundary
Definition: app-layer-htp.h:233
HTPCfgDir_::sbcfg
StreamingBufferConfig sbcfg
Definition: app-layer-htp.h:154
util-radix-tree.h
HtpBody
struct HtpBody_ HtpBody
detect-engine-state.h
Data structures and function prototypes for keeping state for the detection engine.
AppLayerHtpEnableResponseBodyCallback
void AppLayerHtpEnableResponseBodyCallback(void)
Sets a flag that informs the HTP app layer that some module in the engine needs the http request body...
Definition: app-layer-htp.c:485
HTTP_DECODER_EVENT_INVALID_CONTENT_LENGTH_FIELD_IN_REQUEST
@ HTTP_DECODER_EVENT_INVALID_CONTENT_LENGTH_FIELD_IN_REQUEST
Definition: app-layer-htp.h:95
HTPCfgRec_::swf_compression_type
HtpSwfCompressType swf_compression_type
Definition: app-layer-htp.h:170
HTTP_DECODER_EVENT_MULTIPART_GENERIC_ERROR
@ HTTP_DECODER_EVENT_MULTIPART_GENERIC_ERROR
Definition: app-layer-htp.h:136
HtpTxUserData_::de_state
DetectEngineState * de_state
Definition: app-layer-htp.h:241
HtpTxUserData_::response_body
HtpBody response_body
Definition: app-layer-htp.h:219
HtpBodyChunk_::logged
int logged
Definition: app-layer-htp.h:181
HTTP_DECODER_EVENT_RESPONSE_CHUNKED_OLD_PROTO
@ HTTP_DECODER_EVENT_RESPONSE_CHUNKED_OLD_PROTO
Definition: app-layer-htp.h:124
HTTP_DECODER_EVENT_REQUEST_FIELD_TOO_LONG
@ HTTP_DECODER_EVENT_REQUEST_FIELD_TOO_LONG
Definition: app-layer-htp.h:109
HTPCfgRec_::next
struct HTPCfgRec_ * next
Definition: app-layer-htp.h:160
HTTP_DECODER_EVENT_URI_DELIM_NON_COMPLIANT
@ HTTP_DECODER_EVENT_URI_DELIM_NON_COMPLIANT
Definition: app-layer-htp.h:115
StreamingBuffer_
Definition: util-streaming-buffer.h:95
HTTP_DECODER_EVENT_REQUEST_LINE_INVALID
@ HTTP_DECODER_EVENT_REQUEST_LINE_INVALID
Definition: app-layer-htp.h:129
util-file.h
HtpTxUserData_::request_body_type
uint8_t request_body_type
Definition: app-layer-htp.h:239
HTPCfgRec_::cfg
htp_cfg_t * cfg
Definition: app-layer-htp.h:159
HTTP_DECODER_EVENT_TOO_MANY_ENCODING_LAYERS
@ HTTP_DECODER_EVENT_TOO_MANY_ENCODING_LAYERS
Definition: app-layer-htp.h:117
HtpBody_
Definition: app-layer-htp.h:187
HTTP_DECODER_EVENT_INVALID_RESPONSE_CHUNK_LEN
@ HTTP_DECODER_EVENT_INVALID_RESPONSE_CHUNK_LEN
Definition: app-layer-htp.h:92
HTPCfgRec_::request
HTPCfgDir request
Definition: app-layer-htp.h:174
HTTP_DECODER_EVENT_INVALID_TRANSFER_ENCODING_VALUE_IN_RESPONSE
@ HTTP_DECODER_EVENT_INVALID_TRANSFER_ENCODING_VALUE_IN_RESPONSE
Definition: app-layer-htp.h:94
HTTP_DECODER_EVENT_DUPLICATE_CONTENT_LENGTH_FIELD_IN_RESPONSE
@ HTTP_DECODER_EVENT_DUPLICATE_CONTENT_LENGTH_FIELD_IN_RESPONSE
Definition: app-layer-htp.h:98
util-streaming-buffer.h
HtpTxUserData_::response_headers_raw
uint8_t * response_headers_raw
Definition: app-layer-htp.h:224
HtpBodyChunk_
Definition: app-layer-htp.h:179
HtpState_::connp
htp_connp_t * connp
Definition: app-layer-htp.h:247
HtpTxUserData_::tcflags
uint8_t tcflags
Definition: app-layer-htp.h:237
HTTP_DECODER_EVENT_REQUEST_HEADER_INVALID
@ HTTP_DECODER_EVENT_REQUEST_HEADER_INVALID
Definition: app-layer-htp.h:103
SC_ATOMIC_EXTERN
SC_ATOMIC_EXTERN(uint32_t, htp_config_flags)
HTTP_DECODER_EVENT_INVALID_REQUEST_FIELD_FOLDING
@ HTTP_DECODER_EVENT_INVALID_REQUEST_FIELD_FOLDING
Definition: app-layer-htp.h:107
HtpTxUserData_
Definition: app-layer-htp.h:210
HtpState_::last_response_data_stamp
uint64_t last_response_data_stamp
Definition: app-layer-htp.h:261
HtpConfigRestoreBackup
void HtpConfigRestoreBackup(void)
Definition: app-layer-htp.c:3192
StreamingBufferConfig_
Definition: util-streaming-buffer.h:67
HTTP_DECODER_EVENT_INVALID_REQUEST_CHUNK_LEN
@ HTTP_DECODER_EVENT_INVALID_REQUEST_CHUNK_LEN
Definition: app-layer-htp.h:91
HtpState_::events
uint16_t events
Definition: app-layer-htp.h:257
HTP_BODY_REQUEST_MULTIPART
@ HTP_BODY_REQUEST_MULTIPART
Definition: app-layer-htp.h:80
HTTP_DECODER_EVENT_AUTH_UNRECOGNIZED
@ HTTP_DECODER_EVENT_AUTH_UNRECOGNIZED
Definition: app-layer-htp.h:119
HtpBodyChunk_::next
struct HtpBodyChunk_ * next
Definition: app-layer-htp.h:180
HtpTxUserData_::response_body_init
uint8_t response_body_init
Definition: app-layer-htp.h:213
HtpState_::files_tc
FileContainer * files_tc
Definition: app-layer-htp.h:254
HTTP_DECODER_EVENT_REQUEST_FIELD_MISSING_COLON
@ HTTP_DECODER_EVENT_REQUEST_FIELD_MISSING_COLON
Definition: app-layer-htp.h:89
HTTP_DECODER_EVENT_REQUEST_LINE_INCOMPLETE
@ HTTP_DECODER_EVENT_REQUEST_LINE_INCOMPLETE
Definition: app-layer-htp.h:127
HTTP_DECODER_EVENT_DOUBLE_ENCODED_URI
@ HTTP_DECODER_EVENT_DOUBLE_ENCODED_URI
Definition: app-layer-htp.h:128
HTTP_DECODER_EVENT_RESPONSE_FIELD_TOO_LONG
@ HTTP_DECODER_EVENT_RESPONSE_FIELD_TOO_LONG
Definition: app-layer-htp.h:110
HTTP_SWF_COMPRESSION_BOTH
@ HTTP_SWF_COMPRESSION_BOTH
Definition: app-layer-htp.h:147
HTPCfgRec_
Definition: app-layer-htp.h:158
RegisterHTPParsers
void RegisterHTPParsers(void)
Register the HTTP protocol and state handling functions to APP layer of the engine.
Definition: app-layer-htp.c:3119
HTTP_DECODER_EVENT_MISSING_HOST_HEADER
@ HTTP_DECODER_EVENT_MISSING_HOST_HEADER
Definition: app-layer-htp.h:105
HTTP_SWF_COMPRESSION_LZMA
@ HTTP_SWF_COMPRESSION_LZMA
Definition: app-layer-htp.h:146
app-layer-htp-mem.h
HTPCfgDir
struct HTPCfgDir_ HTPCfgDir
HtpState_::files_ts
FileContainer * files_ts
Definition: app-layer-htp.h:253
HTTP_DECODER_EVENT_100_CONTINUE_ALREADY_SEEN
@ HTTP_DECODER_EVENT_100_CONTINUE_ALREADY_SEEN
Definition: app-layer-htp.h:99
HtpBodyPrint
void HtpBodyPrint(HtpBody *)
Print the information and chunks of a Body.
Definition: app-layer-htp-body.c:126
HTP_BODY_REQUEST_PUT
@ HTP_BODY_REQUEST_PUT
Definition: app-layer-htp.h:82
HtpTxUserData_::boundary_len
uint8_t boundary_len
Definition: app-layer-htp.h:234
HTPFreeConfig
void HTPFreeConfig(void)
Clears the HTTP server configuration memory used by HTP library.
Definition: app-layer-htp.c:2027
HtpTxUserData_::response_headers_raw_len
uint32_t response_headers_raw_len
Definition: app-layer-htp.h:226
HTTP_DECODER_EVENT_RESPONSE_INVALID_STATUS
@ HTTP_DECODER_EVENT_RESPONSE_INVALID_STATUS
Definition: app-layer-htp.h:126
HTTP_DECODER_EVENT_ABNORMAL_CE_HEADER
@ HTTP_DECODER_EVENT_ABNORMAL_CE_HEADER
Definition: app-layer-htp.h:118
HtpTxUserData_::request_body_init
uint8_t request_body_init
Definition: app-layer-htp.h:212
HTTP_DECODER_EVENT_INVALID_SERVER_PORT_IN_REQUEST
@ HTTP_DECODER_EVENT_INVALID_SERVER_PORT_IN_REQUEST
Definition: app-layer-htp.h:101
HtpBodyFree
void HtpBodyFree(HtpBody *)
Free the information held in the request body.
Definition: app-layer-htp-body.c:154
HtpBodyChunk_::sbseg
StreamingBufferSegment sbseg
Definition: app-layer-htp.h:182
HTTP_DECODER_EVENT_GZIP_DECOMPRESSION_FAILED
@ HTTP_DECODER_EVENT_GZIP_DECOMPRESSION_FAILED
Definition: app-layer-htp.h:88
HTTP_DECODER_EVENT_REQUEST_HEADER_REPETITION
@ HTTP_DECODER_EVENT_REQUEST_HEADER_REPETITION
Definition: app-layer-htp.h:120
HtpState_::store_tx_id
uint64_t store_tx_id
Definition: app-layer-htp.h:252
HtpTxUserData_::tsflags
uint8_t tsflags
Definition: app-layer-htp.h:236
HTTP_DECODER_EVENT_RESPONSE_ABNORMAL_TRANSFER_ENCODING
@ HTTP_DECODER_EVENT_RESPONSE_ABNORMAL_TRANSFER_ENCODING
Definition: app-layer-htp.h:123
HtpBody_::body_inspected
uint64_t body_inspected
Definition: app-layer-htp.h:198
HtpTxUserData_::decoder_events
AppLayerDecoderEvents * decoder_events
Definition: app-layer-htp.h:228
HtpState_::htp_messages_offset
uint16_t htp_messages_offset
Definition: app-layer-htp.h:258