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 SURICATA_APP_LAYER_HTP_H
34 #define SURICATA_APP_LAYER_HTP_H
35 
36 #include "rust.h"
37 #include "app-layer-frames.h"
38 
39 #include <htp/htp.h>
40 
41 enum {
42  /* libhtp errors/warnings */
88 
91 
97 
98  /* suricata errors/warnings */
102 
104 
106 };
107 
108 // Temporary include directly app-layer-htp-libhtp.h
109 // This helps libhtp.rs transition by making small steps
110 // app-layer-htp-libhtp.h will be removed with libhtp.rs final merge
111 #include "app-layer-htp-libhtp.h"
112 
113 /* default request body limit */
114 #define HTP_CONFIG_DEFAULT_REQUEST_BODY_LIMIT 4096U
115 #define HTP_CONFIG_DEFAULT_RESPONSE_BODY_LIMIT 4096U
116 #define HTP_CONFIG_DEFAULT_REQUEST_INSPECT_MIN_SIZE 32768U
117 #define HTP_CONFIG_DEFAULT_REQUEST_INSPECT_WINDOW 4096U
118 #define HTP_CONFIG_DEFAULT_RESPONSE_INSPECT_MIN_SIZE 32768U
119 #define HTP_CONFIG_DEFAULT_RESPONSE_INSPECT_WINDOW 4096U
120 #define HTP_CONFIG_DEFAULT_FIELD_LIMIT_SOFT 9000U
121 #define HTP_CONFIG_DEFAULT_FIELD_LIMIT_HARD 18000U
122 
123 #define HTP_CONFIG_DEFAULT_LZMA_LAYERS 0U
124 /* default libhtp lzma limit, taken from libhtp. */
125 #define HTP_CONFIG_DEFAULT_LZMA_MEMLIMIT 1048576U
126 #define HTP_CONFIG_DEFAULT_COMPRESSION_BOMB_LIMIT 1048576U
127 // 100000 usec is 0.1 sec
128 #define HTP_CONFIG_DEFAULT_COMPRESSION_TIME_LIMIT 100000
129 
130 #define HTP_CONFIG_DEFAULT_RANDOMIZE 1
131 #define HTP_CONFIG_DEFAULT_RANDOMIZE_RANGE 10
132 
133 // 0x0001 not used
134 #define HTP_FLAG_STATE_CLOSED_TS \
135  0x0002 /**< Flag to indicate that HTTP \
136  connection is closed */
137 #define HTP_FLAG_STATE_CLOSED_TC \
138  0x0004 /**< Flag to indicate that HTTP \
139  connection is closed */
140 
141 enum {
144  HTP_BODY_REQUEST_POST, /* POST, no MP */
146 };
147 
148 typedef enum HtpSwfCompressType_ {
154 
155 typedef struct HTPCfgDir_ {
156  uint32_t body_limit;
158  uint32_t inspect_window;
160 
161 /** Need a linked list in order to keep track of these */
162 typedef struct HTPCfgRec_ {
163  htp_cfg_t *cfg;
164  struct HTPCfgRec_ *next;
165 
166  /** max size of the client body we inspect */
170 
175 
178 
179  bool uri_include_all; /**< use all info in uri (bool) */
181 
182 /** Struct used to hold chunks of a body on a request */
184  struct HtpBodyChunk_ *next; /**< Pointer to the next chunk */
185  int logged;
186  StreamingBufferSegment sbseg;
187 } __attribute__((__packed__));
188 typedef struct HtpBodyChunk_ HtpBodyChunk;
189 
190 /** Struct used to hold all the chunks of a body on a request */
191 typedef struct HtpBody_ {
192  HtpBodyChunk *first; /**< Pointer to the first chunk */
193  HtpBodyChunk *last; /**< Pointer to the last chunk */
194 
196 
197  /* Holds the length of the htp request body seen so far */
199  /* parser tracker */
200  uint64_t body_parsed;
201  /* inspection tracker */
202  uint64_t body_inspected;
204 
205 #define HTP_BOUNDARY_SET BIT_U8(1) /**< We have a boundary string */
206 #define HTP_FILENAME_SET BIT_U8(3) /**< filename is registered in the flow */
207 #define HTP_DONTSTORE BIT_U8(4) /**< not storing this file */
208 #define HTP_STREAM_DEPTH_SET BIT_U8(5) /**< stream-depth is set */
209 
210 /** Now the Body Chunks will be stored per transaction, at
211  * the tx user data */
212 typedef struct HtpTxUserData_ {
213  /* Body of the request (if any) */
216 
219 
220  uint8_t tsflags;
221  uint8_t tcflags;
222 
224 
227 
229 
234 
235  MimeStateHTTP *mime_state;
236 
237  HttpRangeContainerBlock *file_range; /**< used to assign track ids to range file */
238 
243 
244 typedef struct HtpState_ {
245  /* Connection parser structure for each connection */
246  htp_connp_t *connp;
247  /* Connection structure for each connection */
248  htp_conn_t *conn;
249  Flow *f; /**< Needed to retrieve the original flow when using HTPLib callbacks */
250  uint64_t transaction_cnt;
251  // tx_freed is the number of already freed transactions
252  // This is needed as libhtp only keeps the live transactions :
253  // To get the total number of transactions, we need to add
254  // the number of transactions tracked by libhtp to this number.
255  // It is also needed as an offset to translate between suricata
256  // transaction id to libhtp offset in its list/array
257  uint64_t tx_freed;
258  const struct HTPCfgRec_ *cfg;
259  uint16_t flags;
260  uint16_t events;
261  uint16_t htp_messages_offset; /**< offset into conn->messages list */
262  uint32_t file_track_id; /**< used to assign file track ids to files */
265  StreamSlice *slice;
268  AppLayerStateData state_data;
270 
271 /** part of the engine needs the request body (e.g. http_client_body keyword) */
272 #define HTP_REQUIRE_REQUEST_BODY (1 << 0)
273 /** part of the engine needs the request file (e.g. log-file module) */
274 #define HTP_REQUIRE_REQUEST_FILE (1 << 2)
275 /** part of the engine needs the request body (e.g. file_data keyword) */
276 #define HTP_REQUIRE_RESPONSE_BODY (1 << 3)
277 
278 SC_ATOMIC_EXTERN(uint32_t, htp_config_flags);
279 
280 void RegisterHTPParsers(void);
281 void HTPAtExitPrintStats(void);
282 void HTPFreeConfig(void);
283 
284 /* To free the state from unittests using app-layer-htp */
285 void HTPStateFree(void *);
289 void AppLayerHtpPrintStats(void);
290 
291 void HTPConfigure(void);
292 
293 void HtpConfigCreateBackup(void);
294 void HtpConfigRestoreBackup(void);
295 
296 void *HtpGetTxForH2(void *);
297 
298 #endif /* SURICATA_APP_LAYER_HTP_H */
299 
300 /**
301  * @}
302  */
HtpState
struct HtpState_ HtpState
HtpState_::cfg
const struct HTPCfgRec_ * cfg
Definition: app-layer-htp.h:258
HtpState_::tx_freed
uint64_t tx_freed
Definition: app-layer-htp.h:257
FileContainer_
Definition: util-file.h:113
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:496
HtpState_::slice
StreamSlice * slice
Definition: app-layer-htp.h:265
HTTP_DECODER_EVENT_GZIP_DECOMPRESSION_FAILED
@ HTTP_DECODER_EVENT_GZIP_DECOMPRESSION_FAILED
Definition: app-layer-htp.h:44
HTP_BODY_REQUEST_NONE
@ HTP_BODY_REQUEST_NONE
Definition: app-layer-htp.h:142
HTTP_DECODER_EVENT_UNABLE_TO_MATCH_RESPONSE_TO_REQUEST
@ HTTP_DECODER_EVENT_UNABLE_TO_MATCH_RESPONSE_TO_REQUEST
Definition: app-layer-htp.h:56
HtpTxUserData_::request_headers_raw_len
uint32_t request_headers_raw_len
Definition: app-layer-htp.h:232
HTTP_DECODER_EVENT_URI_HOST_INVALID
@ HTTP_DECODER_EVENT_URI_HOST_INVALID
Definition: app-layer-htp.h:69
HTPCfgDir_
Definition: app-layer-htp.h:155
HtpBody_::sb
StreamingBuffer * sb
Definition: app-layer-htp.h:195
HtpTxUserData_::files_tc
FileContainer files_tc
Definition: app-layer-htp.h:241
HTTP_DECODER_EVENT_100_CONTINUE_ALREADY_SEEN
@ HTTP_DECODER_EVENT_100_CONTINUE_ALREADY_SEEN
Definition: app-layer-htp.h:55
HTTP_DECODER_EVENT_REQUEST_FIELD_TOO_LONG
@ HTTP_DECODER_EVENT_REQUEST_FIELD_TOO_LONG
Definition: app-layer-htp.h:65
HTPCfgRec_::response
HTPCfgDir response
Definition: app-layer-htp.h:177
HTTP_DECODER_EVENT_INVALID_TRANSFER_ENCODING_VALUE_IN_REQUEST
@ HTTP_DECODER_EVENT_INVALID_TRANSFER_ENCODING_VALUE_IN_REQUEST
Definition: app-layer-htp.h:49
HtpTxUserData
struct HtpTxUserData_ HtpTxUserData
HTTP_DECODER_EVENT_RESPONSE_ABNORMAL_TRANSFER_ENCODING
@ HTTP_DECODER_EVENT_RESPONSE_ABNORMAL_TRANSFER_ENCODING
Definition: app-layer-htp.h:80
AppLayerHtpPrintStats
void AppLayerHtpPrintStats(void)
Definition: app-layer-htp.c:2641
HTTP_DECODER_EVENT_REQUEST_LINE_LEADING_WHITESPACE
@ HTTP_DECODER_EVENT_REQUEST_LINE_LEADING_WHITESPACE
Definition: app-layer-htp.h:73
HTPCfgDir_::body_limit
uint32_t body_limit
Definition: app-layer-htp.h:156
HtpSwfCompressType_
HtpSwfCompressType_
Definition: app-layer-htp.h:148
HTTP_DECODER_EVENT_DOUBLE_ENCODED_URI
@ HTTP_DECODER_EVENT_DOUBLE_ENCODED_URI
Definition: app-layer-htp.h:85
HTTP_DECODER_EVENT_RESPONSE_INVALID_PROTOCOL
@ HTTP_DECODER_EVENT_RESPONSE_INVALID_PROTOCOL
Definition: app-layer-htp.h:82
HtpTxUserData_::mime_state
MimeStateHTTP * mime_state
Definition: app-layer-htp.h:235
Flow_
Flow data structure.
Definition: flow.h:354
HTTP_DECODER_EVENT_REQUEST_HEADER_INVALID
@ HTTP_DECODER_EVENT_REQUEST_HEADER_INVALID
Definition: app-layer-htp.h:59
HtpGetTxForH2
void * HtpGetTxForH2(void *)
Definition: app-layer-htp.c:2704
HtpState_::flags
uint16_t flags
Definition: app-layer-htp.h:259
HtpState_::f
Flow * f
Definition: app-layer-htp.h:249
HTTP_DECODER_EVENT_URI_DELIM_NON_COMPLIANT
@ HTTP_DECODER_EVENT_URI_DELIM_NON_COMPLIANT
Definition: app-layer-htp.h:72
HTTP_DECODER_EVENT_ABNORMAL_CE_HEADER
@ HTTP_DECODER_EVENT_ABNORMAL_CE_HEADER
Definition: app-layer-htp.h:75
HtpBody_::last
HtpBodyChunk * last
Definition: app-layer-htp.h:193
HTTP_DECODER_EVENT_DUPLICATE_CONTENT_LENGTH_FIELD_IN_REQUEST
@ HTTP_DECODER_EVENT_DUPLICATE_CONTENT_LENGTH_FIELD_IN_REQUEST
Definition: app-layer-htp.h:53
HtpTxUserData_::request_body
HtpBody request_body
Definition: app-layer-htp.h:225
HTTP_DECODER_EVENT_REQUEST_LINE_INCOMPLETE
@ HTTP_DECODER_EVENT_REQUEST_LINE_INCOMPLETE
Definition: app-layer-htp.h:84
HTTP_DECODER_EVENT_HOST_HEADER_AMBIGUOUS
@ HTTP_DECODER_EVENT_HOST_HEADER_AMBIGUOUS
Definition: app-layer-htp.h:62
HtpSwfCompressType
enum HtpSwfCompressType_ HtpSwfCompressType
rust.h
HTTP_SWF_COMPRESSION_ZLIB
@ HTTP_SWF_COMPRESSION_ZLIB
Definition: app-layer-htp.h:150
HtpTxUserData_::request_uri_normalized
bstr * request_uri_normalized
Definition: app-layer-htp.h:228
HTTP_DECODER_EVENT_HEADER_HOST_INVALID
@ HTTP_DECODER_EVENT_HEADER_HOST_INVALID
Definition: app-layer-htp.h:70
HtpState_::transaction_cnt
uint64_t transaction_cnt
Definition: app-layer-htp.h:250
HTPCfgRec_::swf_compress_depth
uint32_t swf_compress_depth
Definition: app-layer-htp.h:174
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:386
HTTP_DECODER_EVENT_REQUEST_LINE_INVALID
@ HTTP_DECODER_EVENT_REQUEST_LINE_INVALID
Definition: app-layer-htp.h:86
HTTP_DECODER_EVENT_TOO_MANY_WARNINGS
@ HTTP_DECODER_EVENT_TOO_MANY_WARNINGS
Definition: app-layer-htp.h:103
HTPCfgDir_::inspect_window
uint32_t inspect_window
Definition: app-layer-htp.h:158
HTPConfigure
void HTPConfigure(void)
Definition: app-layer-htp.c:2570
HtpBody_::first
HtpBodyChunk * first
Definition: app-layer-htp.h:192
HtpState_
Definition: app-layer-htp.h:244
HtpBody_::content_len_so_far
uint64_t content_len_so_far
Definition: app-layer-htp.h:198
__attribute__
struct HtpBodyChunk_ __attribute__((__packed__))
DNP3 link header.
Definition: decode-vlan.c:102
HttpRangeContainerBlock
Definition: app-layer-htp-range.h:90
HtpState_::response_frame_id
FrameId response_frame_id
Definition: app-layer-htp.h:267
HtpTxUserData_::file_range
HttpRangeContainerBlock * file_range
Definition: app-layer-htp.h:237
HTTP_DECODER_EVENT_AUTH_UNRECOGNIZED
@ HTTP_DECODER_EVENT_AUTH_UNRECOGNIZED
Definition: app-layer-htp.h:76
HTTP_DECODER_EVENT_REQUEST_TOO_MANY_HEADERS
@ HTTP_DECODER_EVENT_REQUEST_TOO_MANY_HEADERS
Definition: app-layer-htp.h:95
HtpState_::last_request_data_stamp
uint64_t last_request_data_stamp
Definition: app-layer-htp.h:263
HtpBody_::body_parsed
uint64_t body_parsed
Definition: app-layer-htp.h:200
HTPCfgRec_::http_body_inline
int http_body_inline
Definition: app-layer-htp.h:169
HTPCfgRec_::randomize_range
int randomize_range
Definition: app-layer-htp.h:168
HTTP_SWF_COMPRESSION_NONE
@ HTTP_SWF_COMPRESSION_NONE
Definition: app-layer-htp.h:149
HtpConfigCreateBackup
void HtpConfigCreateBackup(void)
Definition: app-layer-htp.c:2880
HtpState_::file_track_id
uint32_t file_track_id
Definition: app-layer-htp.h:262
HTPCfgRec_::randomize
int randomize
Definition: app-layer-htp.h:167
HTPCfgDir_::inspect_min_size
uint32_t inspect_min_size
Definition: app-layer-htp.h:157
HTTP_DECODER_EVENT_FAILED_PROTOCOL_CHANGE
@ HTTP_DECODER_EVENT_FAILED_PROTOCOL_CHANGE
Definition: app-layer-htp.h:105
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:469
HtpTxUserData_::response_has_trailers
uint8_t response_has_trailers
Definition: app-layer-htp.h:218
HtpTxUserData_::request_headers_raw
uint8_t * request_headers_raw
Definition: app-layer-htp.h:230
HtpState_::conn
htp_conn_t * conn
Definition: app-layer-htp.h:248
HTPCfgRec_::swf_decompress_depth
uint32_t swf_decompress_depth
Definition: app-layer-htp.h:173
HTTP_DECODER_EVENT_LZMA_MEMLIMIT_REACHED
@ HTTP_DECODER_EVENT_LZMA_MEMLIMIT_REACHED
Definition: app-layer-htp.h:89
HTPCfgRec_::swf_decompression_enabled
int swf_decompression_enabled
Definition: app-layer-htp.h:171
HtpTxUserData_::tx_data
AppLayerTxData tx_data
Definition: app-layer-htp.h:239
HtpState_::state_data
AppLayerStateData state_data
Definition: app-layer-htp.h:268
FrameId
int64_t FrameId
Definition: app-layer-frames.h:32
HTTP_DECODER_EVENT_MULTIPART_INVALID_HEADER
@ HTTP_DECODER_EVENT_MULTIPART_INVALID_HEADER
Definition: app-layer-htp.h:101
HTPAtExitPrintStats
void HTPAtExitPrintStats(void)
Print the stats of the HTTP requests.
Definition: app-layer-htp.c:1651
HtpTxUserData_::request_has_trailers
uint8_t request_has_trailers
Definition: app-layer-htp.h:217
HTTP_DECODER_EVENT_RANGE_INVALID
@ HTTP_DECODER_EVENT_RANGE_INVALID
Definition: app-layer-htp.h:92
HTPCfgRec
struct HTPCfgRec_ HTPCfgRec
HTTP_DECODER_EVENT_MULTIPART_NO_FILEDATA
@ HTTP_DECODER_EVENT_MULTIPART_NO_FILEDATA
Definition: app-layer-htp.h:100
HTPCfgRec_::uri_include_all
bool uri_include_all
Definition: app-layer-htp.h:179
HTTP_DECODER_EVENT_INVALID_REQUEST_CHUNK_LEN
@ HTTP_DECODER_EVENT_INVALID_REQUEST_CHUNK_LEN
Definition: app-layer-htp.h:47
HTTP_DECODER_EVENT_INVALID_TRANSFER_ENCODING_VALUE_IN_RESPONSE
@ HTTP_DECODER_EVENT_INVALID_TRANSFER_ENCODING_VALUE_IN_RESPONSE
Definition: app-layer-htp.h:50
HtpBody
struct HtpBody_ HtpBody
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:482
HTTP_DECODER_EVENT_RESPONSE_HEADER_REPETITION
@ HTTP_DECODER_EVENT_RESPONSE_HEADER_REPETITION
Definition: app-layer-htp.h:78
HTPCfgRec_::swf_compression_type
HtpSwfCompressType swf_compression_type
Definition: app-layer-htp.h:172
HTTP_DECODER_EVENT_UNKNOWN_ERROR
@ HTTP_DECODER_EVENT_UNKNOWN_ERROR
Definition: app-layer-htp.h:43
HtpTxUserData_::response_body
HtpBody response_body
Definition: app-layer-htp.h:226
HtpBodyChunk_::logged
int logged
Definition: app-layer-htp.h:185
HTTP_DECODER_EVENT_REQUEST_BODY_UNEXPECTED
@ HTTP_DECODER_EVENT_REQUEST_BODY_UNEXPECTED
Definition: app-layer-htp.h:87
HTP_BODY_REQUEST_PUT
@ HTP_BODY_REQUEST_PUT
Definition: app-layer-htp.h:145
HTPCfgRec_::next
struct HTPCfgRec_ * next
Definition: app-layer-htp.h:164
StreamingBuffer_
Definition: util-streaming-buffer.h:108
HTTP_DECODER_EVENT_INVALID_CONTENT_LENGTH_FIELD_IN_REQUEST
@ HTTP_DECODER_EVENT_INVALID_CONTENT_LENGTH_FIELD_IN_REQUEST
Definition: app-layer-htp.h:51
AppLayerTxData
struct AppLayerTxData AppLayerTxData
Definition: detect.h:1382
HtpTxUserData_::request_body_type
uint8_t request_body_type
Definition: app-layer-htp.h:223
HTPCfgRec_::cfg
htp_cfg_t * cfg
Definition: app-layer-htp.h:163
app-layer-frames.h
HTP_BODY_REQUEST_POST
@ HTP_BODY_REQUEST_POST
Definition: app-layer-htp.h:144
HtpBody_
Definition: app-layer-htp.h:191
HTTP_DECODER_EVENT_METHOD_DELIM_NON_COMPLIANT
@ HTTP_DECODER_EVENT_METHOD_DELIM_NON_COMPLIANT
Definition: app-layer-htp.h:71
HTTP_DECODER_EVENT_INVALID_RESPONSE_CHUNK_LEN
@ HTTP_DECODER_EVENT_INVALID_RESPONSE_CHUNK_LEN
Definition: app-layer-htp.h:48
HTPCfgRec_::request
HTPCfgDir request
Definition: app-layer-htp.h:176
HtpTxUserData_::response_headers_raw
uint8_t * response_headers_raw
Definition: app-layer-htp.h:231
HtpBodyChunk_
Definition: app-layer-htp.h:183
HTTP_DECODER_EVENT_INVALID_CONTENT_LENGTH_FIELD_IN_RESPONSE
@ HTTP_DECODER_EVENT_INVALID_CONTENT_LENGTH_FIELD_IN_RESPONSE
Definition: app-layer-htp.h:52
HtpState_::connp
htp_connp_t * connp
Definition: app-layer-htp.h:246
HtpTxUserData_::tcflags
uint8_t tcflags
Definition: app-layer-htp.h:221
SC_ATOMIC_EXTERN
SC_ATOMIC_EXTERN(uint32_t, htp_config_flags)
HtpTxUserData_
Definition: app-layer-htp.h:212
HtpState_::last_response_data_stamp
uint64_t last_response_data_stamp
Definition: app-layer-htp.h:264
HTTP_DECODER_EVENT_DUPLICATE_CONTENT_LENGTH_FIELD_IN_RESPONSE
@ HTTP_DECODER_EVENT_DUPLICATE_CONTENT_LENGTH_FIELD_IN_RESPONSE
Definition: app-layer-htp.h:54
HTP_BODY_REQUEST_MULTIPART
@ HTP_BODY_REQUEST_MULTIPART
Definition: app-layer-htp.h:143
HTTP_DECODER_EVENT_REQUEST_SERVER_PORT_TCP_PORT_MISMATCH
@ HTTP_DECODER_EVENT_REQUEST_SERVER_PORT_TCP_PORT_MISMATCH
Definition: app-layer-htp.h:68
HTTP_DECODER_EVENT_MISSING_HOST_HEADER
@ HTTP_DECODER_EVENT_MISSING_HOST_HEADER
Definition: app-layer-htp.h:61
HtpConfigRestoreBackup
void HtpConfigRestoreBackup(void)
Definition: app-layer-htp.c:2885
HTTP_DECODER_EVENT_REQUEST_CHUNK_EXTENSION
@ HTTP_DECODER_EVENT_REQUEST_CHUNK_EXTENSION
Definition: app-layer-htp.h:93
HtpState_::events
uint16_t events
Definition: app-layer-htp.h:260
HTTP_DECODER_EVENT_TOO_MANY_ENCODING_LAYERS
@ HTTP_DECODER_EVENT_TOO_MANY_ENCODING_LAYERS
Definition: app-layer-htp.h:74
HtpBodyChunk_::next
struct HtpBodyChunk_ * next
Definition: app-layer-htp.h:184
HtpTxUserData_::response_body_init
uint8_t response_body_init
Definition: app-layer-htp.h:215
HTTP_DECODER_EVENT_REQUEST_FIELD_MISSING_COLON
@ HTTP_DECODER_EVENT_REQUEST_FIELD_MISSING_COLON
Definition: app-layer-htp.h:45
app-layer-htp-libhtp.h
HTTP_DECODER_EVENT_MULTIPART_GENERIC_ERROR
@ HTTP_DECODER_EVENT_MULTIPART_GENERIC_ERROR
Definition: app-layer-htp.h:99
HTTP_DECODER_EVENT_RESPONSE_CHUNKED_OLD_PROTO
@ HTTP_DECODER_EVENT_RESPONSE_CHUNKED_OLD_PROTO
Definition: app-layer-htp.h:81
HTTP_DECODER_EVENT_RESPONSE_FIELD_TOO_LONG
@ HTTP_DECODER_EVENT_RESPONSE_FIELD_TOO_LONG
Definition: app-layer-htp.h:66
HTTP_SWF_COMPRESSION_BOTH
@ HTTP_SWF_COMPRESSION_BOTH
Definition: app-layer-htp.h:152
HTPCfgRec_
Definition: app-layer-htp.h:162
RegisterHTPParsers
void RegisterHTPParsers(void)
Register the HTTP protocol and state handling functions to APP layer of the engine.
Definition: app-layer-htp.c:2812
HTTP_SWF_COMPRESSION_LZMA
@ HTTP_SWF_COMPRESSION_LZMA
Definition: app-layer-htp.h:151
HtpState_::request_frame_id
FrameId request_frame_id
Definition: app-layer-htp.h:266
HTPCfgDir
struct HTPCfgDir_ HTPCfgDir
HTTP_DECODER_EVENT_INVALID_AUTHORITY_PORT
@ HTTP_DECODER_EVENT_INVALID_AUTHORITY_PORT
Definition: app-layer-htp.h:58
HTTP_DECODER_EVENT_RESPONSE_TOO_MANY_HEADERS
@ HTTP_DECODER_EVENT_RESPONSE_TOO_MANY_HEADERS
Definition: app-layer-htp.h:96
HTTP_DECODER_EVENT_INVALID_SERVER_PORT_IN_REQUEST
@ HTTP_DECODER_EVENT_INVALID_SERVER_PORT_IN_REQUEST
Definition: app-layer-htp.h:57
HtpTxUserData_::files_ts
FileContainer files_ts
Definition: app-layer-htp.h:240
HTTP_DECODER_EVENT_COMPRESSION_BOMB
@ HTTP_DECODER_EVENT_COMPRESSION_BOMB
Definition: app-layer-htp.h:90
HTTP_DECODER_EVENT_INVALID_REQUEST_FIELD_FOLDING
@ HTTP_DECODER_EVENT_INVALID_REQUEST_FIELD_FOLDING
Definition: app-layer-htp.h:63
HTPFreeConfig
void HTPFreeConfig(void)
Clears the HTTP server configuration memory used by HTP library.
Definition: app-layer-htp.c:1664
HtpTxUserData_::response_headers_raw_len
uint32_t response_headers_raw_len
Definition: app-layer-htp.h:233
HtpTxUserData_::request_body_init
uint8_t request_body_init
Definition: app-layer-htp.h:214
HTTP_DECODER_EVENT_RESPONSE_INVALID_STATUS
@ HTTP_DECODER_EVENT_RESPONSE_INVALID_STATUS
Definition: app-layer-htp.h:83
HtpBodyChunk_::sbseg
StreamingBufferSegment sbseg
Definition: app-layer-htp.h:186
HTTP_DECODER_EVENT_INVALID_RESPONSE_FIELD_FOLDING
@ HTTP_DECODER_EVENT_INVALID_RESPONSE_FIELD_FOLDING
Definition: app-layer-htp.h:64
HTTP_DECODER_EVENT_RESPONSE_HEADER_INVALID
@ HTTP_DECODER_EVENT_RESPONSE_HEADER_INVALID
Definition: app-layer-htp.h:60
HTTP_DECODER_EVENT_REQUEST_LINE_MISSING_PROTOCOL
@ HTTP_DECODER_EVENT_REQUEST_LINE_MISSING_PROTOCOL
Definition: app-layer-htp.h:94
HTTP_DECODER_EVENT_REQUEST_HEADER_REPETITION
@ HTTP_DECODER_EVENT_REQUEST_HEADER_REPETITION
Definition: app-layer-htp.h:77
HTTP_DECODER_EVENT_RESPONSE_FIELD_MISSING_COLON
@ HTTP_DECODER_EVENT_RESPONSE_FIELD_MISSING_COLON
Definition: app-layer-htp.h:46
HtpTxUserData_::tsflags
uint8_t tsflags
Definition: app-layer-htp.h:220
HTTP_DECODER_EVENT_RESPONSE_MULTIPART_BYTERANGES
@ HTTP_DECODER_EVENT_RESPONSE_MULTIPART_BYTERANGES
Definition: app-layer-htp.h:79
HtpBody_::body_inspected
uint64_t body_inspected
Definition: app-layer-htp.h:202
HTTP_DECODER_EVENT_FILE_NAME_TOO_LONG
@ HTTP_DECODER_EVENT_FILE_NAME_TOO_LONG
Definition: app-layer-htp.h:67
HtpState_::htp_messages_offset
uint16_t htp_messages_offset
Definition: app-layer-htp.h:261