detect: spelling: DetectBufferMpmRegistry

pull/8828/head
Victor Julien 3 years ago
parent 29d59ee155
commit da89164ba1

@ -180,9 +180,8 @@ static void PrefilterMpmDnsQueryFree(void *ptr)
SCFree(ptr);
}
static int PrefilterMpmDnsQueryRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
static int PrefilterMpmDnsQueryRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
PrefilterMpmDnsQuery *pectx = SCCalloc(1, sizeof(*pectx));
if (pectx == NULL)

@ -205,7 +205,7 @@ static void PrefilterMpmFrameFree(void *ptr)
}
int PrefilterGenericMpmFrameRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
SCEnter();
PrefilterMpmFrameCtx *pectx = SCCalloc(1, sizeof(*pectx));

@ -30,7 +30,7 @@ int DetectRunFrameInspectRule(ThreadVars *tv, DetectEngineThreadCtx *det_ctx, co
Flow *f, Packet *p, const Frames *frames, const Frame *frame);
int PrefilterGenericMpmFrameRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id);
const DetectBufferMpmRegistry *mpm_reg, int list_id);
int DetectEngineInspectFrameBufferGeneric(DetectEngineThreadCtx *det_ctx,
const DetectEngineFrameInspectionEngine *engine, const Signature *s, Packet *p,
const Frames *frames, const Frame *frame);

