Go to the documentation of this file.
105 static void StorageTestFree(
void *x)
111 static int HostStorageTest01(
void)
128 memset(&a, 0x00,
sizeof(a));
129 a.addr_data32[0] = 0x01020304;
165 static int HostStorageTest02(
void)
178 memset(&a, 0x00,
sizeof(a));
179 a.addr_data32[0] = 0x01020304;
201 static int HostStorageTest03(
void)
218 memset(&a, 0x00,
sizeof(a));
219 a.addr_data32[0] = 0x01020304;
#define FAIL_IF_NULL(expr)
Fail a test if expression evaluates to NULL.
void * SCHostGetStorageById(Host *h, SCHostStorageId id)
Get a value from a given Host storage.
void UtRegisterTest(const char *name, int(*TestFn)(void))
Register unit test.
int SCHostSetStorageById(Host *h, SCHostStorageId id, void *ptr)
Store a pointer in a given Host storage.
void HostRelease(Host *h)
Host * HostGetHostFromHash(Address *a)
void SCHostFreeStorage(Host *h)
int SCStorageSetById(Storage *storage, const StorageEnum type, const int id, void *ptr)
set storage for id
unsigned int SCHostStorageSize(void)
#define FAIL_IF_NOT_NULL(expr)
Fail a test if expression evaluates to non-NULL.
#define PASS
Pass the test.
void * SCStorageGetById(const Storage *storage, const StorageEnum type, const int id)
get storage for id
int SCStorageRegister(const StorageEnum type, const char *name, void(*Free)(void *))
Register new storage.
unsigned int SCStorageGetSize(StorageEnum type)
get the size of the void array used to store the pointers
#define FAIL_IF(expr)
Fail a test if expression evaluates to true.
void SCStorageFreeAll(Storage *storage, StorageEnum type)
void HostShutdown(void)
shutdown the flow engine
void SCRegisterHostStorageTests(void)
void SCStorageCleanup(void)
void HostInitConfig(bool quiet)
initialize the configuration
SCHostStorageId SCHostStorageRegister(const char *name, void(*Free)(void *))
Register a Host storage.
int SCStorageFinalize(void)