for (j = 0; j < 2; j++) {
mpm_ctx = &alpd_ctx.ctx_ipp[i].ctx_pm[j].mpm_ctx;
mpm_tctx = &alpd_tctx->mpm_tctx[i][j];
- mpm_table[mpm_ctx->mpm_type].InitThreadCtx(mpm_ctx, mpm_tctx, 0);
+ mpm_table[mpm_ctx->mpm_type].InitThreadCtx(mpm_ctx, mpm_tctx);
}
}
exit(EXIT_FAILURE);
}
memset(smtp_mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
- MpmInitThreadCtx(smtp_mpm_thread_ctx, SMTP_MPM, 0);
+ MpmInitThreadCtx(smtp_mpm_thread_ctx, SMTP_MPM);
uint32_t i = 0;
for (i = 0; i < sizeof(smtp_reply_map)/sizeof(SCEnumCharMap) - 1; i++) {
if (mpm_table[mpm_matcher].DestroyThreadCtx != NULL)
mpm_table[mpm_matcher].DestroyThreadCtx(NULL, mpm_thread_ctx);
}
-void PatternMatchThreadPrepare(MpmThreadCtx *mpm_thread_ctx, uint16_t mpm_matcher, uint32_t max_id)
+void PatternMatchThreadPrepare(MpmThreadCtx *mpm_thread_ctx, uint16_t mpm_matcher)
{
- SCLogDebug("mpm_thread_ctx %p, type %"PRIu16", max_id %"PRIu32"", mpm_thread_ctx, mpm_matcher, max_id);
- MpmInitThreadCtx(mpm_thread_ctx, mpm_matcher, max_id);
+ SCLogDebug("mpm_thread_ctx %p, type %"PRIu16, mpm_thread_ctx, mpm_matcher);
+ MpmInitThreadCtx(mpm_thread_ctx, mpm_matcher);
}
void StreamPatternCleanup(ThreadVars *t, DetectEngineThreadCtx *det_ctx, StreamMsg *smsg);
void PatternMatchPrepare(MpmCtx *, uint16_t);
-void PatternMatchThreadPrepare(MpmThreadCtx *, uint16_t type, uint32_t max_id);
+void PatternMatchThreadPrepare(MpmThreadCtx *, uint16_t type);
void PatternMatchDestroy(MpmCtx *, uint16_t);
void PatternMatchThreadDestroy(MpmThreadCtx *mpm_thread_ctx, uint16_t);
{
int i;
- /** \todo we still depend on the global mpm_ctx here
- *
- * Initialize the thread pattern match ctx with the max size
- * of the content and uricontent id's so our match lookup
- * table is always big enough
- */
- PatternMatchThreadPrepare(&det_ctx->mtc, de_ctx->mpm_matcher, DetectContentMaxId(de_ctx));
- PatternMatchThreadPrepare(&det_ctx->mtcs, de_ctx->mpm_matcher, DetectContentMaxId(de_ctx));
- PatternMatchThreadPrepare(&det_ctx->mtcu, de_ctx->mpm_matcher, DetectUricontentMaxId(de_ctx));
+ PatternMatchThreadPrepare(&det_ctx->mtc, de_ctx->mpm_matcher);
+ PatternMatchThreadPrepare(&det_ctx->mtcs, de_ctx->mpm_matcher);
+ PatternMatchThreadPrepare(&det_ctx->mtcu, de_ctx->mpm_matcher);
PmqSetup(&det_ctx->pmq, de_ctx->max_fp_id);
for (i = 0; i < DETECT_SMSG_PMQ_NUM; i++) {
#include "util-memcpy.h"
void SCACBSInitCtx(MpmCtx *);
-void SCACBSInitThreadCtx(MpmCtx *, MpmThreadCtx *, uint32_t);
+void SCACBSInitThreadCtx(MpmCtx *, MpmThreadCtx *);
void SCACBSDestroyCtx(MpmCtx *);
void SCACBSDestroyThreadCtx(MpmCtx *, MpmThreadCtx *);
int SCACBSAddPatternCI(MpmCtx *, uint8_t *, uint16_t, uint16_t, uint16_t,
* \param mpm_thread_ctx Pointer to the mpm thread context.
* \param matchsize We don't need this.
*/
-void SCACBSInitThreadCtx(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx, uint32_t matchsize)
+void SCACBSInitThreadCtx(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx)
{
memset(mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcd", 4, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abce", 4, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcd", 4, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcd", 4, 0, 0, 0, 0, 0);
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"bcdegh", 6, 0, 0, 1, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
MpmAddPatternCI(&mpm_ctx, (uint8_t *)"ABCD", 4, 0, 0, 0, 0, 0);
MpmAddPatternCI(&mpm_ctx, (uint8_t *)"bCdEfG", 6, 0, 0, 1, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcd", 4, 0, 0, 0, 0, 0);
PmqSetup(&pmq, 1);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* should match 30 times */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"A", 1, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcd", 4, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"ab", 2, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcdefgh", 8, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
if (MpmAddPatternCS(&mpm_ctx, (uint8_t *)"he", 2, 0, 0, 1, 0, 0) == -1)
goto end;
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"wxyz", 4, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
char *pat = "abcdefghijklmnopqrstuvwxyzABCD";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
char *pat = "abcdefghijklmnopqrstuvwxyzABCDE";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
char *pat = "abcdefghijklmnopqrstuvwxyzABCDEF";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
char *pat = "abcdefghijklmnopqrstuvwxyzABC";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
char *pat = "abcdefghijklmnopqrstuvwxyzAB";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
char *pat = "abcde""fghij""klmno""pqrst""uvwxy""z";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 */
char *pat = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 */
char *pat = "AAAAA""AAAAA""AAAAA""AAAAA""AAAAA""AAAAA""AA";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"AA", 2, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcd", 4, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"AA", 2, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 */
MpmAddPatternCI(&mpm_ctx, (uint8_t *)"AA", 2, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
MpmAddPatternCI(&mpm_ctx, (uint8_t *)"ABCD", 4, 0, 0, 0, 0, 0);
MpmAddPatternCI(&mpm_ctx, (uint8_t *)"bCdEfG", 6, 0, 0, 1, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
MpmAddPatternCI(&mpm_ctx, (uint8_t *)"Works", 5, 0, 0, 0, 0, 0);
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"Works", 5, 0, 0, 1, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 0 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"ONE", 3, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 0 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"one", 3, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_BS);
- SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACBSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcde", 5, 0, 0, 0, 0, 0);
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"bcdef", 5, 0, 0, 1, 0, 0);
#include "util-mpm-ac-tile.h"
void SCACTileInitCtx(MpmCtx *);
-void SCACTileInitThreadCtx(MpmCtx *, MpmThreadCtx *, uint32_t);
+void SCACTileInitThreadCtx(MpmCtx *, MpmThreadCtx *);
void SCACTileDestroyCtx(MpmCtx *);
void SCACTileDestroyThreadCtx(MpmCtx *, MpmThreadCtx *);
int SCACTileAddPatternCI(MpmCtx *, uint8_t *, uint16_t, uint16_t, uint16_t,
*
* \param mpm_ctx Pointer to the mpm context.
* \param mpm_thread_ctx Pointer to the mpm thread context.
- * \param matchsize We don't need this.
*/
-void SCACTileInitThreadCtx(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx,
- uint32_t matchsize)
+void SCACTileInitThreadCtx(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx)
{
memset(mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcd", 4, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abce", 4, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcd", 4, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcd", 4, 0, 0, 0, 0, 0);
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"bcdegh", 6, 0, 0, 1, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
MpmAddPatternCI(&mpm_ctx, (uint8_t *)"ABCD", 4, 0, 0, 0, 0, 0);
MpmAddPatternCI(&mpm_ctx, (uint8_t *)"bCdEfG", 6, 0, 0, 1, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcd", 4, 0, 0, 0, 0, 0);
PmqSetup(&pmq, 1);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* should match 30 times */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"A", 1, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcd", 4, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"ab", 2, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcdefgh", 8, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
if (MpmAddPatternCS(&mpm_ctx, (uint8_t *)"he", 2, 0, 0, 1, 0, 0) == -1)
goto end;
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"wxyz", 4, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
char *pat = "abcdefghijklmnopqrstuvwxyzABCD";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
char *pat = "abcdefghijklmnopqrstuvwxyzABCDE";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
char *pat = "abcdefghijklmnopqrstuvwxyzABCDEF";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
char *pat = "abcdefghijklmnopqrstuvwxyzABC";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
char *pat = "abcdefghijklmnopqrstuvwxyzAB";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
char *pat = "abcde""fghij""klmno""pqrst""uvwxy""z";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 */
char *pat = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 */
char *pat = "AAAAA""AAAAA""AAAAA""AAAAA""AAAAA""AAAAA""AA";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"AA", 2, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcd", 4, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"AA", 2, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 */
MpmAddPatternCI(&mpm_ctx, (uint8_t *)"AA", 2, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
MpmAddPatternCI(&mpm_ctx, (uint8_t *)"ABCD", 4, 0, 0, 0, 0, 0);
MpmAddPatternCI(&mpm_ctx, (uint8_t *)"bCdEfG", 6, 0, 0, 1, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
MpmAddPatternCI(&mpm_ctx, (uint8_t *)"Works", 5, 0, 0, 0, 0, 0);
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"Works", 5, 0, 0, 1, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 0 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"ONE", 3, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC_TILE);
- SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACTileInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 0 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"one", 3, 0, 0, 0, 0, 0);
#endif /* __SC_CUDA_SUPPORT__ */
void SCACInitCtx(MpmCtx *);
-void SCACInitThreadCtx(MpmCtx *, MpmThreadCtx *, uint32_t);
+void SCACInitThreadCtx(MpmCtx *, MpmThreadCtx *);
void SCACDestroyCtx(MpmCtx *);
void SCACDestroyThreadCtx(MpmCtx *, MpmThreadCtx *);
int SCACAddPatternCI(MpmCtx *, uint8_t *, uint16_t, uint16_t, uint16_t,
* \param mpm_thread_ctx Pointer to the mpm thread context.
* \param matchsize We don't need this.
*/
-void SCACInitThreadCtx(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx, uint32_t matchsize)
+void SCACInitThreadCtx(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx)
{
memset(mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcd", 4, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abce", 4, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcd", 4, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcd", 4, 0, 0, 0, 0, 0);
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"bcdegh", 6, 0, 0, 1, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
MpmAddPatternCI(&mpm_ctx, (uint8_t *)"ABCD", 4, 0, 0, 0, 0, 0);
MpmAddPatternCI(&mpm_ctx, (uint8_t *)"bCdEfG", 6, 0, 0, 1, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcd", 4, 0, 0, 0, 0, 0);
PmqSetup(&pmq, 1);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* should match 30 times */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"A", 1, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcd", 4, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"ab", 2, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcdefgh", 8, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
if (MpmAddPatternCS(&mpm_ctx, (uint8_t *)"he", 2, 0, 0, 1, 0, 0) == -1)
goto end;
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"wxyz", 4, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
char *pat = "abcdefghijklmnopqrstuvwxyzABCD";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
char *pat = "abcdefghijklmnopqrstuvwxyzABCDE";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
char *pat = "abcdefghijklmnopqrstuvwxyzABCDEF";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
char *pat = "abcdefghijklmnopqrstuvwxyzABC";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
char *pat = "abcdefghijklmnopqrstuvwxyzAB";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
char *pat = "abcde""fghij""klmno""pqrst""uvwxy""z";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 */
char *pat = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 */
char *pat = "AAAAA""AAAAA""AAAAA""AAAAA""AAAAA""AAAAA""AA";
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"AA", 2, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"abcd", 4, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"AA", 2, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 1 */
MpmAddPatternCI(&mpm_ctx, (uint8_t *)"AA", 2, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
MpmAddPatternCI(&mpm_ctx, (uint8_t *)"ABCD", 4, 0, 0, 0, 0, 0);
MpmAddPatternCI(&mpm_ctx, (uint8_t *)"bCdEfG", 6, 0, 0, 1, 0, 0);
memset(&mpm_ctx, 0x00, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
MpmAddPatternCI(&mpm_ctx, (uint8_t *)"Works", 5, 0, 0, 0, 0, 0);
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"Works", 5, 0, 0, 1, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 0 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"ONE", 3, 0, 0, 0, 0, 0);
memset(&mpm_ctx, 0, sizeof(MpmCtx));
memset(&mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
MpmInitCtx(&mpm_ctx, MPM_AC);
- SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCACInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
/* 0 match */
MpmAddPatternCS(&mpm_ctx, (uint8_t *)"one", 3, 0, 0, 0, 0, 0);
#include <hs.h>
void SCHSInitCtx(MpmCtx *);
-void SCHSInitThreadCtx(MpmCtx *, MpmThreadCtx *, uint32_t);
+void SCHSInitThreadCtx(MpmCtx *, MpmThreadCtx *);
void SCHSDestroyCtx(MpmCtx *);
void SCHSDestroyThreadCtx(MpmCtx *, MpmThreadCtx *);
int SCHSAddPatternCI(MpmCtx *, uint8_t *, uint16_t, uint16_t, uint16_t,
*
* \param mpm_ctx Pointer to the mpm context.
* \param mpm_thread_ctx Pointer to the mpm thread context.
- * \param matchsize We don't need this.
*/
-void SCHSInitThreadCtx(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx,
- uint32_t matchsize)
+void SCHSInitThreadCtx(MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx)
{
memset(mpm_thread_ctx, 0, sizeof(MpmThreadCtx));
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "abcdefghjiklmnopqrstuvwxyz";
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "abcdefghjiklmnopqrstuvwxyz";
uint32_t cnt = SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)buf,
PmqSetup(&pmq, 3);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "abcdefghjiklmnopqrstuvwxyz";
uint32_t cnt = SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)buf,
PmqSetup(&pmq, 3);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "abcdefghjiklmnopqrstuvwxyz";
uint32_t cnt = SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)buf,
PmqSetup(&pmq, 3);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "abcdefghjiklmnopqrstuvwxyz";
uint32_t cnt = SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)buf,
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "abcd";
uint32_t cnt = SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)buf,
PmqSetup(&pmq, 6);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
uint32_t cnt = SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)buf,
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
uint32_t cnt =
SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)"a", 1);
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
uint32_t cnt =
SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)"ab", 2);
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "01234567890123456789012345678901234567890123456789"
"01234567890123456789012345678901234567890123456789"
if (SCHSPreparePatterns(&mpm_ctx) == -1)
goto end;
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
result = 1;
PmqSetup(&pmq, 2);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "abcdefghijklmnopqrstuvwxyz";
uint32_t cnt = SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)buf,
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "abcdefghijklmnopqrstuvwxyzABCD";
uint32_t cnt = SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)buf,
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "abcdefghijklmnopqrstuvwxyzABCDE";
uint32_t cnt = SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)buf,
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "abcdefghijklmnopqrstuvwxyzABCDEF";
uint32_t cnt = SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)buf,
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "abcdefghijklmnopqrstuvwxyzABC";
uint32_t cnt = SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)buf,
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "abcdefghijklmnopqrstuvwxyzAB";
uint32_t cnt = SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)buf,
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "abcde"
"fghij"
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
uint32_t cnt = SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)buf,
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "AAAAA"
"AAAAA"
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
uint32_t cnt =
SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)"AA", 2);
PmqSetup(&pmq, 2);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "abcdefghijklmnopqrstuvwxyz";
uint32_t cnt = SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)buf,
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
uint32_t cnt =
SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)"aa", 2);
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
uint32_t cnt =
SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)"aa", 2);
PmqSetup(&pmq, 3);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
uint32_t cnt = SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)buf,
PmqSetup(&pmq, 2);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "works";
uint32_t cnt = SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)buf,
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "tone";
uint32_t cnt = SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)buf,
PmqSetup(&pmq, 1);
SCHSPreparePatterns(&mpm_ctx);
- SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx, 0);
+ SCHSInitThreadCtx(&mpm_ctx, &mpm_thread_ctx);
char *buf = "tONE";
uint32_t cnt = SCHSSearch(&mpm_ctx, &mpm_thread_ctx, &pmq, (uint8_t *)buf,
PmqCleanup(pmq);
}
-void MpmInitThreadCtx(MpmThreadCtx *mpm_thread_ctx, uint16_t matcher, uint32_t max_id)
+void MpmInitThreadCtx(MpmThreadCtx *mpm_thread_ctx, uint16_t matcher)
{
- mpm_table[matcher].InitThreadCtx(NULL, mpm_thread_ctx, max_id);
+ mpm_table[matcher].InitThreadCtx(NULL, mpm_thread_ctx);
}
void MpmInitCtx (MpmCtx *mpm_ctx, uint16_t matcher)
char *name;
uint8_t max_pattern_length;
void (*InitCtx)(struct MpmCtx_ *);
- void (*InitThreadCtx)(struct MpmCtx_ *, struct MpmThreadCtx_ *, uint32_t);
+ void (*InitThreadCtx)(struct MpmCtx_ *, struct MpmThreadCtx_ *);
void (*DestroyCtx)(struct MpmCtx_ *);
void (*DestroyThreadCtx)(struct MpmCtx_ *, struct MpmThreadCtx_ *);
void MpmRegisterTests(void);
void MpmInitCtx(MpmCtx *mpm_ctx, uint16_t matcher);
-void MpmInitThreadCtx(MpmThreadCtx *mpm_thread_ctx, uint16_t, uint32_t);
+void MpmInitThreadCtx(MpmThreadCtx *mpm_thread_ctx, uint16_t);
int MpmAddPatternCS(struct MpmCtx_ *mpm_ctx, uint8_t *pat, uint16_t patlen,
uint16_t offset, uint16_t depth,