suricata
|
#include "suricata-common.h"
#include "app-layer-htp-range.h"
#include "util-misc.h"
#include "util-thash.h"
#include "util-memcmp.h"
#include "util-hash-string.h"
#include "util-validate.h"
#include "util-byte.h"
Go to the source code of this file.
Data Structures | |
struct | ContainerTHashTable |
Macros | |
#define | CONTAINER_URLRANGE_HASH_SIZE 256 |
#define | HTTP_RANGE_DEFAULT_TIMEOUT 60 |
#define | HTTP_RANGE_DEFAULT_MEMCAP 100 * 1024 * 1024 |
Typedefs | |
typedef struct ContainerTHashTable | ContainerTHashTable |
Functions | |
int | HttpRangeContainerBufferCompare (HttpRangeContainerBuffer *a, HttpRangeContainerBuffer *b) |
RB_GENERATE (HTTP_RANGES, HttpRangeContainerBuffer, rb, HttpRangeContainerBufferCompare) | |
void | HttpRangeContainersInit (void) |
void | HttpRangeContainersDestroy (void) |
uint32_t | HttpRangeContainersTimeoutHash (const SCTime_t ts) |
HttpRangeContainerBlock * | HttpRangeContainerOpenFile (const uint8_t *key, uint32_t keylen, const Flow *f, const HTTPContentRange *crparsed, const StreamingBufferConfig *sbcfg, const uint8_t *name, uint16_t name_len, uint16_t flags, const uint8_t *data, uint32_t data_len) |
int | HttpRangeAppendData (const StreamingBufferConfig *sbcfg, HttpRangeContainerBlock *c, const uint8_t *data, uint32_t len) |
File * | HttpRangeClose (const StreamingBufferConfig *sbcfg, HttpRangeContainerBlock *c, uint16_t flags) |
void | HttpRangeFreeBlock (HttpRangeContainerBlock *b) |
Variables | |
ContainerTHashTable | ContainerUrlRangeList |
Definition in file app-layer-htp-range.c.
#define CONTAINER_URLRANGE_HASH_SIZE 256 |
Definition at line 44 of file app-layer-htp-range.c.
#define HTTP_RANGE_DEFAULT_MEMCAP 100 * 1024 * 1024 |
Definition at line 149 of file app-layer-htp-range.c.
#define HTTP_RANGE_DEFAULT_TIMEOUT 60 |
Definition at line 148 of file app-layer-htp-range.c.
typedef struct ContainerTHashTable ContainerTHashTable |
int HttpRangeAppendData | ( | const StreamingBufferConfig * | sbcfg, |
HttpRangeContainerBlock * | c, | ||
const uint8_t * | data, | ||
uint32_t | len | ||
) |
Definition at line 396 of file app-layer-htp-range.c.
Referenced by HTPFileStoreChunk().
File* HttpRangeClose | ( | const StreamingBufferConfig * | sbcfg, |
HttpRangeContainerBlock * | c, | ||
uint16_t | flags | ||
) |
f
is non-NULL, the ownership of the file is transferred to the caller. Definition at line 469 of file app-layer-htp-range.c.
int HttpRangeContainerBufferCompare | ( | HttpRangeContainerBuffer * | a, |
HttpRangeContainerBuffer * | b | ||
) |
Definition at line 45 of file app-layer-htp-range.c.
References HttpRangeContainerBuffer::buflen, HttpRangeContainerBuffer::offset, and HttpRangeContainerBuffer::start.
HttpRangeContainerBlock* HttpRangeContainerOpenFile | ( | const uint8_t * | key, |
uint32_t | keylen, | ||
const Flow * | f, | ||
const HTTPContentRange * | crparsed, | ||
const StreamingBufferConfig * | sbcfg, | ||
const uint8_t * | name, | ||
uint16_t | name_len, | ||
uint16_t | flags, | ||
const uint8_t * | data, | ||
uint32_t | data_len | ||
) |
Definition at line 360 of file app-layer-htp-range.c.
void HttpRangeContainersDestroy | ( | void | ) |
Definition at line 183 of file app-layer-htp-range.c.
References ContainerUrlRangeList, ContainerTHashTable::ht, and THashShutdown().
void HttpRangeContainersInit | ( | void | ) |
Definition at line 150 of file app-layer-htp-range.c.
References ConfGet(), ContainerUrlRangeList, ContainerTHashTable::ht, HTTP_RANGE_DEFAULT_MEMCAP, HTTP_RANGE_DEFAULT_TIMEOUT, ParseSizeStringU64(), SCLogDebug, SCLogWarning, str, StringParseUint32(), and THashInit().
Referenced by PreRunInit().
uint32_t HttpRangeContainersTimeoutHash | ( | const SCTime_t | ts | ) |
Definition at line 188 of file app-layer-htp-range.c.
References SCLogDebug.
void HttpRangeFreeBlock | ( | HttpRangeContainerBlock * | b | ) |
Definition at line 613 of file app-layer-htp-range.c.
References BUG_ON, HttpRangeContainerBlock::container, and HttpRangeContainerBlock::files.
Referenced by HTPFileClose().
RB_GENERATE | ( | HTTP_RANGES | , |
HttpRangeContainerBuffer | , | ||
rb | , | ||
HttpRangeContainerBufferCompare | |||
) |
ContainerTHashTable ContainerUrlRangeList |
Definition at line 39 of file app-layer-htp-range.c.
Referenced by HttpRangeContainersDestroy(), and HttpRangeContainersInit().