diff --git a/src/detect-engine-mpm.c b/src/detect-engine-mpm.c index 073600aa13..069ea6306d 100644 --- a/src/detect-engine-mpm.c +++ b/src/detect-engine-mpm.c @@ -92,10 +92,14 @@ const char *builtin_mpms[] = { static DetectMpmAppLayerRegistery *g_app_mpms_list = NULL; static int g_app_mpms_list_cnt = 0; -void DetectMpmAppLayerRegister(const char *name, - int direction, int sm_list, int priority, +void DetectAppLayerMpmRegister(const char *name, + int direction, int priority, int (*PrefilterRegister)(SigGroupHead *sgh, MpmCtx *mpm_ctx)) { + DetectBufferTypeSupportsMpm(name); + int sm_list = DetectBufferTypeGetByName(name); + BUG_ON(sm_list == -1); + DetectMpmAppLayerRegistery *am = SCCalloc(1, sizeof(*am)); BUG_ON(am == NULL); am->name = name; @@ -119,17 +123,6 @@ void DetectMpmAppLayerRegister(const char *name, SupportFastPatternForSigMatchList(sm_list, priority); } -void DetectAppLayerMpmRegister(const char *name, - int direction, int priority, - int (*PrefilterRegister)(SigGroupHead *sgh, MpmCtx *mpm_ctx)) -{ - DetectBufferTypeSupportsMpm(name); - int sm_list = DetectBufferTypeGetByName(name); - BUG_ON(sm_list == -1); - DetectMpmAppLayerRegister(name, direction, sm_list, priority, - PrefilterRegister); -} - void DetectMpmInitializeAppMpms(DetectEngineCtx *de_ctx) { BUG_ON(g_app_mpms_list_cnt == 0); diff --git a/src/detect-engine-mpm.h b/src/detect-engine-mpm.h index 9d53c456a8..d3fee45229 100644 --- a/src/detect-engine-mpm.h +++ b/src/detect-engine-mpm.h @@ -83,16 +83,11 @@ int DetectSetFastPatternAndItsId(DetectEngineCtx *de_ctx); /** \brief register an app layer keyword for mpm * \param name keyword name * \param direction SIG_FLAG_TOSERVER or SIG_FLAG_TOCLIENT - * \param sm_list list that contains the keyword's sigmatches * \param PrefilterRegister Prefilter api registration function * * \note direction must be set to either toserver or toclient. * If both are needed, register the keyword twice. */ -void DetectMpmAppLayerRegister(const char *name, - int direction, int sm_list, int priority, - int (*PrefilterRegister)(SigGroupHead *sgh, MpmCtx *mpm_ctx)); - void DetectAppLayerMpmRegister(const char *name, int direction, int priority, int (*PrefilterRegister)(SigGroupHead *sgh, MpmCtx *mpm_ctx));