|
|
|
@ -383,8 +383,6 @@ static int SCACGfbsAddPattern(MpmCtx *mpm_ctx, uint8_t *pat, uint16_t patlen,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mpm_ctx->total_pattern_cnt++;
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
error:
|
|
|
|
@ -429,10 +427,10 @@ static inline int SCACGfbsInitNewState(MpmCtx *mpm_ctx)
|
|
|
|
|
|
|
|
|
|
/* \todo using it temporarily now during dev, since I have restricted
|
|
|
|
|
* state var in SCACGfbsCtx->state_table to uint16_t. */
|
|
|
|
|
if (ctx->state_count > 65536) {
|
|
|
|
|
printf("state count exceeded\n");
|
|
|
|
|
exit(EXIT_FAILURE);
|
|
|
|
|
}
|
|
|
|
|
//if (ctx->state_count > 65536) {
|
|
|
|
|
// printf("state count exceeded\n");
|
|
|
|
|
// exit(EXIT_FAILURE);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
return ctx->state_count++;
|
|
|
|
|
}
|
|
|
|
@ -1339,7 +1337,6 @@ void SCACGfbsPrintInfo(MpmCtx *mpm_ctx)
|
|
|
|
|
printf(" SCACGfbsPattern %" PRIuMAX "\n", (uintmax_t)sizeof(SCACGfbsPattern));
|
|
|
|
|
printf(" SCACGfbsPattern %" PRIuMAX "\n", (uintmax_t)sizeof(SCACGfbsPattern));
|
|
|
|
|
printf("Unique Patterns: %" PRIu32 "\n", mpm_ctx->pattern_cnt);
|
|
|
|
|
printf("Total Patterns: %" PRIu32 "\n", mpm_ctx->total_pattern_cnt);
|
|
|
|
|
printf("Smallest: %" PRIu32 "\n", mpm_ctx->minlen);
|
|
|
|
|
printf("Largest: %" PRIu32 "\n", mpm_ctx->maxlen);
|
|
|
|
|
printf("Total states in the state table: %" PRIu32 "\n", ctx->state_count);
|
|
|
|
|