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;
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);
/** \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));