26 static int DetectFlowPktsToClientMatch(
29 if (p->
flow == NULL) {
40 rs_detect_u32_free(ptr);
51 DetectFlowPktsToClientFree(
de_ctx, du32);
59 static void PrefilterPacketFlowPktsToClientMatch(
63 if (!PrefilterPacketHeaderExtraMatch(
ctx, p))
67 du32.mode =
ctx->v1.u8[0];
68 du32.arg1 =
ctx->v1.u32[1];
69 du32.arg2 =
ctx->v1.u32[2];
70 if (DetectFlowPktsToClientMatch(det_ctx, p, NULL, (
const SigMatchCtx *)&du32)) {
71 PrefilterAddSids(&det_ctx->
pmq,
ctx->sigs_array,
ctx->sigs_cnt);
79 PrefilterPacketFlowPktsToClientMatch);
82 static bool PrefilterFlowPktsToClientIsPrefilterable(
const Signature *s)
96 PrefilterFlowPktsToClientIsPrefilterable;
100 static int DetectFlowPktsToServerMatch(
103 if (p->
flow == NULL) {
114 rs_detect_u32_free(ptr);
125 DetectFlowPktsToServerFree(
de_ctx, du32);
133 static void PrefilterPacketFlowPktsToServerMatch(
137 if (!PrefilterPacketHeaderExtraMatch(
ctx, p))
141 du32.mode =
ctx->v1.u8[0];
142 du32.arg1 =
ctx->v1.u32[1];
143 du32.arg2 =
ctx->v1.u32[2];
144 if (DetectFlowPktsToServerMatch(det_ctx, p, NULL, (
const SigMatchCtx *)&du32)) {
145 PrefilterAddSids(&det_ctx->
pmq,
ctx->sigs_array,
ctx->sigs_cnt);
153 PrefilterPacketFlowPktsToServerMatch);
156 static bool PrefilterFlowPktsToServerIsPrefilterable(
const Signature *s)
170 PrefilterFlowPktsToServerIsPrefilterable;
174 static int DetectFlowBytesToClientMatch(
177 if (p->
flow == NULL) {
188 rs_detect_u64_free(ptr);
199 DetectFlowBytesToClientFree(
de_ctx, du64);
212 "/rules/flow-keywords.html#flow-bytes_toclient";
218 static int DetectFlowBytesToServerMatch(
221 if (p->
flow == NULL) {
232 rs_detect_u64_free(ptr);
243 DetectFlowBytesToServerFree(
de_ctx, du64);
256 "/rules/flow-keywords.html#flow-bytes_toserver";