35 static int DetectFlowElephantMatchAux(
Packet *p,
const DetectFlowDir *fdir)
38 case DETECT_FLOW_TOSERVER:
40 case DETECT_FLOW_TOCLIENT:
42 case DETECT_FLOW_TOEITHER:
45 case DETECT_FLOW_TOBOTH:
54 static int DetectFlowElephantMatch(
57 if (p->
flow == NULL) {
61 DetectFlowDir *fdir = (DetectFlowDir *)
ctx;
63 return DetectFlowElephantMatchAux(p, fdir);
68 DetectFlowDir *fdir = SCDetectFlowDir(rawstr);
83 SCDetectFlowDirFree(dfd);
88 static void PrefilterPacketFlowElephantMatch(
97 if (!PrefilterPacketHeaderExtraMatch(
ctx, p))
100 DetectFlowDir dfd =
ctx->v1.u8[0];
103 if (DetectFlowElephantMatchAux(p, &dfd) > 0) {
104 PrefilterAddSids(&det_ctx->
pmq,
ctx->sigs_array,
ctx->sigs_cnt);
110 const DetectFlowDir *a = smctx;
116 const DetectFlowDir *a = smctx;
125 PrefilterPacketFlowElephantSet, PrefilterPacketFlowElephantCompare,
126 PrefilterPacketFlowElephantMatch);
129 static bool PrefilterFlowElephantIsPrefilterable(
const Signature *s)