app-layer-htp-range.c File Reference
#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"
Include dependency graph for app-layer-htp-range.c:

Go to the source code of this file.

Data Structures

struct  ContainerTHashTable


#define HTTP_RANGE_DEFAULT_MEMCAP   100 * 1024 * 1024


typedef struct ContainerTHashTable ContainerTHashTable


int HttpRangeContainerBufferCompare (HttpRangeContainerBuffer *a, HttpRangeContainerBuffer *b)
 RB_GENERATE (HTTP_RANGES, HttpRangeContainerBuffer, rb, HttpRangeContainerBufferCompare)
void HttpRangeContainersInit (void)
void HttpRangeContainersDestroy (void)
uint32_t HttpRangeContainersTimeoutHash (struct timeval *ts)
HttpRangeContainerBlockHttpRangeContainerOpenFile (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 (HttpRangeContainerBlock *c, const uint8_t *data, uint32_t len)
FileHttpRangeClose (HttpRangeContainerBlock *c, uint16_t flags)
void HttpRangeFreeBlock (HttpRangeContainerBlock *b)


ContainerTHashTable ContainerUrlRangeList

Detailed Description

Macro Definition Documentation



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.



Definition at line 148 of file app-layer-htp-range.c.

Typedef Documentation

◆ ContainerTHashTable

Function Documentation

◆ HttpRangeAppendData()

int HttpRangeAppendData ( HttpRangeContainerBlock c,
const uint8_t *  data,
uint32_t  len 

◆ HttpRangeClose()

◆ HttpRangeContainerBufferCompare()

◆ HttpRangeContainerOpenFile()

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 362 of file app-layer-htp-range.c.

◆ HttpRangeContainersDestroy()

void HttpRangeContainersDestroy ( void  )

Definition at line 185 of file app-layer-htp-range.c.

References ContainerUrlRangeList, ContainerTHashTable::ht, and THashShutdown().

Here is the call graph for this function:

◆ HttpRangeContainersInit()

void HttpRangeContainersInit ( void  )

Definition at line 150 of file app-layer-htp-range.c.

References ConfGetValue(), ContainerUrlRangeList, ContainerTHashTable::ht, HTTP_RANGE_DEFAULT_MEMCAP, HTTP_RANGE_DEFAULT_TIMEOUT, ParseSizeStringU64(), SC_ERR_INVALID_VALUE, SCLogDebug, SCLogWarning, str, StringParseUint32(), and THashInit().

Referenced by PreRunInit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HttpRangeContainersTimeoutHash()

uint32_t HttpRangeContainersTimeoutHash ( struct timeval *  ts)

Definition at line 190 of file app-layer-htp-range.c.

References SCLogDebug.

◆ HttpRangeFreeBlock()

void HttpRangeFreeBlock ( HttpRangeContainerBlock b)

Definition at line 605 of file app-layer-htp-range.c.

Referenced by HTPFileClose(), and InitGlobal().

Here is the caller graph for this function:


HttpRangeContainerBuffer  ,
rb  ,

Variable Documentation

◆ ContainerUrlRangeList

ContainerTHashTable ContainerUrlRangeList