suricata
|
Go to the source code of this file.
Data Structures | |
struct | HttpRangeContainerBuffer |
struct | HttpRangeContainerFile |
struct | HttpRangeContainerBlock |
Typedefs | |
typedef struct HttpRangeContainerBuffer | HttpRangeContainerBuffer |
typedef struct HttpRangeContainerFile | HttpRangeContainerFile |
typedef struct HttpRangeContainerBlock | HttpRangeContainerBlock |
typedef struct HttpRangeContainerBlock HttpRangeContainerBlock |
A structure representing a single range request : either skipping, buffering, or appending As this belongs to a flow, appending data to it is ensured to be thread-safe Only one block per file has the pointer to the container
typedef struct HttpRangeContainerBuffer HttpRangeContainerBuffer |
typedef struct HttpRangeContainerFile HttpRangeContainerFile |
Item in hash table for a file in multiple ranges Thread-safety is ensured with the thread-safe hash table cf THashData The number of use is increased for each flow opening a new HttpRangeContainerBlock until it closes this HttpRangeContainerBlock The design goal is to have concurrency only on opening and closing a range request and have a lock-free data structure belonging to one Flow (see HttpRangeContainerBlock below) for every append in between (we suppose we have many appends per range request)
uint64_t HTPByteRangeMemcapGlobalCounter | ( | void | ) |
Definition at line 55 of file app-layer-htp-range.c.
References THashTableContext_::config, ContainerUrlRangeList, ContainerTHashTable::ht, and SC_ATOMIC_GET.
Referenced by AppLayerRegisterGlobalCounters().
uint64_t HTPByteRangeMemuseGlobalCounter | ( | void | ) |
Definition at line 61 of file app-layer-htp-range.c.
References ContainerUrlRangeList, ContainerTHashTable::ht, and SC_ATOMIC_GET.
Referenced by AppLayerRegisterGlobalCounters().
int HTPByteRangeSetMemcap | ( | uint64_t | ) |
Definition at line 45 of file app-layer-htp-range.c.
References THashTableContext_::config, ContainerUrlRangeList, ContainerTHashTable::ht, SC_ATOMIC_GET, and SC_ATOMIC_SET.
int HttpRangeAppendData | ( | const StreamingBufferConfig * | sbcfg, |
HttpRangeContainerBlock * | c, | ||
const uint8_t * | data, | ||
uint32_t | len | ||
) |
Definition at line 377 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 450 of file app-layer-htp-range.c.
int HttpRangeContainerBufferCompare | ( | HttpRangeContainerBuffer * | a, |
HttpRangeContainerBuffer * | b | ||
) |
Definition at line 67 of file app-layer-htp-range.c.
References HttpRangeContainerBuffer::buflen, HttpRangeContainerBuffer::offset, and HttpRangeContainerBuffer::start.
HttpRangeContainerBlock* HttpRangeContainerOpenFile | ( | const unsigned char * | key, |
uint32_t | keylen, | ||
const Flow * | f, | ||
const HTTPContentRange * | cr, | ||
const StreamingBufferConfig * | sbcfg, | ||
const unsigned char * | name, | ||
uint16_t | name_len, | ||
uint16_t | flags, | ||
const unsigned char * | data, | ||
uint32_t | data_len | ||
) |
void HttpRangeContainersDestroy | ( | void | ) |
Definition at line 204 of file app-layer-htp-range.c.
References ContainerUrlRangeList, ContainerTHashTable::ht, and THashShutdown().
void HttpRangeContainersInit | ( | void | ) |
Definition at line 171 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 209 of file app-layer-htp-range.c.
References ContainerUrlRangeList, ContainerTHashTable::ht, THashExpire(), and ts.
void HttpRangeFreeBlock | ( | HttpRangeContainerBlock * | b | ) |
Definition at line 607 of file app-layer-htp-range.c.
References BUG_ON, HttpRangeContainerBlock::container, and HttpRangeContainerBlock::files.
Referenced by HTPFileClose().
RB_HEAD | ( | HTTP_RANGES | , |
HttpRangeContainerBuffer | |||
) |
RB_PROTOTYPE | ( | HTTP_RANGES | , |
HttpRangeContainerBuffer | , | ||
rb | , | ||
HttpRangeContainerBufferCompare | |||
) |