Go to the documentation of this file.
33 #ifndef SURICATA_APP_LAYER_HTP_H
34 #define SURICATA_APP_LAYER_HTP_H
39 #include "htp/htp_rs.h"
42 #define HTP_CONFIG_DEFAULT_REQUEST_BODY_LIMIT 4096U
43 #define HTP_CONFIG_DEFAULT_RESPONSE_BODY_LIMIT 4096U
44 #define HTP_CONFIG_DEFAULT_REQUEST_INSPECT_MIN_SIZE 32768U
45 #define HTP_CONFIG_DEFAULT_REQUEST_INSPECT_WINDOW 4096U
46 #define HTP_CONFIG_DEFAULT_RESPONSE_INSPECT_MIN_SIZE 32768U
47 #define HTP_CONFIG_DEFAULT_RESPONSE_INSPECT_WINDOW 4096U
48 #define HTP_CONFIG_DEFAULT_FIELD_LIMIT 18000U
50 #define HTP_CONFIG_DEFAULT_LZMA_LAYERS 0U
52 #define HTP_CONFIG_DEFAULT_LZMA_MEMLIMIT 1048576U
53 #define HTP_CONFIG_DEFAULT_COMPRESSION_BOMB_LIMIT 1048576U
55 #define HTP_CONFIG_DEFAULT_COMPRESSION_TIME_LIMIT 100000
57 #define HTP_CONFIG_DEFAULT_RANDOMIZE 1
58 #define HTP_CONFIG_DEFAULT_RANDOMIZE_RANGE 10
61 #define HTP_FLAG_STATE_CLOSED_TS \
64 #define HTP_FLAG_STATE_CLOSED_TC \
144 #define HTP_BOUNDARY_SET BIT_U8(1)
145 #define HTP_FILENAME_SET BIT_U8(3)
146 #define HTP_DONTSTORE BIT_U8(4)
147 #define HTP_STREAM_DEPTH_SET BIT_U8(5)
202 #define HTP_REQUIRE_REQUEST_BODY (1 << 0)
204 #define HTP_REQUIRE_REQUEST_FILE (1 << 2)
206 #define HTP_REQUIRE_RESPONSE_BODY (1 << 3)
struct HtpState_ HtpState
const struct HTPCfgRec_ * cfg
@ HTTP_DECODER_EVENT_MULTIPART_GENERIC_ERROR
void AppLayerHtpNeedFileInspection(void)
Sets a flag that informs the HTP app layer that some module in the engine needs the http request file...
uint32_t request_headers_raw_len
struct HtpTxUserData_ HtpTxUserData
void AppLayerHtpPrintStats(void)
MimeStateHTTP * mime_state
void * HtpGetTxForH2(void *)
enum HtpSwfCompressType_ HtpSwfCompressType
@ HTTP_SWF_COMPRESSION_ZLIB
uint32_t swf_compress_depth
void HTPStateFree(void *)
Function to frees the HTTP state memory and also frees the HTTP connection parser memory which was us...
@ HTTP_DECODER_EVENT_FILE_NAME_TOO_LONG
@ HTTP_DECODER_EVENT_TOO_MANY_WARNINGS
uint64_t content_len_so_far
struct HtpBodyChunk_ __attribute__((__packed__))
DNP3 link header.
FrameId response_frame_id
HttpRangeContainerBlock * file_range
uint64_t last_request_data_stamp
@ HTTP_SWF_COMPRESSION_NONE
void HtpConfigCreateBackup(void)
uint32_t inspect_min_size
void AppLayerHtpEnableRequestBodyCallback(void)
Sets a flag that informs the HTP app layer that some module in the engine needs the http request body...
uint8_t response_has_trailers
uint8_t * request_headers_raw
uint32_t swf_decompress_depth
int swf_decompression_enabled
AppLayerStateData state_data
void HTPAtExitPrintStats(void)
Print the stats of the HTTP requests.
@ HTTP_DECODER_EVENT_RANGE_INVALID
uint8_t request_has_trailers
struct HTPCfgRec_ HTPCfgRec
uint16_t htp_messages_count
void AppLayerHtpEnableResponseBodyCallback(void)
Sets a flag that informs the HTP app layer that some module in the engine needs the http request body...
HtpSwfCompressType swf_compression_type
@ HTTP_DECODER_EVENT_FAILED_PROTOCOL_CHANGE
struct AppLayerTxData AppLayerTxData
uint8_t request_body_type
@ HTTP_DECODER_EVENT_MULTIPART_NO_FILEDATA
uint8_t * response_headers_raw
@ HTTP_DECODER_EVENT_MULTIPART_INVALID_HEADER
SC_ATOMIC_EXTERN(uint32_t, htp_config_flags)
uint64_t last_response_data_stamp
void HtpConfigRestoreBackup(void)
struct HtpBodyChunk_ * next
uint8_t response_body_init
@ HTTP_SWF_COMPRESSION_BOTH
void RegisterHTPParsers(void)
Register the HTTP protocol and state handling functions to APP layer of the engine.
@ HTTP_SWF_COMPRESSION_LZMA
@ HTP_BODY_REQUEST_MULTIPART
struct HTPCfgDir_ HTPCfgDir
void HTPFreeConfig(void)
Clears the HTTP server configuration memory used by HTP library.
uint32_t response_headers_raw_len
uint8_t request_body_init
StreamingBufferSegment sbseg