memset(&alpd_ctx, 0, sizeof(alpd_ctx));
uint16_t spm_matcher = SinglePatternMatchDefaultMatcher();
- uint16_t mpm_matcher = PatternMatchDefaultMatcher();
+ uint8_t mpm_matcher = PatternMatchDefaultMatcher();
alpd_ctx.spm_global_thread_ctx = SpmInitGlobalThreadCtx(spm_matcher);
if (alpd_ctx.spm_global_thread_ctx == NULL) {
FrameDebug("get_by_idx(s)", frames, frame);
return frame;
} else {
- const uint16_t o = idx - FRAMES_STATIC_CNT;
+ const uint32_t o = idx - FRAMES_STATIC_CNT;
Frame *frame = &frames->dframes[o];
FrameDebug("get_by_idx(d)", frames, frame);
return frame;
void *alstate = NULL;
uint64_t p_tx_cnt = 0;
uint32_t consumed = input_len;
- const int direction = (flags & STREAM_TOSERVER) ? 0 : 1;
+ const uint8_t direction = (flags & STREAM_TOSERVER) ? 0 : 1;
/* we don't have the parser registered for this protocol */
if (p->StateAlloc == NULL)
{
AppProto *alproto;
AppProto *alproto_otherdir;
- int direction = (flags & STREAM_TOSERVER) ? 0 : 1;
+ uint8_t direction = (flags & STREAM_TOSERVER) ? 0 : 1;
if (flags & STREAM_TOSERVER) {
alproto = &f->alproto_ts;
goto end;
}
- const int direction = (flags & STREAM_TOSERVER) ? 0 : 1;
+ const uint8_t direction = (flags & STREAM_TOSERVER) ? 0 : 1;
if (flags & STREAM_TOSERVER) {
alproto = f->alproto_ts;
*
* \retval mpm algo value
*/
-uint16_t PatternMatchDefaultMatcher(void)
+uint8_t PatternMatchDefaultMatcher(void)
{
const char *mpm_algo;
- uint16_t mpm_algo_val = mpm_default_matcher;
+ uint8_t mpm_algo_val = mpm_default_matcher;
/* Get the mpm algo defined in config file by the user */
if ((ConfGet("mpm-algo", &mpm_algo)) == 1) {
uint32_t PatternStrength(uint8_t *, uint16_t);
-uint16_t PatternMatchDefaultMatcher(void);
+uint8_t PatternMatchDefaultMatcher(void);
uint32_t DnsQueryPatternSearch(DetectEngineThreadCtx *det_ctx, uint8_t *buffer, uint32_t buffer_len, uint8_t flags);
void PatternMatchPrepare(MpmCtx *, uint16_t);