suricata
|
Data Structures | |
struct | HTPCfgDir_ |
struct | HTPCfgRec_ |
struct | HtpBodyChunk_ |
struct | HtpBody_ |
struct | HtpTxUserData_ |
struct | HtpState_ |
Typedefs | |
typedef enum HtpSwfCompressType_ | HtpSwfCompressType |
typedef struct HTPCfgDir_ | HTPCfgDir |
typedef struct HTPCfgRec_ | HTPCfgRec |
typedef struct HtpBodyChunk_ | HtpBodyChunk |
typedef struct HtpBody_ | HtpBody |
typedef struct HtpTxUserData_ | HtpTxUserData |
typedef struct HtpState_ | HtpState |
Functions | |
struct HtpBodyChunk_ | __attribute__ ((__packed__)) |
DNP3 link header. More... | |
SC_ATOMIC_EXTERN (uint32_t, htp_config_flags) | |
void | RegisterHTPParsers (void) |
Register the HTTP protocol and state handling functions to APP layer of the engine. More... | |
void | HTPAtExitPrintStats (void) |
Print the stats of the HTTP requests. More... | |
void | HTPFreeConfig (void) |
Clears the HTTP server configuration memory used by HTP library. More... | |
void | HTPStateFree (void *) |
Function to frees the HTTP state memory and also frees the HTTP connection parser memory which was used by the HTP library. More... | |
void | AppLayerHtpEnableRequestBodyCallback (void) |
Sets a flag that informs the HTP app layer that some module in the engine needs the http request body data. \initonly. More... | |
void | AppLayerHtpEnableResponseBodyCallback (void) |
Sets a flag that informs the HTP app layer that some module in the engine needs the http request body data. \initonly. More... | |
void | AppLayerHtpNeedFileInspection (void) |
Sets a flag that informs the HTP app layer that some module in the engine needs the http request file. More... | |
void | AppLayerHtpPrintStats (void) |
void | HTPConfigure (void) |
void | HtpConfigCreateBackup (void) |
void | HtpConfigRestoreBackup (void) |
void * | HtpGetTxForH2 (void *) |
void * | HttpHeaderThreadDataInit (void *data) |
void | HttpHeaderThreadDataFree (void *data) |
int | HttpHeaderExpandBuffer (HttpHeaderThreadData *td, HttpHeaderBuffer *buf, uint32_t size) |
HttpHeaderBuffer * | HttpHeaderGetBufferSpace (DetectEngineThreadCtx *det_ctx, Flow *f, uint8_t flags, const int keyword_id, HttpHeaderThreadData **ret_hdr_td) |
#define HTP_BOUNDARY_SET BIT_U8(1) |
We have a boundary string
Definition at line 200 of file app-layer-htp.h.
#define HTP_CONFIG_DEFAULT_COMPRESSION_BOMB_LIMIT 1048576U |
Definition at line 55 of file app-layer-htp.h.
#define HTP_CONFIG_DEFAULT_COMPRESSION_TIME_LIMIT 100000 |
Definition at line 57 of file app-layer-htp.h.
#define HTP_CONFIG_DEFAULT_FIELD_LIMIT_HARD 18000U |
Definition at line 50 of file app-layer-htp.h.
#define HTP_CONFIG_DEFAULT_FIELD_LIMIT_SOFT 9000U |
Definition at line 49 of file app-layer-htp.h.
#define HTP_CONFIG_DEFAULT_LZMA_LAYERS 0U |
Definition at line 52 of file app-layer-htp.h.
#define HTP_CONFIG_DEFAULT_LZMA_MEMLIMIT 1048576U |
Definition at line 54 of file app-layer-htp.h.
#define HTP_CONFIG_DEFAULT_RANDOMIZE 1 |
Definition at line 59 of file app-layer-htp.h.
#define HTP_CONFIG_DEFAULT_RANDOMIZE_RANGE 10 |
Definition at line 60 of file app-layer-htp.h.
#define HTP_CONFIG_DEFAULT_REQUEST_BODY_LIMIT 4096U |
Definition at line 43 of file app-layer-htp.h.
#define HTP_CONFIG_DEFAULT_REQUEST_INSPECT_MIN_SIZE 32768U |
Definition at line 45 of file app-layer-htp.h.
#define HTP_CONFIG_DEFAULT_REQUEST_INSPECT_WINDOW 4096U |
Definition at line 46 of file app-layer-htp.h.
#define HTP_CONFIG_DEFAULT_RESPONSE_BODY_LIMIT 4096U |
Definition at line 44 of file app-layer-htp.h.
#define HTP_CONFIG_DEFAULT_RESPONSE_INSPECT_MIN_SIZE 32768U |
Definition at line 47 of file app-layer-htp.h.
#define HTP_CONFIG_DEFAULT_RESPONSE_INSPECT_WINDOW 4096U |
Definition at line 48 of file app-layer-htp.h.
#define HTP_DONTSTORE BIT_U8(4) |
not storing this file
Definition at line 202 of file app-layer-htp.h.
#define HTP_FILENAME_SET BIT_U8(3) |
filename is registered in the flow
Definition at line 201 of file app-layer-htp.h.
#define HTP_FLAG_STATE_CLOSED_TC 0x0004 |
Flag to indicate that HTTP \ connection is closed
Definition at line 67 of file app-layer-htp.h.
#define HTP_FLAG_STATE_CLOSED_TS 0x0002 |
Flag to indicate that HTTP connection is closed
Definition at line 64 of file app-layer-htp.h.
#define HTP_REQUIRE_REQUEST_BODY (1 << 0) |
part of the engine needs the request body (e.g. http_client_body keyword)
Definition at line 267 of file app-layer-htp.h.
#define HTP_REQUIRE_REQUEST_FILE (1 << 2) |
part of the engine needs the request file (e.g. log-file module)
Definition at line 269 of file app-layer-htp.h.
#define HTP_REQUIRE_RESPONSE_BODY (1 << 3) |
part of the engine needs the request body (e.g. file_data keyword)
Definition at line 271 of file app-layer-htp.h.
#define HTP_STREAM_DEPTH_SET BIT_U8(5) |
stream-depth is set
Definition at line 203 of file app-layer-htp.h.
typedef struct HtpBodyChunk_ HtpBodyChunk |
Definition at line 1 of file app-layer-htp.h.
typedef struct HTPCfgDir_ HTPCfgDir |
typedef struct HTPCfgRec_ HTPCfgRec |
Need a linked list in order to keep track of these
typedef enum HtpSwfCompressType_ HtpSwfCompressType |
typedef struct HtpTxUserData_ HtpTxUserData |
Now the Body Chunks will be stored per transaction, at the tx user data
anonymous enum |
Enumerator | |
---|---|
HTP_BODY_REQUEST_NONE | |
HTP_BODY_REQUEST_MULTIPART | |
HTP_BODY_REQUEST_POST | |
HTP_BODY_REQUEST_PUT |
Definition at line 68 of file app-layer-htp.h.
anonymous enum |
Definition at line 75 of file app-layer-htp.h.
enum HtpSwfCompressType_ |
Enumerator | |
---|---|
HTTP_SWF_COMPRESSION_NONE | |
HTTP_SWF_COMPRESSION_ZLIB | |
HTTP_SWF_COMPRESSION_LZMA | |
HTTP_SWF_COMPRESSION_BOTH |
Definition at line 142 of file app-layer-htp.h.
struct HtpBodyChunk_ __attribute__ | ( | (__packed__) | ) |
DNP3 link header.
DNP3 internal indicators.
DNP3 application header.
Part of the application header for responses only.
Definition at line 54 of file decode-vlan.c.
void AppLayerHtpEnableRequestBodyCallback | ( | void | ) |
Sets a flag that informs the HTP app layer that some module in the engine needs the http request body data. \initonly.
Definition at line 472 of file app-layer-htp.c.
References HTP_REQUIRE_REQUEST_BODY, SC_ATOMIC_OR, SCEnter, and SCReturn.
Referenced by AppLayerHtpNeedFileInspection(), and RunUnittests().
void AppLayerHtpEnableResponseBodyCallback | ( | void | ) |
Sets a flag that informs the HTP app layer that some module in the engine needs the http request body data. \initonly.
Definition at line 485 of file app-layer-htp.c.
References HTP_REQUIRE_RESPONSE_BODY, SC_ATOMIC_OR, SCEnter, and SCReturn.
Referenced by AppLayerHtpNeedFileInspection().
void AppLayerHtpNeedFileInspection | ( | void | ) |
Sets a flag that informs the HTP app layer that some module in the engine needs the http request file.
\initonly
Definition at line 499 of file app-layer-htp.c.
References AppLayerHtpEnableRequestBodyCallback(), AppLayerHtpEnableResponseBodyCallback(), HTP_REQUIRE_REQUEST_FILE, SC_ATOMIC_OR, SCEnter, and SCReturn.
Referenced by RunUnittests().
void AppLayerHtpPrintStats | ( | void | ) |
Definition at line 2643 of file app-layer-htp.c.
References SCLogPerf, SCMutexLock, and SCMutexUnlock.
Referenced by GlobalsDestroy().
void HTPAtExitPrintStats | ( | void | ) |
Print the stats of the HTTP requests.
Definition at line 1650 of file app-layer-htp.c.
References SCEnter, SCLogDebug, SCMutexLock, SCMutexUnlock, and SCReturn.
Referenced by GlobalsDestroy().
void HtpConfigCreateBackup | ( | void | ) |
Definition at line 2882 of file app-layer-htp.c.
void HtpConfigRestoreBackup | ( | void | ) |
Definition at line 2887 of file app-layer-htp.c.
void HTPConfigure | ( | void | ) |
Definition at line 2572 of file app-layer-htp.c.
References SCEnter.
void HTPFreeConfig | ( | void | ) |
Clears the HTTP server configuration memory used by HTP library.
Definition at line 1663 of file app-layer-htp.c.
References AppLayerParserConfParserEnabled(), AppLayerProtoDetectConfProtoDetectionEnabled(), SCEnter, and SCReturn.
Referenced by GlobalsDestroy().
void* HtpGetTxForH2 | ( | void * | ) |
Definition at line 2706 of file app-layer-htp.c.
References HtpState_::conn.
Referenced by HTTP2MimicHttp1Request().
void HTPStateFree | ( | void * | ) |
Function to frees the HTTP state memory and also frees the HTTP connection parser memory which was used by the HTP library.
Definition at line 387 of file app-layer-htp.c.
References HtpState_::connp, SCEnter, SCLogDebug, and SCReturn.
int HttpHeaderExpandBuffer | ( | HttpHeaderThreadData * | td, |
HttpHeaderBuffer * | buf, | ||
uint32_t | size | ||
) |
Definition at line 81 of file detect-http-header-common.c.
References HttpHeaderBuffer_::buffer, HttpHeaderBuffer_::len, SCLogDebug, SCRealloc, HttpHeaderBuffer_::size, HttpHeaderThreadData_::size_step, and unlikely.
Referenced by HttpHeaderThreadDataInit().
HttpHeaderBuffer* HttpHeaderGetBufferSpace | ( | DetectEngineThreadCtx * | det_ctx, |
Flow * | f, | ||
uint8_t | flags, | ||
const int | keyword_id, | ||
HttpHeaderThreadData ** | ret_hdr_td | ||
) |
Definition at line 100 of file detect-http-header-common.c.
References HttpHeaderThreadData_::buffer, DetectThreadCtxGetGlobalKeywordThreadCtx(), and HttpHeaderBuffer_::len.
void HttpHeaderThreadDataFree | ( | void * | data | ) |
Definition at line 74 of file detect-http-header-common.c.
References HttpHeaderBuffer_::buffer, HttpHeaderThreadData_::buffer, and SCFree.
void* HttpHeaderThreadDataInit | ( | void * | data | ) |
Definition at line 57 of file detect-http-header-common.c.
References HttpHeaderThreadData_::buffer, HttpHeaderExpandBuffer(), SCCalloc, HttpHeaderThreadConfig_::size_step, and HttpHeaderThreadData_::size_step.
void RegisterHTPParsers | ( | void | ) |
Register the HTTP protocol and state handling functions to APP layer of the engine.
HTTP
Definition at line 2814 of file app-layer-htp.c.
References ALPROTO_HTTP1, AppLayerProtoDetectConfProtoDetectionEnabled(), AppLayerProtoDetectRegisterProtocol(), and SCEnter.
SC_ATOMIC_EXTERN | ( | uint32_t | , |
htp_config_flags | |||
) |