]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: constify arguments
authorVictor Julien <vjulien@oisf.net>
Sun, 23 Feb 2025 11:03:03 +0000 (12:03 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 25 Feb 2025 14:49:32 +0000 (15:49 +0100)
src/detect-engine-alert.c
src/detect-engine-threshold.c
src/detect-engine-threshold.h

index 01452ecf89ae7fa32867f33006b6f37f9e82d2df..9e9a499bb5b2edeb633d4f6727d2fe058f5a5e5a 100644 (file)
@@ -69,8 +69,8 @@ void PacketAlertTagInit(void)
  * \retval 1 alert is not suppressed
  * \retval 0 alert is suppressed
  */
-static int PacketAlertHandle(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
-                             const Signature *s, Packet *p, PacketAlert *pa)
+static int PacketAlertHandle(const DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
+        const Signature *s, Packet *p, PacketAlert *pa)
 {
     SCEnter();
     int ret = 1;
index c9ca8fa4a45e0dcb817133876b660da3e9bd69b4..38a7accf745a064610b4f958446826f64ce252e8 100644 (file)
@@ -947,7 +947,7 @@ static int ThresholdHandlePacketFlow(Flow *f, Packet *p, const DetectThresholdDa
  * \retval 1 alert on this event
  * \retval 0 do not alert on this event
  */
-int PacketAlertThreshold(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
+int PacketAlertThreshold(const DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
         const DetectThresholdData *td, Packet *p, const Signature *s, PacketAlert *pa)
 {
     SCEnter();
index 086dba497a5a034006c5568ee508978ed7e8fc42..cb1b09fbbb3ce2e0238a0818b1a87466f4bef7c4 100644 (file)
@@ -35,9 +35,8 @@ uint32_t ThresholdsExpire(const SCTime_t ts);
 
 const DetectThresholdData *SigGetThresholdTypeIter(
         const Signature *, const SigMatchData **, int list);
-int PacketAlertThreshold(DetectEngineCtx *, DetectEngineThreadCtx *,
-        const DetectThresholdData *, Packet *,
-        const Signature *, PacketAlert *);
+int PacketAlertThreshold(const DetectEngineCtx *, DetectEngineThreadCtx *,
+        const DetectThresholdData *, Packet *, const Signature *, PacketAlert *);
 
 void ThresholdListFree(void *ptr);
 void ThresholdCacheThreadFree(void);