Go to the documentation of this file.
26 #ifndef SURICATA_UTIL_STORAGE_H
27 #define SURICATA_UTIL_STORAGE_H
unsigned int SCStorageGetCnt(const StorageEnum type)
void SCStorageFreeAll(Storage *storage, const StorageEnum type)
enum StorageEnum_ StorageEnum
int SCStorageFinalize(void)
void SCStorageFreeById(Storage *storage, const StorageEnum type, const int id)
void SCStorageCleanup(void)
int SCStorageRegister(const StorageEnum type, const char *name, void(*Free)(void *))
Register new storage.
unsigned int SCStorageGetSize(const StorageEnum type)
get the size of the void array used to store the pointers
void * SCStorageAllocByIdPrealloc(Storage *storage, StorageEnum type, int id)
AllocById func for prealloc'd base storage (storage ptrs are part of another memory block)
void * SCStorageGetById(const Storage *storage, const StorageEnum type, const int id)
get storage for id
int SCStorageSetById(Storage *storage, const StorageEnum type, const int id, void *ptr)
set storage for id