for (i = 0; i < APP_MPMS_MAX; i++) {
AppLayerMpms *am = &app_mpms[i];
- am->sgh_mpm_context = MpmFactoryRegisterMpmCtxProfile(de_ctx, am->name,
- MPM_CTX_FACTORY_FLAGS_PREPARE_WITH_SIG_GROUP_BUILD);
+ am->sgh_mpm_context = MpmFactoryRegisterMpmCtxProfile(de_ctx, am->name);
SCLogDebug("AppLayer MPM %s: %u", am->name, am->sgh_mpm_context);
}
static void SigInitStandardMpmFactoryContexts(DetectEngineCtx *de_ctx)
{
de_ctx->sgh_mpm_context_proto_tcp_packet =
- MpmFactoryRegisterMpmCtxProfile(de_ctx, "packet_proto_tcp",
- MPM_CTX_FACTORY_FLAGS_PREPARE_WITH_SIG_GROUP_BUILD);
+ MpmFactoryRegisterMpmCtxProfile(de_ctx, "packet_proto_tcp");
de_ctx->sgh_mpm_context_proto_udp_packet =
- MpmFactoryRegisterMpmCtxProfile(de_ctx, "packet_proto_udp",
- MPM_CTX_FACTORY_FLAGS_PREPARE_WITH_SIG_GROUP_BUILD);
+ MpmFactoryRegisterMpmCtxProfile(de_ctx, "packet_proto_udp");
de_ctx->sgh_mpm_context_proto_other_packet =
- MpmFactoryRegisterMpmCtxProfile(de_ctx, "packet_proto_other",
- MPM_CTX_FACTORY_FLAGS_PREPARE_WITH_SIG_GROUP_BUILD);
+ MpmFactoryRegisterMpmCtxProfile(de_ctx, "packet_proto_other");
de_ctx->sgh_mpm_context_stream =
- MpmFactoryRegisterMpmCtxProfile(de_ctx, "stream",
- MPM_CTX_FACTORY_FLAGS_PREPARE_WITH_SIG_GROUP_BUILD);
+ MpmFactoryRegisterMpmCtxProfile(de_ctx, "stream");
DetectMpmInitializeAppMpms(de_ctx);
*
* \retval id Return the id created for the new MpmCtx profile.
*/
-int32_t MpmFactoryRegisterMpmCtxProfile(DetectEngineCtx *de_ctx, const char *name, uint8_t flags)
+int32_t MpmFactoryRegisterMpmCtxProfile(DetectEngineCtx *de_ctx, const char *name)
{
void *ptmp;
/* the very first entry */
* the array */
item[0].id = 0;
- /* store the flag */
- item[0].flags = flags;
-
/* store the newly created item */
de_ctx->mpm_ctx_factory_container->items = item;
de_ctx->mpm_ctx_factory_container->no_of_items++;
memset(items[i].mpm_ctx_tc, 0, sizeof(MpmCtx));
items[i].mpm_ctx_tc->global = 1;
}
- items[i].flags = flags;
return items[i].id;
}
}
new_item[0].mpm_ctx_tc->global = 1;
new_item[0].id = de_ctx->mpm_ctx_factory_container->no_of_items;
- new_item[0].flags = flags;
de_ctx->mpm_ctx_factory_container->no_of_items++;
/* the newly created id */
* we should supply this as the key */
#define MPM_CTX_FACTORY_UNIQUE_CONTEXT -1
-#define MPM_CTX_FACTORY_FLAGS_PREPARE_WITH_SIG_GROUP_BUILD 0x01
-
typedef struct MpmCtxFactoryItem_ {
const char *name;
MpmCtx *mpm_ctx_ts;
MpmCtx *mpm_ctx_tc;
int32_t id;
- uint8_t flags;
} MpmCtxFactoryItem;
typedef struct MpmCtxFactoryContainer_ {
struct DetectEngineCtx_;
-int32_t MpmFactoryRegisterMpmCtxProfile(struct DetectEngineCtx_ *, const char *, uint8_t);
+int32_t MpmFactoryRegisterMpmCtxProfile(struct DetectEngineCtx_ *, const char *);
void MpmFactoryReClaimMpmCtx(const struct DetectEngineCtx_ *, MpmCtx *);
MpmCtx *MpmFactoryGetMpmCtxForProfile(const struct DetectEngineCtx_ *, int32_t, int);
void MpmFactoryDeRegisterAllMpmCtxProfiles(struct DetectEngineCtx_ *);