suricata
|
#include "suricata-common.h"
#include "app-layer-htp.h"
#include "app-layer-htp-mem.h"
#include "app-layer-htp-body.h"
#include "util-streaming-buffer.h"
#include "util-print.h"
Go to the source code of this file.
Functions | |
int | HtpBodyAppendChunk (HtpBody *body, const uint8_t *data, uint32_t len) |
Append a chunk of body to the HtpBody struct. More... | |
void | HtpBodyFree (HtpBody *body) |
Print the information and chunks of a Body. More... | |
void | HtpBodyPrune (HtpState *state, HtpBody *body, int direction) |
Free request body chunks that are already fully parsed. More... | |
Variables | |
StreamingBufferConfig | htp_sbcfg |
This file provides a HTTP protocol support for the engine using HTP library.
Definition in file app-layer-htp-body.c.
int HtpBodyAppendChunk | ( | HtpBody * | body, |
const uint8_t * | data, | ||
uint32_t | len | ||
) |
Append a chunk of body to the HtpBody struct.
body | pointer to the HtpBody holding the list |
data | pointer to the data of the chunk |
len | length of the chunk pointed by data |
0 | ok |
-1 | error |
Definition at line 48 of file app-layer-htp-body.c.
References HtpBody_::content_len_so_far, HtpBody_::first, htp_sbcfg, HTPCalloc(), HTPFree(), HtpBody_::last, len, HtpBodyChunk_::next, HtpBody_::sb, HtpBodyChunk_::sbseg, SCEnter, SCLogDebug, SCReturnInt, StreamingBufferAppend(), and StreamingBufferInit().
void HtpBodyFree | ( | HtpBody * | body | ) |
Print the information and chunks of a Body.
body | pointer to the HtpBody holding the list |
none | Free the information held in the request body |
body | pointer to the HtpBody holding the list |
none |
Definition at line 99 of file app-layer-htp-body.c.
References HtpBody_::first, htp_sbcfg, HTPFree(), HtpBody_::last, HtpBodyChunk_::next, HtpBody_::sb, SCEnter, SCLogDebug, and StreamingBufferFree().
Free request body chunks that are already fully parsed.
state | htp_state, with reference to our config |
body | the body to prune |
direction | STREAM_TOSERVER (request), STREAM_TOCLIENT (response) |
none |
Definition at line 128 of file app-layer-htp-body.c.
References HtpBody_::body_inspected, HtpBody_::body_parsed, HtpState_::cfg, HtpBody_::content_len_so_far, HtpBody_::first, htp_sbcfg, HTPFree(), HTPCfgDir_::inspect_min_size, HTPCfgDir_::inspect_window, HtpBody_::last, next, HtpBodyChunk_::next, HTPCfgRec_::request, HTPCfgRec_::response, HtpBody_::sb, HtpBodyChunk_::sbseg, SCEnter, SCLogDebug, SCReturn, StreamingBufferSegmentIsBeforeWindow(), and StreamingBufferSlideToOffset().
StreamingBufferConfig htp_sbcfg |
Definition at line 97 of file app-layer-htp.c.
Referenced by HtpBodyAppendChunk(), HtpBodyFree(), and HtpBodyPrune().