suricata
host-storage.c File Reference
#include "suricata-common.h"
#include "host-storage.h"
#include "util-unittest.h"
Include dependency graph for host-storage.c:

Go to the source code of this file.

Functions

unsigned int HostStorageSize (void)
 
HostStorageId HostStorageRegister (const char *name, const unsigned int size, void *(*Alloc)(unsigned int), void(*Free)(void *))
 Register a Host storage. More...
 
int HostSetStorageById (Host *h, HostStorageId id, void *ptr)
 Store a pointer in a given Host storage. More...
 
void * HostGetStorageById (Host *h, HostStorageId id)
 Get a value from a given Host storage. More...
 
void * HostAllocStorageById (Host *h, HostStorageId id)
 
void HostFreeStorage (Host *h)
 
void RegisterHostStorageTests (void)
 

Detailed Description

Author
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t

Host wrapper around storage api

Definition in file host-storage.c.

Function Documentation

◆ HostAllocStorageById()

void* HostAllocStorageById ( Host h,
HostStorageId  id 
)

Definition at line 99 of file host-storage.c.

References Host_::storage, STORAGE_HOST, and StorageAllocByIdPrealloc().

Here is the call graph for this function:

◆ HostFreeStorage()

void HostFreeStorage ( Host h)

Definition at line 104 of file host-storage.c.

References HostStorageSize(), Host_::storage, STORAGE_HOST, and StorageFreeAll().

Referenced by HostCleanup(), and HostClearMemory().

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

◆ HostStorageSize()

unsigned int HostStorageSize ( void  )

Definition at line 30 of file host-storage.c.

References STORAGE_HOST, and StorageGetSize().

Referenced by HostClearMemory(), HostFreeStorage(), and HostInitConfig().

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

◆ RegisterHostStorageTests()

void RegisterHostStorageTests ( void  )

Definition at line 330 of file host-storage.c.

References UtRegisterTest().

Referenced by HostRegisterUnittests().

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