@ -79,20 +79,17 @@ const char *builtin_mpms[] = {
* Keywords are registered at engine start up
*/
static DetectBufferMpmRegistery *g_mpm_list[DETECT_BUFFER_MPM_TYPE_SIZE] = { NULL, NULL, NULL };
static DetectBufferMpmRegistry *g_mpm_list[DETECT_BUFFER_MPM_TYPE_SIZE] = { NULL, NULL, NULL };
static int g_mpm_list_cnt[DETECT_BUFFER_MPM_TYPE_SIZE] = { 0, 0, 0 };
/** \brief register a MPM engine
*
* \note to be used at start up / registration only. Errors are fatal.
*/
void DetectAppLayerMpmRegister2(const char *name,
int direction, int priority,
int (*PrefilterRegister)(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id),
InspectionBufferGetDataPtr GetData,
AppProto alproto, int tx_min_progress)
void DetectAppLayerMpmRegister2(const char *name, int direction, int priority,
int (*PrefilterRegister)(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistry *mpm_reg, int list_id),
InspectionBufferGetDataPtr GetData, AppProto alproto, int tx_min_progress)
{
SCLogDebug("registering %s/%d/%d/%p/%p/%u/%d", name, direction, priority,
PrefilterRegister, GetData, alproto, tx_min_progress);
@ -111,7 +108,7 @@ void DetectAppLayerMpmRegister2(const char *name,
FatalError("MPM engine registration for %s failed", name);
}
DetectBufferMpmRegistery *am = SCCalloc(1, sizeof(*am));
DetectBufferMpmRegistry *am = SCCalloc(1, sizeof(*am));
BUG_ON(am == NULL);
am->name = name;
snprintf(am->pname, sizeof(am->pname), "%s", am->name);
@ -130,7 +127,7 @@ void DetectAppLayerMpmRegister2(const char *name,
if (g_mpm_list[DETECT_BUFFER_MPM_TYPE_APP] == NULL) {
g_mpm_list[DETECT_BUFFER_MPM_TYPE_APP] = am;
} else {
DetectBufferMpmRegistery *t = g_mpm_list[DETECT_BUFFER_MPM_TYPE_APP];
DetectBufferMpmRegistry *t = g_mpm_list[DETECT_BUFFER_MPM_TYPE_APP];
while (t->next != NULL) {
t = t->next;
}
@ -150,10 +147,10 @@ void DetectAppLayerMpmRegisterByParentId(DetectEngineCtx *de_ctx,
{
SCLogDebug("registering %d/%d", id, parent_id);
DetectBufferMpmRegistery *t = de_ctx->app_mpms_list;
DetectBufferMpmRegistry *t = de_ctx->app_mpms_list;
while (t) {
if (t->sm_list == parent_id) {
DetectBufferMpmRegistery *am = SCCalloc(1, sizeof(*am));
DetectBufferMpmRegistry *am = SCCalloc(1, sizeof(*am));
BUG_ON(am == NULL);
am->name = t->name;
am->direction = t->direction;
@ -214,10 +211,10 @@ void DetectAppLayerMpmRegisterByParentId(DetectEngineCtx *de_ctx,
void DetectMpmInitializeAppMpms(DetectEngineCtx *de_ctx)
{
const DetectBufferMpmRegistery *list = g_mpm_list[DETECT_BUFFER_MPM_TYPE_APP];
DetectBufferMpmRegistery *toadd = de_ctx->app_mpms_list;
const DetectBufferMpmRegistry *list = g_mpm_list[DETECT_BUFFER_MPM_TYPE_APP];
DetectBufferMpmRegistry *toadd = de_ctx->app_mpms_list;
while (list != NULL) {
DetectBufferMpmRegistery *n = SCCalloc(1, sizeof(*n));
DetectBufferMpmRegistry *n = SCCalloc(1, sizeof(*n));
BUG_ON(n == NULL);
*n = *list;
@ -265,7 +262,7 @@ void DetectMpmInitializeAppMpms(DetectEngineCtx *de_ctx)
int DetectMpmPrepareAppMpms(DetectEngineCtx *de_ctx)
{
int r = 0;
const DetectBufferMpmRegistery *am = de_ctx->app_mpms_list;
const DetectBufferMpmRegistry *am = de_ctx->app_mpms_list;
while (am != NULL) {
int dir = (am->direction == SIG_FLAG_TOSERVER) ? 1 : 0;
@ -289,7 +286,7 @@ int DetectMpmPrepareAppMpms(DetectEngineCtx *de_ctx)
*/
void DetectFrameMpmRegister(const char *name, int direction, int priority,
int (*PrefilterRegister)(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id),
const DetectBufferMpmRegistry *mpm_reg, int list_id),
AppProto alproto, uint8_t type)
{
SCLogDebug("registering %s/%d/%p/%s/%u", name, priority, PrefilterRegister,
@ -303,7 +300,7 @@ void DetectFrameMpmRegister(const char *name, int direction, int priority,
FatalError("MPM engine registration for %s failed", name);
}
DetectBufferMpmRegistery *am = SCCalloc(1, sizeof(*am));
DetectBufferMpmRegistry *am = SCCalloc(1, sizeof(*am));
BUG_ON(am == NULL);
am->name = name;
snprintf(am->pname, sizeof(am->pname), "%s", am->name);
@ -321,7 +318,7 @@ void DetectFrameMpmRegister(const char *name, int direction, int priority,
if (g_mpm_list[DETECT_BUFFER_MPM_TYPE_FRAME] == NULL) {
g_mpm_list[DETECT_BUFFER_MPM_TYPE_FRAME] = am;
} else {
DetectBufferMpmRegistery *t = g_mpm_list[DETECT_BUFFER_MPM_TYPE_FRAME];
DetectBufferMpmRegistry *t = g_mpm_list[DETECT_BUFFER_MPM_TYPE_FRAME];
while (t->next != NULL) {
t = t->next;
}
@ -340,10 +337,10 @@ void DetectFrameMpmRegisterByParentId(DetectEngineCtx *de_ctx, const int id, con
{
SCLogDebug("registering %d/%d", id, parent_id);
DetectBufferMpmRegistery *t = de_ctx->frame_mpms_list;
DetectBufferMpmRegistry *t = de_ctx->frame_mpms_list;
while (t) {
if (t->sm_list == parent_id) {
DetectBufferMpmRegistery *am = SCCalloc(1, sizeof(*am));
DetectBufferMpmRegistry *am = SCCalloc(1, sizeof(*am));
BUG_ON(am == NULL);
am->name = t->name;
snprintf(am->pname, sizeof(am->pname), "%s#%d", am->name, id);
@ -377,7 +374,7 @@ void DetectFrameMpmRegisterByParentId(DetectEngineCtx *de_ctx, const int id, con
void DetectEngineFrameMpmRegister(DetectEngineCtx *de_ctx, const char *name, int direction,
int priority,
int (*PrefilterRegister)(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id),
const DetectBufferMpmRegistry *mpm_reg, int list_id),
AppProto alproto, uint8_t type)
{
SCLogDebug("registering %s/%d/%p/%s/%u", name, priority, PrefilterRegister,
@ -392,7 +389,7 @@ void DetectEngineFrameMpmRegister(DetectEngineCtx *de_ctx, const char *name, int
DetectEngineBufferTypeSupportsFrames(de_ctx, name);
DetectEngineBufferTypeSupportsTransformations(de_ctx, name);
DetectBufferMpmRegistery *am = SCCalloc(1, sizeof(*am));
DetectBufferMpmRegistry *am = SCCalloc(1, sizeof(*am));
BUG_ON(am == NULL);
am->name = name;
snprintf(am->pname, sizeof(am->pname), "%s", am->name);
@ -424,7 +421,7 @@ void DetectEngineFrameMpmRegister(DetectEngineCtx *de_ctx, const char *name, int
if (de_ctx->frame_mpms_list == NULL) {
de_ctx->frame_mpms_list = am;
} else {
DetectBufferMpmRegistery *t = de_ctx->frame_mpms_list;
DetectBufferMpmRegistry *t = de_ctx->frame_mpms_list;
while (t->next != NULL) {
t = t->next;
}
@ -439,9 +436,9 @@ void DetectEngineFrameMpmRegister(DetectEngineCtx *de_ctx, const char *name, int
void DetectMpmInitializeFrameMpms(DetectEngineCtx *de_ctx)
{
const DetectBufferMpmRegistery *list = g_mpm_list[DETECT_BUFFER_MPM_TYPE_FRAME];
const DetectBufferMpmRegistry *list = g_mpm_list[DETECT_BUFFER_MPM_TYPE_FRAME];
while (list != NULL) {
DetectBufferMpmRegistery *n = SCCalloc(1, sizeof(*n));
DetectBufferMpmRegistry *n = SCCalloc(1, sizeof(*n));
BUG_ON(n == NULL);
*n = *list;
@ -450,7 +447,7 @@ void DetectMpmInitializeFrameMpms(DetectEngineCtx *de_ctx)
if (de_ctx->frame_mpms_list == NULL) {
de_ctx->frame_mpms_list = n;
} else {
DetectBufferMpmRegistery *t = de_ctx->frame_mpms_list;
DetectBufferMpmRegistry *t = de_ctx->frame_mpms_list;
while (t->next != NULL) {
t = t->next;
}
@ -493,7 +490,7 @@ int DetectMpmPrepareFrameMpms(DetectEngineCtx *de_ctx)
{
SCLogDebug("preparing frame mpm");
int r = 0;
const DetectBufferMpmRegistery *am = de_ctx->frame_mpms_list;
const DetectBufferMpmRegistry *am = de_ctx->frame_mpms_list;
while (am != NULL) {
SCLogDebug("am %p %s sgh_mpm_context %d", am, am->name, am->sgh_mpm_context);
SCLogDebug("%s", am->name);
@ -517,11 +514,9 @@ int DetectMpmPrepareFrameMpms(DetectEngineCtx *de_ctx)
*
* \note to be used at start up / registration only. Errors are fatal.
*/
void DetectPktMpmRegister(const char *name,
int priority,
int (*PrefilterRegister)(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id),
void DetectPktMpmRegister(const char *name, int priority,
int (*PrefilterRegister)(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistry *mpm_reg, int list_id),
InspectionBufferGetPktDataPtr GetData)
{
SCLogDebug("registering %s/%d/%p/%p", name, priority,
@ -539,7 +534,7 @@ void DetectPktMpmRegister(const char *name,
FatalError("MPM engine registration for %s failed", name);
}
DetectBufferMpmRegistery *am = SCCalloc(1, sizeof(*am));
DetectBufferMpmRegistry *am = SCCalloc(1, sizeof(*am));
BUG_ON(am == NULL);
am->name = name;
snprintf(am->pname, sizeof(am->pname), "%s", am->name);
@ -554,7 +549,7 @@ void DetectPktMpmRegister(const char *name,
if (g_mpm_list[DETECT_BUFFER_MPM_TYPE_PKT] == NULL) {
g_mpm_list[DETECT_BUFFER_MPM_TYPE_PKT] = am;
} else {
DetectBufferMpmRegistery *t = g_mpm_list[DETECT_BUFFER_MPM_TYPE_PKT];
DetectBufferMpmRegistry *t = g_mpm_list[DETECT_BUFFER_MPM_TYPE_PKT];
while (t->next != NULL) {
t = t->next;
}
@ -574,10 +569,10 @@ void DetectPktMpmRegisterByParentId(DetectEngineCtx *de_ctx,
{
SCLogDebug("registering %d/%d", id, parent_id);
DetectBufferMpmRegistery *t = de_ctx->pkt_mpms_list;
DetectBufferMpmRegistry *t = de_ctx->pkt_mpms_list;
while (t) {
if (t->sm_list == parent_id) {
DetectBufferMpmRegistery *am = SCCalloc(1, sizeof(*am));
DetectBufferMpmRegistry *am = SCCalloc(1, sizeof(*am));
BUG_ON(am == NULL);
am->name = t->name;
snprintf(am->pname, sizeof(am->pname), "%s#%d", am->name, id);
@ -608,9 +603,9 @@ void DetectPktMpmRegisterByParentId(DetectEngineCtx *de_ctx,
void DetectMpmInitializePktMpms(DetectEngineCtx *de_ctx)
{
const DetectBufferMpmRegistery *list = g_mpm_list[DETECT_BUFFER_MPM_TYPE_PKT];
const DetectBufferMpmRegistry *list = g_mpm_list[DETECT_BUFFER_MPM_TYPE_PKT];
while (list != NULL) {
DetectBufferMpmRegistery *n = SCCalloc(1, sizeof(*n));
DetectBufferMpmRegistry *n = SCCalloc(1, sizeof(*n));
BUG_ON(n == NULL);
*n = *list;
@ -619,7 +614,7 @@ void DetectMpmInitializePktMpms(DetectEngineCtx *de_ctx)
if (de_ctx->pkt_mpms_list == NULL) {
de_ctx->pkt_mpms_list = n;
} else {
DetectBufferMpmRegistery *t = de_ctx->pkt_mpms_list;
DetectBufferMpmRegistry *t = de_ctx->pkt_mpms_list;
while (t->next != NULL) {
t = t->next;
}
@ -662,7 +657,7 @@ int DetectMpmPreparePktMpms(DetectEngineCtx *de_ctx)
{
SCLogDebug("preparing pkt mpm");
int r = 0;
const DetectBufferMpmRegistery *am = de_ctx->pkt_mpms_list;
const DetectBufferMpmRegistry *am = de_ctx->pkt_mpms_list;
while (am != NULL) {
SCLogDebug("%s", am->name);
if (am->sgh_mpm_context != MPM_CTX_FACTORY_UNIQUE_CONTEXT)
@ -1402,10 +1397,10 @@ static MpmStore *MpmStoreLookup(DetectEngineCtx *de_ctx, MpmStore *s)
return rs;
}
static const DetectBufferMpmRegistery *GetByMpmStore(const DetectEngineCtx *de_ctx,
const MpmStore *ms)
static const DetectBufferMpmRegistry *GetByMpmStore(
const DetectEngineCtx *de_ctx, const MpmStore *ms)
{
const DetectBufferMpmRegistery *am = de_ctx->app_mpms_list;
const DetectBufferMpmRegistry *am = de_ctx->app_mpms_list;
while (am != NULL) {
if (ms->sm_list == am->sm_list &&
ms->direction == am->direction) {
@ -1449,7 +1444,7 @@ void MpmStoreReportStats(const DetectEngineCtx *de_ctx)
if (ms->buffer < MPMB_MAX)
stats[ms->buffer]++;
else if (ms->sm_list != DETECT_SM_LIST_PMATCH) {
const DetectBufferMpmRegistery *am = GetByMpmStore(de_ctx, ms);
const DetectBufferMpmRegistry *am = GetByMpmStore(de_ctx, ms);
if (am != NULL) {
switch (am->type) {
case DETECT_BUFFER_MPM_TYPE_PKT:
@ -1485,7 +1480,7 @@ void MpmStoreReportStats(const DetectEngineCtx *de_ctx)
for (int x = 0; x < MPMB_MAX; x++) {
SCLogPerf("Builtin MPM \"%s\": %u", builtin_mpms[x], stats[x]);
}
const DetectBufferMpmRegistery *am = de_ctx->app_mpms_list;
const DetectBufferMpmRegistry *am = de_ctx->app_mpms_list;
while (am != NULL) {
if (appstats[am->sm_list] > 0) {
const char *name = am->name;
@ -1495,7 +1490,7 @@ void MpmStoreReportStats(const DetectEngineCtx *de_ctx)
}
am = am->next;
}
const DetectBufferMpmRegistery *pm = de_ctx->pkt_mpms_list;
const DetectBufferMpmRegistry *pm = de_ctx->pkt_mpms_list;
while (pm != NULL) {
if (pktstats[pm->sm_list] > 0) {
const char *name = pm->name;
@ -1503,7 +1498,7 @@ void MpmStoreReportStats(const DetectEngineCtx *de_ctx)
}
pm = pm->next;
}
const DetectBufferMpmRegistery *um = de_ctx->frame_mpms_list;
const DetectBufferMpmRegistry *um = de_ctx->frame_mpms_list;
while (um != NULL) {
if (framestats[um->sm_list] > 0) {
const char *name = um->name;
@ -1773,7 +1768,7 @@ struct SidsArray {
};
static MpmStore *MpmStorePrepareBufferAppLayer(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
const DetectBufferMpmRegistery *am, const struct SidsArray *sa)
const DetectBufferMpmRegistry *am, const struct SidsArray *sa)
{
if (sa->sids_array_size == 0 || sa->sids_array == NULL)
return NULL;
@ -1821,7 +1816,7 @@ static MpmStore *MpmStorePrepareBufferAppLayer(DetectEngineCtx *de_ctx, SigGroup
}
static MpmStore *MpmStorePrepareBufferPkt(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
const DetectBufferMpmRegistery *am, const struct SidsArray *sa)
const DetectBufferMpmRegistry *am, const struct SidsArray *sa)
{
SCLogDebug("handling %s for list %d", am->name,
am->sm_list);
@ -1865,7 +1860,7 @@ static MpmStore *MpmStorePrepareBufferPkt(DetectEngineCtx *de_ctx, SigGroupHead
}
static MpmStore *MpmStorePrepareBufferFrame(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
const DetectBufferMpmRegistery *am, const struct SidsArray *sa)
const DetectBufferMpmRegistry *am, const struct SidsArray *sa)
{
SCLogDebug("handling %s for list %d", am->name, am->sm_list);
@ -1982,7 +1977,7 @@ static void PrepareMpms(DetectEngineCtx *de_ctx, SigGroupHead *sh)
memset(types, 0, sizeof(types));
/* flag the list+directions we have engines for as active */
for (DetectBufferMpmRegistery *a = de_ctx->pkt_mpms_list; a != NULL; a = a->next) {
for (DetectBufferMpmRegistry *a = de_ctx->pkt_mpms_list; a != NULL; a = a->next) {
types[a->sm_list] = a->type;
DetectBufferInstance lookup = { .list = a->sm_list, .alproto = ALPROTO_UNKNOWN };
@ -1997,7 +1992,7 @@ static void PrepareMpms(DetectEngineCtx *de_ctx, SigGroupHead *sh)
instance->ts.active = true;
instance->tc.active = true;
}
for (DetectBufferMpmRegistery *a = de_ctx->frame_mpms_list; a != NULL; a = a->next) {
for (DetectBufferMpmRegistry *a = de_ctx->frame_mpms_list; a != NULL; a = a->next) {
const bool add_ts = ((a->direction == SIG_FLAG_TOSERVER) && SGH_DIRECTION_TS(sh));
const bool add_tc = ((a->direction == SIG_FLAG_TOCLIENT) && SGH_DIRECTION_TC(sh));
if (add_ts || add_tc) {
@ -2017,7 +2012,7 @@ static void PrepareMpms(DetectEngineCtx *de_ctx, SigGroupHead *sh)
instance->tc.active |= add_tc;
}
}
for (DetectBufferMpmRegistery *a = de_ctx->app_mpms_list; a != NULL; a = a->next) {
for (DetectBufferMpmRegistry *a = de_ctx->app_mpms_list; a != NULL; a = a->next) {
const bool add_ts = ((a->direction == SIG_FLAG_TOSERVER) && SGH_DIRECTION_TS(sh));
const bool add_tc = ((a->direction == SIG_FLAG_TOCLIENT) && SGH_DIRECTION_TC(sh));
if (add_ts || add_tc) {
@ -2122,7 +2117,7 @@ static void PrepareMpms(DetectEngineCtx *de_ctx, SigGroupHead *sh)
sh->init->frame_mpms = SCCalloc(de_ctx->frame_mpms_list_cnt, sizeof(MpmCtx *));
BUG_ON(sh->init->frame_mpms == NULL);
for (DetectBufferMpmRegistery *a = de_ctx->pkt_mpms_list; a != NULL; a = a->next) {
for (DetectBufferMpmRegistry *a = de_ctx->pkt_mpms_list; a != NULL; a = a->next) {
DetectBufferInstance lookup = { .list = a->sm_list, .alproto = ALPROTO_UNKNOWN };
DetectBufferInstance *instance = HashListTableLookup(bufs, &lookup, 0);
if (instance == NULL) {
@ -2150,7 +2145,7 @@ static void PrepareMpms(DetectEngineCtx *de_ctx, SigGroupHead *sh)
}
}
}
for (DetectBufferMpmRegistery *a = de_ctx->frame_mpms_list; a != NULL; a = a->next) {
for (DetectBufferMpmRegistry *a = de_ctx->frame_mpms_list; a != NULL; a = a->next) {
if ((a->direction == SIG_FLAG_TOSERVER && SGH_DIRECTION_TS(sh)) ||
(a->direction == SIG_FLAG_TOCLIENT && SGH_DIRECTION_TC(sh))) {
DetectBufferInstance lookup = { .list = a->sm_list, .alproto = a->frame_v1.alproto };
@ -2184,7 +2179,7 @@ static void PrepareMpms(DetectEngineCtx *de_ctx, SigGroupHead *sh)
}
}
}
for (DetectBufferMpmRegistery *a = de_ctx->app_mpms_list; a != NULL; a = a->next) {
for (DetectBufferMpmRegistry *a = de_ctx->app_mpms_list; a != NULL; a = a->next) {
if ((a->direction == SIG_FLAG_TOSERVER && SGH_DIRECTION_TS(sh)) ||
(a->direction == SIG_FLAG_TOCLIENT && SGH_DIRECTION_TC(sh))) {

@ -88,23 +88,18 @@ int DetectSetFastPatternAndItsId(DetectEngineCtx *de_ctx);
* \note direction must be set to either toserver or toclient.
* If both are needed, register the keyword twice.
*/
void DetectAppLayerMpmRegister2(const char *name,
int direction, int priority,
int (*PrefilterRegister)(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id),
InspectionBufferGetDataPtr GetData,
AppProto alproto, int tx_min_progress);
void DetectAppLayerMpmRegister2(const char *name, int direction, int priority,
int (*PrefilterRegister)(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistry *mpm_reg, int list_id),
InspectionBufferGetDataPtr GetData, AppProto alproto, int tx_min_progress);
void DetectAppLayerMpmRegisterByParentId(
DetectEngineCtx *de_ctx,
const int id, const int parent_id,
DetectEngineTransforms *transforms);
void DetectPktMpmRegister(const char *name,
int priority,
int (*PrefilterRegister)(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id),
void DetectPktMpmRegister(const char *name, int priority,
int (*PrefilterRegister)(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistry *mpm_reg, int list_id),
InspectionBufferGetPktDataPtr GetData);
void DetectPktMpmRegisterByParentId(DetectEngineCtx *de_ctx,
const int id, const int parent_id,
@ -112,22 +107,21 @@ void DetectPktMpmRegisterByParentId(DetectEngineCtx *de_ctx,
void DetectFrameMpmRegister(const char *name, int direction, int priority,
int (*PrefilterRegister)(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id),
const DetectBufferMpmRegistry *mpm_reg, int list_id),
AppProto alproto, uint8_t type);
void DetectFrameMpmRegisterByParentId(DetectEngineCtx *de_ctx, const int id, const int parent_id,
DetectEngineTransforms *transforms);
void DetectEngineFrameMpmRegister(DetectEngineCtx *de_ctx, const char *name, int direction,
int priority,
int (*PrefilterRegister)(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id),
const DetectBufferMpmRegistry *mpm_reg, int list_id),
AppProto alproto, uint8_t type);
int PrefilterGenericMpmPktRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id);
int PrefilterGenericMpmPktRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistry *mpm_reg, int list_id);
int PrefilterGenericMpmFrameRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id);
const DetectBufferMpmRegistry *mpm_reg, int list_id);
typedef struct PrefilterMpmListId {
int list_id;

@ -742,9 +742,8 @@ static void PrefilterGenericMpmFree(void *ptr)
SCFree(ptr);
}
int PrefilterGenericMpmRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
int PrefilterGenericMpmRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
SCEnter();
PrefilterMpmCtx *pectx = SCCalloc(1, sizeof(*pectx));
@ -813,9 +812,8 @@ static void PrefilterMpmPktFree(void *ptr)
SCFree(ptr);
}
int PrefilterGenericMpmPktRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
int PrefilterGenericMpmPktRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
SCEnter();
PrefilterMpmPktCtx *pectx = SCCalloc(1, sizeof(*pectx));

@ -86,13 +86,10 @@ const char *PrefilterStoreGetName(const uint32_t id);
void PrefilterInit(DetectEngineCtx *de_ctx);
void PrefilterDeinit(DetectEngineCtx *de_ctx);
int PrefilterGenericMpmRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id);
int PrefilterGenericMpmPktRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id);
int PrefilterGenericMpmRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistry *mpm_reg, int list_id);
int PrefilterGenericMpmPktRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistry *mpm_reg, int list_id);
#endif

@ -1793,9 +1793,9 @@ static void DetectBufferTypeFreeDetectEngine(DetectEngineCtx *de_ctx)
SCFree(ilist);
ilist = next;
}
DetectBufferMpmRegistery *mlist = de_ctx->app_mpms_list;
DetectBufferMpmRegistry *mlist = de_ctx->app_mpms_list;
while (mlist) {
DetectBufferMpmRegistery *next = mlist->next;
DetectBufferMpmRegistry *next = mlist->next;
SCFree(mlist);
mlist = next;
}
@ -1805,9 +1805,9 @@ static void DetectBufferTypeFreeDetectEngine(DetectEngineCtx *de_ctx)
SCFree(plist);
plist = next;
}
DetectBufferMpmRegistery *pmlist = de_ctx->pkt_mpms_list;
DetectBufferMpmRegistry *pmlist = de_ctx->pkt_mpms_list;
while (pmlist) {
DetectBufferMpmRegistery *next = pmlist->next;
DetectBufferMpmRegistry *next = pmlist->next;
SCFree(pmlist);
pmlist = next;
}
@ -1817,9 +1817,9 @@ static void DetectBufferTypeFreeDetectEngine(DetectEngineCtx *de_ctx)
SCFree(framelist);
framelist = next;
}
DetectBufferMpmRegistery *framemlist = de_ctx->frame_mpms_list;
DetectBufferMpmRegistry *framemlist = de_ctx->frame_mpms_list;
while (framemlist) {
DetectBufferMpmRegistery *next = framemlist->next;
DetectBufferMpmRegistry *next = framemlist->next;
SCFree(framemlist);
framemlist = next;
}

@ -63,15 +63,14 @@ static inline HtpBody *GetResponseBody(htp_tx_t *tx);
/* HTTP */
static int PrefilterMpmHTTPFiledataRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistery *mpm_reg, int list_id);
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id);
/* file API */
static uint8_t DetectEngineInspectFiledata(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
const DetectEngineAppInspectionEngine *engine, const Signature *s, Flow *f, uint8_t flags,
void *alstate, void *txv, uint64_t tx_id);
int PrefilterMpmFiledataRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id);
int PrefilterMpmFiledataRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistry *mpm_reg, int list_id);
static uint8_t DetectEngineInspectBufferHttpBody(DetectEngineCtx *de_ctx,
DetectEngineThreadCtx *det_ctx, const DetectEngineAppInspectionEngine *engine,
@ -467,7 +466,7 @@ static void PrefilterTxHTTPFiledata(DetectEngineThreadCtx *det_ctx, const void *
}
static int PrefilterMpmHTTPFiledataRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistery *mpm_reg, int list_id)
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
PrefilterMpmFiledata *pectx = SCCalloc(1, sizeof(*pectx));
if (pectx == NULL)
@ -685,9 +684,8 @@ static void PrefilterTxFiledata(DetectEngineThreadCtx *det_ctx, const void *pect
}
}
int PrefilterMpmFiledataRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
int PrefilterMpmFiledataRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
PrefilterMpmFiledata *pectx = SCCalloc(1, sizeof(*pectx));
if (pectx == NULL)

@ -102,9 +102,8 @@ static int g_file_match_list_id = 0;
static int DetectFilemagicSetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str);
static int g_file_magic_buffer_id = 0;
static int PrefilterMpmFilemagicRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id);
static int PrefilterMpmFilemagicRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id);
static uint8_t DetectEngineInspectFilemagic(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
const DetectEngineAppInspectionEngine *engine, const Signature *s, Flow *f, uint8_t flags,
void *alstate, void *txv, uint64_t tx_id);
@ -570,9 +569,8 @@ static void PrefilterMpmFilemagicFree(void *ptr)
SCFree(ptr);
}
static int PrefilterMpmFilemagicRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
static int PrefilterMpmFilemagicRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
PrefilterMpmFilemagic *pectx = SCCalloc(1, sizeof(*pectx));
if (pectx == NULL)

@ -74,9 +74,8 @@ static void DetectFilenameFree(DetectEngineCtx *, void *);
static int g_file_match_list_id = 0;
static int g_file_name_buffer_id = 0;
static int PrefilterMpmFilenameRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id);
static int PrefilterMpmFilenameRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistry *mpm_reg, int list_id);
static uint8_t DetectEngineInspectFilename(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
const DetectEngineAppInspectionEngine *engine, const Signature *s, Flow *f, uint8_t flags,
void *alstate, void *txv, uint64_t tx_id);
@ -465,9 +464,8 @@ static void PrefilterMpmFilenameFree(void *ptr)
SCFree(ptr);
}
static int PrefilterMpmFilenameRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
static int PrefilterMpmFilenameRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
PrefilterMpmFilename *pectx = SCCalloc(1, sizeof(*pectx));
if (pectx == NULL)

@ -74,7 +74,7 @@ static uint8_t DetectEngineInspectBufferHttpBody(DetectEngineCtx *de_ctx,
const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id);
static int PrefilterMpmHttpRequestBodyRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistery *mpm_reg, int list_id);
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id);
/**
* \brief Registers the keyword handlers for the "http_client_body" keyword.
@ -372,7 +372,7 @@ static void PrefilterTxHttpRequestBody(DetectEngineThreadCtx *det_ctx, const voi
}
static int PrefilterMpmHttpRequestBodyRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistery *mpm_reg, int list_id)
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
PrefilterMpmHttpRequestBody *pectx = SCCalloc(1, sizeof(*pectx));
if (pectx == NULL)

@ -296,9 +296,8 @@ static void PrefilterMpmHttpHeaderFree(void *ptr)
SCFree(ptr);
}
static int PrefilterMpmHttpHeaderRequestRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
static int PrefilterMpmHttpHeaderRequestRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
SCEnter();
@ -335,9 +334,8 @@ static int PrefilterMpmHttpHeaderRequestRegister(DetectEngineCtx *de_ctx,
return r;
}
static int PrefilterMpmHttpHeaderResponseRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
static int PrefilterMpmHttpHeaderResponseRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
SCEnter();

@ -67,12 +67,10 @@ static InspectionBuffer *GetData2(DetectEngineThreadCtx *det_ctx,
const DetectEngineTransforms *transforms, Flow *_f, const uint8_t flow_flags, void *txv,
const int list_id);
static int PrefilterMpmHttpHeaderRawRequestRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id);
static int PrefilterMpmHttpHeaderRawResponseRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id);
static int PrefilterMpmHttpHeaderRawRequestRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id);
static int PrefilterMpmHttpHeaderRawResponseRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id);
/**
* \brief Registers the keyword handlers for the "http_raw_header" keyword.
@ -292,9 +290,8 @@ static void PrefilterMpmHttpHeaderRawFree(void *ptr)
SCFree(ptr);
}
static int PrefilterMpmHttpHeaderRawRequestRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
static int PrefilterMpmHttpHeaderRawRequestRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
SCEnter();
@ -331,9 +328,8 @@ static int PrefilterMpmHttpHeaderRawRequestRegister(DetectEngineCtx *de_ctx,
return r;
}
static int PrefilterMpmHttpHeaderRawResponseRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
static int PrefilterMpmHttpHeaderRawResponseRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
SCEnter();

@ -86,17 +86,15 @@ static int DetectHTTP2settingsSetup (DetectEngineCtx *, Signature *, const char
void DetectHTTP2settingsFree (DetectEngineCtx *, void *);
static int DetectHTTP2headerNameSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg);
static int PrefilterMpmHttp2HeaderNameRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id);
static int PrefilterMpmHttp2HeaderNameRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id);
static uint8_t DetectEngineInspectHttp2HeaderName(DetectEngineCtx *de_ctx,
DetectEngineThreadCtx *det_ctx, const DetectEngineAppInspectionEngine *engine,
const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id);
static int DetectHTTP2headerSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg);
static int PrefilterMpmHttp2HeaderRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id);
static int PrefilterMpmHttp2HeaderRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id);
static uint8_t DetectEngineInspectHttp2Header(DetectEngineCtx *de_ctx,
DetectEngineThreadCtx *det_ctx, const DetectEngineAppInspectionEngine *engine,
const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id);
@ -734,9 +732,8 @@ static void PrefilterTxHttp2HName(DetectEngineThreadCtx *det_ctx, const void *pe
}
}
static int PrefilterMpmHttp2HeaderNameRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
static int PrefilterMpmHttp2HeaderNameRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
//TODOask use PrefilterMpmListId elsewhere
PrefilterMpmListId *pectx = SCCalloc(1, sizeof(*pectx));
@ -867,9 +864,8 @@ static void PrefilterTxHttp2Header(DetectEngineThreadCtx *det_ctx, const void *p
}
}
static int PrefilterMpmHttp2HeaderRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
static int PrefilterMpmHttp2HeaderRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
PrefilterMpmListId *pectx = SCCalloc(1, sizeof(*pectx));
if (pectx == NULL)

@ -121,7 +121,7 @@ static void PrefilterMpmIkeVendorFree(void *ptr)
}
static int PrefilterMpmIkeVendorRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistery *mpm_reg, int list_id)
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
PrefilterMpmIkeVendor *pectx = SCCalloc(1, sizeof(*pectx));
if (pectx == NULL)

@ -172,9 +172,8 @@ static void PrefilterMpmKrb5NameFree(void *ptr)
SCFree(ptr);
}
static int PrefilterMpmKrb5CNameRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
static int PrefilterMpmKrb5CNameRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
PrefilterMpmKrb5Name *pectx = SCCalloc(1, sizeof(*pectx));
if (pectx == NULL)

@ -172,9 +172,8 @@ static void PrefilterMpmKrb5NameFree(void *ptr)
SCFree(ptr);
}
static int PrefilterMpmKrb5SNameRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
static int PrefilterMpmKrb5SNameRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
PrefilterMpmKrb5Name *pectx = SCCalloc(1, sizeof(*pectx));
if (pectx == NULL)

@ -173,9 +173,8 @@ static void PrefilterMpmMQTTSubscribeTopicFree(void *ptr)
SCFree(ptr);
}
static int PrefilterMpmMQTTSubscribeTopicRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
static int PrefilterMpmMQTTSubscribeTopicRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
PrefilterMpmMQTTSubscribeTopic *pectx = SCCalloc(1, sizeof(*pectx));
if (pectx == NULL)

@ -173,9 +173,8 @@ static void PrefilterMpmMQTTUnsubscribeTopicFree(void *ptr)
SCFree(ptr);
}
static int PrefilterMpmMQTTUnsubscribeTopicRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
static int PrefilterMpmMQTTUnsubscribeTopicRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
PrefilterMpmMQTTUnsubscribeTopic *pectx = SCCalloc(1, sizeof(*pectx));
if (pectx == NULL)

@ -169,7 +169,7 @@ static void PrefilterMpmQuicHashFree(void *ptr)
}
static int PrefilterMpmQuicHashRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
PrefilterMpmQuicHash *pectx = SCCalloc(1, sizeof(*pectx));
if (pectx == NULL)

@ -161,7 +161,7 @@ static void PrefilterMpmListIdFree(void *ptr)
}
static int PrefilterMpmListIdRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
PrefilterMpmListId *pectx = SCCalloc(1, sizeof(*pectx));
if (pectx == NULL)

@ -62,9 +62,8 @@ static void DetectTlsCertsRegisterTests(void);
static uint8_t DetectEngineInspectTlsCerts(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
const DetectEngineAppInspectionEngine *engine, const Signature *s, Flow *f, uint8_t flags,
void *alstate, void *txv, uint64_t tx_id);
static int PrefilterMpmTlsCertsRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id);
static int PrefilterMpmTlsCertsRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistry *mpm_reg, int list_id);
static int g_tls_certs_buffer_id = 0;
@ -248,9 +247,8 @@ static void PrefilterMpmTlsCertsFree(void *ptr)
SCFree(ptr);
}
static int PrefilterMpmTlsCertsRegister(DetectEngineCtx *de_ctx,
SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistery *mpm_reg, int list_id)
static int PrefilterMpmTlsCertsRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistry *mpm_reg, int list_id)
{
PrefilterMpmTlsCerts *pectx = SCCalloc(1, sizeof(*pectx));
if (pectx == NULL)

@ -640,7 +640,7 @@ enum DetectBufferMpmType {
};
/** \brief one time registration of keywords at start up */
typedef struct DetectBufferMpmRegistery_ {
typedef struct DetectBufferMpmRegistry_ {
const char *name;
char pname[32]; /**< name used in profiling */
int direction; /**< SIG_FLAG_TOSERVER or SIG_FLAG_TOCLIENT */
@ -651,9 +651,8 @@ typedef struct DetectBufferMpmRegistery_ {
enum DetectBufferMpmType type;
int sgh_mpm_context;
int (*PrefilterRegisterWithListId)(struct DetectEngineCtx_ *de_ctx,
struct SigGroupHead_ *sgh, MpmCtx *mpm_ctx,
const struct DetectBufferMpmRegistery_ *mpm_reg, int list_id);
int (*PrefilterRegisterWithListId)(struct DetectEngineCtx_ *de_ctx, struct SigGroupHead_ *sgh,
MpmCtx *mpm_ctx, const struct DetectBufferMpmRegistry_ *mpm_reg, int list_id);
DetectEngineTransforms transforms;
union {
@ -668,7 +667,7 @@ typedef struct DetectBufferMpmRegistery_ {
struct {
int (*PrefilterRegisterWithListId)(struct DetectEngineCtx_ *de_ctx,
struct SigGroupHead_ *sgh, MpmCtx *mpm_ctx,
const struct DetectBufferMpmRegistery_ *mpm_reg, int list_id);
const struct DetectBufferMpmRegistry_ *mpm_reg, int list_id);
InspectionBufferGetPktDataPtr GetData;
} pkt_v1;
@ -679,8 +678,8 @@ typedef struct DetectBufferMpmRegistery_ {
} frame_v1;
};
struct DetectBufferMpmRegistery_ *next;
} DetectBufferMpmRegistery;
struct DetectBufferMpmRegistry_ *next;
} DetectBufferMpmRegistry;
/* helper structure to track pattern stats and assign pattern id's. */
typedef struct DetectPatternTracker {
@ -954,15 +953,15 @@ typedef struct DetectEngineCtx_ {
uint32_t buffer_type_id;
uint32_t app_mpms_list_cnt;
DetectBufferMpmRegistery *app_mpms_list;
DetectBufferMpmRegistry *app_mpms_list;
/* list with app inspect engines. Both the start-time registered ones and
* the rule-time registered ones. */
DetectEngineAppInspectionEngine *app_inspect_engines;
DetectEnginePktInspectionEngine *pkt_inspect_engines;
DetectBufferMpmRegistery *pkt_mpms_list;
DetectBufferMpmRegistry *pkt_mpms_list;
uint32_t pkt_mpms_list_cnt;
DetectEngineFrameInspectionEngine *frame_inspect_engines;
DetectBufferMpmRegistery *frame_mpms_list;
DetectBufferMpmRegistry *frame_mpms_list;
uint32_t frame_mpms_list_cnt;
uint32_t prefilter_id;

Loading…
Cancel
Save