You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
suricata/src/app-layer-detect.c

25 lines
670 B
C

#include "suricata-common.h"
#include "app-layer-detect.h"
/** \brief alloc a app layer detection ctx
* \retval alde_ctx ptr or NULL in case of error
*/
AlDetectEngineCtx *AlDetectEngineCtxAlloc(void) {
AlDetectEngineCtx *alde_ctx = malloc(sizeof(AlDetectEngineCtx));
if (alde_ctx == NULL) {
SCLogError(SC_ERR_MEM_ALLOC, "malloc failed: %s", strerror(errno));
return NULL;
}
memset(alde_ctx, 0x00, sizeof(AlDetectEngineCtx));
return alde_ctx;
}
/** \brief free a app layer detection ctx
* \param alde_ctx ptr to app layer detection ctx
*/
void AlDetectEngineCtxAllocFree(AlDetectEngineCtx *alde_ctx) {
free(alde_ctx);
}