suricata
host-storage.h File Reference
#include "host.h"
Include dependency graph for host-storage.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  HostStorageId_
 

Typedefs

typedef struct HostStorageId_ HostStorageId
 

Functions

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

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.h.

Typedef Documentation

◆ HostStorageId

typedef struct HostStorageId_ HostStorageId

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: