]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: remove Threadvars argument from API calls
authorVictor Julien <victor@inliniac.net>
Fri, 28 Jun 2019 17:29:55 +0000 (19:29 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 1 Jul 2019 13:44:30 +0000 (15:44 +0200)
Remove it as it's (almost) never used. If it is really needed it can
be accessed through DetectEngineThreadCtx::tv as well.

75 files changed:
src/detect-app-layer-event.c
src/detect-app-layer-protocol.c
src/detect-asn1.c
src/detect-bypass.c
src/detect-bytejump.c
src/detect-bytetest.c
src/detect-csum.c
src/detect-dce-iface.c
src/detect-dce-opnum.c
src/detect-detection-filter.c
src/detect-dnp3.c
src/detect-dsize.c
src/detect-engine-alert.c
src/detect-engine-event.c
src/detect-engine-file.c
src/detect-engine-iponly.c
src/detect-engine.c
src/detect-file-hash-common.c
src/detect-file-hash-common.h
src/detect-fileext.c
src/detect-filemagic.c
src/detect-filename.c
src/detect-filesize.c
src/detect-filestore.c
src/detect-flow.c
src/detect-flowbits.c
src/detect-flowint.c
src/detect-flowvar.c
src/detect-fragbits.c
src/detect-fragoffset.c
src/detect-ftpbounce.c
src/detect-ftpdata.c
src/detect-geoip.c
src/detect-hostbits.c
src/detect-icmp-id.c
src/detect-icmp-seq.c
src/detect-icode.c
src/detect-id.c
src/detect-ipopts.c
src/detect-iprep.c
src/detect-itype.c
src/detect-krb5-errcode.c
src/detect-krb5-msgtype.c
src/detect-lua.c
src/detect-mark.c
src/detect-nfs-procedure.c
src/detect-nfs-version.c
src/detect-pktvar.c
src/detect-replace.c
src/detect-rpc.c
src/detect-sameip.c
src/detect-snmp-pdu_type.c
src/detect-snmp-version.c
src/detect-ssh-proto-version.c
src/detect-ssh-software-version.c
src/detect-ssl-state.c
src/detect-ssl-version.c
src/detect-stream_size.c
src/detect-tag.c
src/detect-tcp-ack.c
src/detect-tcp-flags.c
src/detect-tcp-seq.c
src/detect-tcp-window.c
src/detect-tcpmss.c
src/detect-template.c
src/detect-template2.c
src/detect-threshold.c
src/detect-tls-cert-validity.c
src/detect-tls-version.c
src/detect-tls.c
src/detect-tos.c
src/detect-ttl.c
src/detect-xbits.c
src/detect.c
src/detect.h

index 092ab0bc1feecb1022cd1a446608ea8fc2f786b7..9452ee434090ea903f4143102fa69bc77ebdd5ea 100644 (file)
@@ -48,7 +48,7 @@
 
 #define MAX_ALPROTO_NAME 50
 
-static int DetectAppLayerEventPktMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectAppLayerEventPktMatch(DetectEngineThreadCtx *det_ctx,
                                        Packet *p, const Signature *s, const SigMatchCtx *ctx);
 static int DetectAppLayerEventSetupP1(DetectEngineCtx *, Signature *, const char *);
 static void DetectAppLayerEventRegisterTests(void);
@@ -133,7 +133,7 @@ static int DetectEngineAptEventInspect(ThreadVars *tv,
 }
 
 
-static int DetectAppLayerEventPktMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectAppLayerEventPktMatch(DetectEngineThreadCtx *det_ctx,
                                 Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectAppLayerEventData *aled = (const DetectAppLayerEventData *)ctx;
index 214bac80b7347f26590076b949eda41767c54563..fc0520dc7cdd486e9b3f2c3e98b32e661a6ff77d 100644 (file)
@@ -35,7 +35,7 @@
 
 static void DetectAppLayerProtocolRegisterTests(void);
 
-static int DetectAppLayerProtocolPacketMatch(ThreadVars *tv,
+static int DetectAppLayerProtocolPacketMatch(
         DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
index af37546be1783bcd499b22120e1bea121b58b747..524bd97868664bb6a3f6e508839c4a71adc179f9 100644 (file)
@@ -42,7 +42,7 @@
 /* delimiters for functions/arguments */
 const char *ASN_DELIM = " \t,\n";
 
-static int DetectAsn1Match(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectAsn1Match(DetectEngineThreadCtx *, Packet *,
                      const Signature *, const SigMatchCtx *);
 static int DetectAsn1Setup (DetectEngineCtx *, Signature *, const char *);
 static void DetectAsn1RegisterTests(void);
@@ -137,7 +137,7 @@ static uint8_t DetectAsn1Checks(Asn1Node *node, const DetectAsn1Data *ad)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectAsn1Match(ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectAsn1Match(DetectEngineThreadCtx *det_ctx, Packet *p,
                     const Signature *s, const SigMatchCtx *ctx)
 {
     uint8_t ret = 0;
index 2f6a2fbdd8857baabec626182ae4bf70abb54372..8a37b3ba7042b8d28b682871160bc780401d7633 100644 (file)
@@ -50,7 +50,7 @@
 #include "util-unittest-helper.h"
 #include "util-device.h"
 
-static int DetectBypassMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectBypassMatch(DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectBypassSetup(DetectEngineCtx *, Signature *, const char *);
 static void DetectBypassRegisterTests(void);
@@ -92,7 +92,7 @@ static int DetectBypassSetup(DetectEngineCtx *de_ctx, Signature *s, const char *
     return 0;
 }
 
-static int DetectBypassMatch(ThreadVars *tv, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectBypassMatch(DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
     PacketBypassCallback(p);
index c277da03fd0a80b729be362aa2e61dbe9428b2fb..a64b8f81f1cc63280562cbef6c99be784e3db0fb 100644 (file)
@@ -60,7 +60,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectBytejumpMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectBytejumpMatch(DetectEngineThreadCtx *det_ctx,
                         Packet *p, const Signature *s, const SigMatchCtx *ctx);
 static DetectBytejumpData *DetectBytejumpParse(const char *optstr, char **offset);
 static int DetectBytejumpSetup(DetectEngineCtx *de_ctx, Signature *s, const char *optstr);
@@ -199,7 +199,7 @@ int DetectBytejumpDoMatch(DetectEngineThreadCtx *det_ctx, const Signature *s,
     SCReturnInt(1);
 }
 
-static int DetectBytejumpMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectBytejumpMatch(DetectEngineThreadCtx *det_ctx,
                         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectBytejumpData *data = (const DetectBytejumpData *)ctx;
index d7c0db0bbc355fcecd8eea1a1005a368be671caf..e205a9f3fc0b3c282ea2dc44b74a9ebf6de620c9 100644 (file)
@@ -62,7 +62,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectBytetestMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectBytetestMatch(DetectEngineThreadCtx *det_ctx,
                         Packet *p, const Signature *s, const SigMatchCtx *ctx);
 static int DetectBytetestSetup(DetectEngineCtx *de_ctx, Signature *s, const char *optstr);
 static void DetectBytetestFree(void *ptr);
@@ -234,7 +234,7 @@ int DetectBytetestDoMatch(DetectEngineThreadCtx *det_ctx,
 
 }
 
-static int DetectBytetestMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectBytetestMatch(DetectEngineThreadCtx *det_ctx,
                         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     return DetectBytetestDoMatch(det_ctx, s, ctx, p->payload, p->payload_len,
index 89341b533b7db496ca04f89c42685a71f88e0a61..5e36f54ce5d9179ceb9f5c25e688119a01b9adc2 100644 (file)
 #include "util-profiling.h"
 
 /* prototypes for the "ipv4-csum" rule keyword */
-static int DetectIPV4CsumMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectIPV4CsumMatch(DetectEngineThreadCtx *,
         Packet *, const Signature *, const SigMatchCtx *);
 static int DetectIPV4CsumSetup(DetectEngineCtx *, Signature *, const char *);
 static void DetectIPV4CsumFree(void *);
 
 /* prototypes for the "tcpv4-csum" rule keyword */
-static int DetectTCPV4CsumMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectTCPV4CsumMatch(DetectEngineThreadCtx *,
         Packet *, const Signature *, const SigMatchCtx *);
 static int DetectTCPV4CsumSetup(DetectEngineCtx *, Signature *, const char *);
 static void DetectTCPV4CsumFree(void *);
 
 /* prototypes for the "tcpv6-csum" rule keyword */
-static int DetectTCPV6CsumMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectTCPV6CsumMatch(DetectEngineThreadCtx *,
         Packet *, const Signature *, const SigMatchCtx *);
 static int DetectTCPV6CsumSetup(DetectEngineCtx *, Signature *, const char *);
 static void DetectTCPV6CsumFree(void *);
 
 /* prototypes for the "udpv4-csum" rule keyword */
-static int DetectUDPV4CsumMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectUDPV4CsumMatch(DetectEngineThreadCtx *,
         Packet *, const Signature *, const SigMatchCtx *);
 static int DetectUDPV4CsumSetup(DetectEngineCtx *, Signature *, const char *);
 static void DetectUDPV4CsumFree(void *);
 
 /* prototypes for the "udpv6-csum" rule keyword */
-static int DetectUDPV6CsumMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectUDPV6CsumMatch(DetectEngineThreadCtx *,
         Packet *, const Signature *, const SigMatchCtx *);
 static int DetectUDPV6CsumSetup(DetectEngineCtx *, Signature *, const char *);
 static void DetectUDPV6CsumFree(void *);
 
 /* prototypes for the "icmpv4-csum" rule keyword */
-static int DetectICMPV4CsumMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectICMPV4CsumMatch(DetectEngineThreadCtx *,
         Packet *, const Signature *, const SigMatchCtx *);
 static int DetectICMPV4CsumSetup(DetectEngineCtx *, Signature *, const char *);
 static void DetectICMPV4CsumFree(void *);
 
 /* prototypes for the "icmpv6-csum" rule keyword */
-static int DetectICMPV6CsumMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectICMPV6CsumMatch(DetectEngineThreadCtx *,
         Packet *, const Signature *, const SigMatchCtx *);
 static int DetectICMPV6CsumSetup(DetectEngineCtx *, Signature *, const char *);
 static void DetectICMPV6CsumFree(void *);
@@ -229,7 +229,7 @@ error:
  *
  * \retval 1 if the Packet contents match the keyword option; 0 otherwise
  */
-static int DetectIPV4CsumMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectIPV4CsumMatch(DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectCsumData *cd = (const DetectCsumData *)ctx;
@@ -324,7 +324,7 @@ static void DetectIPV4CsumFree(void *ptr)
  *
  * \retval 1 if the Packet contents match the keyword option; 0 otherwise
  */
-static int DetectTCPV4CsumMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectTCPV4CsumMatch(DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectCsumData *cd = (const DetectCsumData *)ctx;
@@ -421,7 +421,7 @@ static void DetectTCPV4CsumFree(void *ptr)
  *
  * \retval 1 if the Packet contents match the keyword option; 0 otherwise
  */
-static int DetectTCPV6CsumMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectTCPV6CsumMatch(DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectCsumData *cd = (const DetectCsumData *)ctx;
@@ -518,7 +518,7 @@ static void DetectTCPV6CsumFree(void *ptr)
  *
  * \retval 1 if the Packet contents match the keyword option; 0 otherwise
  */
-static int DetectUDPV4CsumMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectUDPV4CsumMatch(DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectCsumData *cd = (const DetectCsumData *)ctx;
@@ -615,7 +615,7 @@ static void DetectUDPV4CsumFree(void *ptr)
  *
  * \retval 1 if the Packet contents match the keyword option; 0 otherwise
  */
-static int DetectUDPV6CsumMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectUDPV6CsumMatch(DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectCsumData *cd = (const DetectCsumData *)ctx;
@@ -712,7 +712,7 @@ static void DetectUDPV6CsumFree(void *ptr)
  *
  * \retval 1 if the Packet contents match the keyword option; 0 otherwise
  */
-static int DetectICMPV4CsumMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectICMPV4CsumMatch(DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectCsumData *cd = (const DetectCsumData *)ctx;
@@ -807,7 +807,7 @@ static void DetectICMPV4CsumFree(void *ptr)
  *
  * \retval 1 if the Packet contents match the keyword option; 0 otherwise
  */
-static int DetectICMPV6CsumMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectICMPV6CsumMatch(DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectCsumData *cd = (const DetectCsumData *)ctx;
index 5c9ebae2d89b6a0032e223418b13e5260b770235..07062f7b12a960d3528742d3b8fd953576597476 100644 (file)
@@ -55,8 +55,7 @@
 static pcre *parse_regex = NULL;
 static pcre_extra *parse_regex_study = NULL;
 
-static int DetectDceIfaceMatchRust(ThreadVars *t,
-        DetectEngineThreadCtx *det_ctx,
+static int DetectDceIfaceMatchRust(DetectEngineThreadCtx *det_ctx,
         Flow *f, uint8_t flags, void *state, void *txv,
         const Signature *s, const SigMatchCtx *m);
 static int DetectDceIfaceSetup(DetectEngineCtx *, Signature *, const char *);
@@ -276,7 +275,7 @@ static inline int DetectDceIfaceMatchIfaceVersion(const uint16_t version,
  * \retval 1 On Match.
  * \retval 0 On no match.
  */
-static int DetectDceIfaceMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectDceIfaceMatch(DetectEngineThreadCtx *det_ctx,
         Flow *f, uint8_t flags, void *state, void *txv,
         const Signature *s, const SigMatchCtx *m)
 {
@@ -340,15 +339,14 @@ end:
     SCReturnInt(ret);
 }
 
-static int DetectDceIfaceMatchRust(ThreadVars *t,
-        DetectEngineThreadCtx *det_ctx,
+static int DetectDceIfaceMatchRust(DetectEngineThreadCtx *det_ctx,
         Flow *f, uint8_t flags, void *state, void *txv,
         const Signature *s, const SigMatchCtx *m)
 {
     SCEnter();
 
     if (f->alproto == ALPROTO_DCERPC) {
-        return DetectDceIfaceMatch(t, det_ctx, f, flags,
+        return DetectDceIfaceMatch(det_ctx, f, flags,
                                    state, txv, s, m);
     }
 
index 11166484aebff63f3e6fa626e86cda5951fd7231..8d841d6e36c527bed2f43458506e4eaadf9213c1 100644 (file)
 static pcre *parse_regex = NULL;
 static pcre_extra *parse_regex_study = NULL;
 
-static int DetectDceOpnumMatchRust(ThreadVars *t,
-                        DetectEngineThreadCtx *det_ctx,
-                        Flow *f, uint8_t flags, void *state, void *txv,
-                        const Signature *s, const SigMatchCtx *m);
+static int DetectDceOpnumMatchRust(DetectEngineThreadCtx *det_ctx,
+        Flow *f, uint8_t flags, void *state, void *txv,
+        const Signature *s, const SigMatchCtx *m);
 static int DetectDceOpnumSetup(DetectEngineCtx *, Signature *, const char *);
 static void DetectDceOpnumFree(void *);
 static void DetectDceOpnumRegisterTests(void);
@@ -243,7 +242,7 @@ static DetectDceOpnumData *DetectDceOpnumArgParse(const char *arg)
  * \retval 1 On Match.
  * \retval 0 On no match.
  */
-static int DetectDceOpnumMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectDceOpnumMatch(DetectEngineThreadCtx *det_ctx,
                         Flow *f, uint8_t flags, void *state, void *txv,
                         const Signature *s, const SigMatchCtx *m)
 {
@@ -275,15 +274,14 @@ static int DetectDceOpnumMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
     SCReturnInt(0);
 }
 
-static int DetectDceOpnumMatchRust(ThreadVars *t,
-                        DetectEngineThreadCtx *det_ctx,
-                        Flow *f, uint8_t flags, void *state, void *txv,
-                        const Signature *s, const SigMatchCtx *m)
+static int DetectDceOpnumMatchRust(DetectEngineThreadCtx *det_ctx,
+        Flow *f, uint8_t flags, void *state, void *txv,
+        const Signature *s, const SigMatchCtx *m)
 {
     SCEnter();
 
     if (f->alproto == ALPROTO_DCERPC) {
-        return DetectDceOpnumMatch(t, det_ctx, f, flags,
+        return DetectDceOpnumMatch(det_ctx, f, flags,
                                    state, txv, s, m);
     }
 
index f091db86b4eae1acb1af67c5c3203478bbf1d3c4..60676fc3b24d47da74d0c664b5af568fc0a1a81b 100644 (file)
@@ -51,7 +51,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectDetectionFilterMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectDetectionFilterMatch(DetectEngineThreadCtx *,
         Packet *, const Signature *, const SigMatchCtx *);
 static int DetectDetectionFilterSetup(DetectEngineCtx *, Signature *, const char *);
 static void DetectDetectionFilterRegisterTests(void);
@@ -75,7 +75,7 @@ void DetectDetectionFilterRegister (void)
     DetectSetupParseRegexes(PARSE_REGEX, &parse_regex, &parse_regex_study);
 }
 
-static int DetectDetectionFilterMatch (ThreadVars *thv, DetectEngineThreadCtx *det_ctx,
+static int DetectDetectionFilterMatch (DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     return 1;
index 2ff1b32e95378834d79d6b26f14bef27bd2c08d5..ab2625394b074bb9d6c9fa9c019c7fccbc7f1b4d 100644 (file)
@@ -423,7 +423,7 @@ static void DetectDNP3Free(void *ptr)
     SCReturn;
 }
 
-static int DetectDNP3FuncMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectDNP3FuncMatch(DetectEngineThreadCtx *det_ctx,
     Flow *f, uint8_t flags, void *state, void *txv, const Signature *s,
     const SigMatchCtx *ctx)
 {
@@ -441,7 +441,7 @@ static int DetectDNP3FuncMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
     return match;
 }
 
-static int DetectDNP3ObjMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectDNP3ObjMatch(DetectEngineThreadCtx *det_ctx,
     Flow *f, uint8_t flags, void *state, void *txv, const Signature *s,
     const SigMatchCtx *ctx)
 {
@@ -469,7 +469,7 @@ static int DetectDNP3ObjMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
     return 0;
 }
 
-static int DetectDNP3IndMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectDNP3IndMatch(DetectEngineThreadCtx *det_ctx,
     Flow *f, uint8_t flags, void *state, void *txv, const Signature *s,
     const SigMatchCtx *ctx)
 {
index adbc0802b1a4b7289cb811aa65aa19b0d1f8f6b0..c92adfc7ad02fa2f4098fbac9d88cd91f31f0b89 100644 (file)
@@ -50,7 +50,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectDsizeMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectDsizeMatch (DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectDsizeSetup (DetectEngineCtx *, Signature *s, const char *str);
 static void DsizeRegisterTests(void);
@@ -107,7 +107,7 @@ DsizeMatch(const uint16_t psize, const uint8_t mode,
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectDsizeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectDsizeMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
     const Signature *s, const SigMatchCtx *ctx)
 {
     SCEnter();
index d2401b57af7ed645d1f90f8277385f4797cd6770..528e5b3cd15eb0333754459710703d4edbf1b0a1 100644 (file)
@@ -254,7 +254,7 @@ void PacketAlertFinalize(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx
                 while (1) {
                     /* tags are set only for alerts */
                     KEYWORD_PROFILING_START;
-                    sigmatch_table[smd->type].Match(NULL, det_ctx, p, (Signature *)s, smd->ctx);
+                    sigmatch_table[smd->type].Match(det_ctx, p, (Signature *)s, smd->ctx);
                     KEYWORD_PROFILING_END(det_ctx, smd->type, 1);
                     if (smd->is_last)
                         break;
index 8665d731892d51bb0fce7155b23ae9055af98d96..486d4968e6377346a3c817ee1b4eeb37f41bffe4 100644 (file)
@@ -47,7 +47,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectEngineEventMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectEngineEventMatch (DetectEngineThreadCtx *,
         Packet *, const Signature *, const SigMatchCtx *);
 static int DetectEngineEventSetup (DetectEngineCtx *, Signature *, const char *);
 static int DetectDecodeEventSetup (DetectEngineCtx *, Signature *, const char *);
@@ -93,7 +93,7 @@ void DetectEngineEventRegister (void)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectEngineEventMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectEngineEventMatch (DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     SCEnter();
@@ -367,7 +367,7 @@ static int EngineEventTestParse06 (void)
     sm->type = DETECT_DECODE_EVENT;
     sm->ctx = (SigMatchCtx *)de;
 
-    ret = DetectEngineEventMatch(&tv,NULL,p,NULL,sm->ctx);
+    ret = DetectEngineEventMatch(NULL,p,NULL,sm->ctx);
 
     if(ret) {
         SCFree(p);
index dee3c584e0430f12db0c13c3295733b13b933960..a6f8cfa0585466d8843c10c9d74565a2c047054e 100644 (file)
@@ -144,7 +144,7 @@ static int DetectFileInspect(ThreadVars *tv, DetectEngineThreadCtx *det_ctx,
                 if (sigmatch_table[smd->type].FileMatch != NULL) {
                     KEYWORD_PROFILING_START;
                     match = sigmatch_table[smd->type].
-                        FileMatch(tv, det_ctx, f, flags, file, s, smd->ctx);
+                        FileMatch(det_ctx, f, flags, file, s, smd->ctx);
                     KEYWORD_PROFILING_END(det_ctx, smd->type, (match > 0));
                     if (match == 0) {
                         r = DETECT_ENGINE_INSPECT_SIG_CANT_MATCH_FILES;
@@ -178,7 +178,7 @@ static int DetectFileInspect(ThreadVars *tv, DetectEngineThreadCtx *det_ctx,
             if (fd->scope > FILESTORE_SCOPE_DEFAULT) {
                 KEYWORD_PROFILING_START;
                 match = sigmatch_table[smd->type].
-                    FileMatch(tv, det_ctx, f, flags, /* no file */NULL, s, smd->ctx);
+                    FileMatch(det_ctx, f, flags, /* no file */NULL, s, smd->ctx);
                 KEYWORD_PROFILING_END(det_ctx, smd->type, (match > 0));
 
                 if (match == 1) {
index 0b2870dd32441326b012520a54fc62e4a8a1490f..33c715b70cbe40aa465a2418e466709e202878d7 100644 (file)
@@ -952,7 +952,7 @@ int IPOnlyMatchCompatSMs(ThreadVars *tv,
         while (1) {
             DEBUG_VALIDATE_BUG_ON(!(sigmatch_table[smd->type].flags & SIGMATCH_IPONLY_COMPAT));
             KEYWORD_PROFILING_START;
-            if (sigmatch_table[smd->type].Match(tv, det_ctx, p, s, smd->ctx) > 0) {
+            if (sigmatch_table[smd->type].Match(det_ctx, p, s, smd->ctx) > 0) {
                 KEYWORD_PROFILING_END(det_ctx, smd->type, 1);
                 if (smd->is_last)
                     break;
@@ -1082,7 +1082,7 @@ void IPOnlyMatchPacket(ThreadVars *tv,
                         if (smd != NULL) {
                             while (1) {
                                 KEYWORD_PROFILING_START;
-                                (void)sigmatch_table[smd->type].Match(tv, det_ctx, p, s, smd->ctx);
+                                (void)sigmatch_table[smd->type].Match(det_ctx, p, s, smd->ctx);
                                 KEYWORD_PROFILING_END(det_ctx, smd->type, 1);
                                 if (smd->is_last)
                                     break;
index c749567309b09bde44b9d2b158b127ffe39cd73b..7c078d81377fac8de0f1043f5aef04b327850c77 100644 (file)
@@ -1131,7 +1131,7 @@ static bool DetectEngineInspectRulePacketMatches(
     SCLogDebug("running match functions, sm %p", smd);
     while (1) {
         KEYWORD_PROFILING_START;
-        if (sigmatch_table[smd->type].Match(tv, det_ctx, p, s, smd->ctx) <= 0) {
+        if (sigmatch_table[smd->type].Match(det_ctx, p, s, smd->ctx) <= 0) {
             KEYWORD_PROFILING_END(det_ctx, smd->type, 0);
             SCLogDebug("no match");
             return false;
@@ -1350,14 +1350,10 @@ int DetectEngineInspectGenericList(ThreadVars *tv,
     if (smd != NULL) {
         while (1) {
             int match = 0;
-#ifdef PROFILING
             KEYWORD_PROFILING_START;
-#endif
             match = sigmatch_table[smd->type].
-                AppLayerTxMatch(tv, det_ctx, f, flags, alstate, txv, s, smd->ctx);
-#ifdef PROFILING
+                AppLayerTxMatch(det_ctx, f, flags, alstate, txv, s, smd->ctx);
             KEYWORD_PROFILING_END(det_ctx, smd->type, (match == 1));
-#endif
             if (match == 0)
                 return DETECT_ENGINE_INSPECT_SIG_NO_MATCH;
             if (match == 2) {
index e3d84fc00c290fa0346bda1ecfa553eee19edc6e..fd666dcbceccb4ff1ad39d695a841216ce9102e0 100644 (file)
@@ -135,7 +135,6 @@ static int HashMatchHashTable(ROHashTable *hash_table, uint8_t *hash,
 /**
  * \brief Match the specified file hash
  *
- * \param t thread local vars
  * \param det_ctx pattern matcher thread local data
  * \param f *LOCKED* flow
  * \param flags direction flags
@@ -146,7 +145,7 @@ static int HashMatchHashTable(ROHashTable *hash_table, uint8_t *hash,
  * \retval 0 no match
  * \retval 1 match
  */
-int DetectFileHashMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+int DetectFileHashMatch (DetectEngineThreadCtx *det_ctx,
         Flow *f, uint8_t flags, File *file, const Signature *s, const SigMatchCtx *m)
 {
     SCEnter();
index c05ca9ec9f69db4f49a43df0d8fbf602bdb55a75..85cadfbd9efe336b02fbd48a24566b40dbab1e94 100644 (file)
@@ -37,7 +37,7 @@ typedef struct DetectFileHashData_ {
 int ReadHashString(uint8_t *, const char *, const char *, int, uint16_t);
 int LoadHashTable(ROHashTable *, const char *, const char *, int, uint32_t);
 
-int DetectFileHashMatch(ThreadVars *, DetectEngineThreadCtx *, Flow *, uint8_t,
+int DetectFileHashMatch(DetectEngineThreadCtx *, Flow *, uint8_t,
         File *, const Signature *, const SigMatchCtx *);
 int DetectFileHashSetup(DetectEngineCtx *, Signature *, const char *, uint32_t, int);
 void DetectFileHashFree(void *);
index e3c550c2e0bdef917b5b35c90cd2c30e9f973479..b1f590946cd804c7c22928deab61d978eba72bfc 100644 (file)
@@ -51,7 +51,7 @@
 #include "stream-tcp.h"
 #include "detect-fileext.h"
 
-static int DetectFileextMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectFileextMatch (DetectEngineThreadCtx *, Flow *,
         uint8_t, File *, const Signature *, const SigMatchCtx *);
 static int DetectFileextSetup (DetectEngineCtx *, Signature *, const char *);
 static void DetectFileextRegisterTests(void);
@@ -93,7 +93,7 @@ void DetectFileextRegister(void)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectFileextMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectFileextMatch (DetectEngineThreadCtx *det_ctx,
         Flow *f, uint8_t flags, File *file, const Signature *s, const SigMatchCtx *m)
 {
     SCEnter();
index bd9b34993ef1fb9372d18151f1aff662d8a08661..ca2faab976cf86d0364986645e1b7a76668e53da 100644 (file)
@@ -78,7 +78,7 @@ void DetectFilemagicRegister(void)
 
 #else /* HAVE_MAGIC */
 
-static int DetectFilemagicMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectFilemagicMatch (DetectEngineThreadCtx *, Flow *,
         uint8_t, File *, const Signature *, const SigMatchCtx *);
 static int DetectFilemagicSetup (DetectEngineCtx *, Signature *, const char *);
 static void DetectFilemagicRegisterTests(void);
@@ -231,7 +231,7 @@ static int FilemagicThreadLookup(magic_t *ctx, File *file)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectFilemagicMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectFilemagicMatch (DetectEngineThreadCtx *det_ctx,
         Flow *f, uint8_t flags, File *file, const Signature *s, const SigMatchCtx *m)
 {
     SCEnter();
index e57f051a9cad61e45f1bba885bae6f42b9d3b7d1..bbe91a7f4042cbf4d37ed57f95c7ca0e37364a27 100644 (file)
@@ -54,7 +54,7 @@
 #include "detect-filename.h"
 #include "app-layer-parser.h"
 
-static int DetectFilenameMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectFilenameMatch (DetectEngineThreadCtx *, Flow *,
         uint8_t, File *, const Signature *, const SigMatchCtx *);
 static int DetectFilenameSetup (DetectEngineCtx *, Signature *, const char *);
 static int DetectFilenameSetupSticky(DetectEngineCtx *de_ctx, Signature *s, const char *str);
@@ -173,7 +173,7 @@ void DetectFilenameRegister(void)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectFilenameMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectFilenameMatch (DetectEngineThreadCtx *det_ctx,
         Flow *f, uint8_t flags, File *file, const Signature *s, const SigMatchCtx *m)
 {
     SCEnter();
index 1e18178ec49f747b00f8174e45b6bbe8ed127047..a62de03e6c6269ef94873e3c2ced462fdb298b90 100644 (file)
@@ -50,7 +50,7 @@ static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
 /*prototypes*/
-static int DetectFilesizeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Flow *f,
+static int DetectFilesizeMatch (DetectEngineThreadCtx *det_ctx, Flow *f,
         uint8_t flags, File *file, const Signature *s, const SigMatchCtx *m);
 static int DetectFilesizeSetup (DetectEngineCtx *, Signature *, const char *);
 static void DetectFilesizeFree (void *);
@@ -90,7 +90,7 @@ void DetectFilesizeRegister(void)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectFilesizeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Flow *f,
+static int DetectFilesizeMatch (DetectEngineThreadCtx *det_ctx, Flow *f,
         uint8_t flags, File *file, const Signature *s, const SigMatchCtx *m)
 {
     SCEnter();
index 1114974140366f26ba3a6f6e0b368c29a8b77be3..9667d52ca6b18258bfb8ab889136b6a271c3d0af 100644 (file)
@@ -60,9 +60,9 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectFilestoreMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectFilestoreMatch (DetectEngineThreadCtx *,
         Flow *, uint8_t, File *, const Signature *, const SigMatchCtx *);
-static int DetectFilestorePostMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectFilestorePostMatch(DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx);
 static int DetectFilestoreSetup (DetectEngineCtx *, Signature *, const char *);
 static void DetectFilestoreFree(void *);
@@ -190,7 +190,7 @@ static int FilestorePostMatchWithOptions(Packet *p, Flow *f, const DetectFilesto
  *  When we are sure all parts of the signature matched, we run this function
  *  to finalize the filestore.
  */
-static int DetectFilestorePostMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectFilestorePostMatch(DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     uint8_t flags = 0;
@@ -253,7 +253,7 @@ static int DetectFilestorePostMatch(ThreadVars *t, DetectEngineThreadCtx *det_ct
  * \todo when we start supporting more protocols, the logic in this function
  *       needs to be put behind a api.
  */
-static int DetectFilestoreMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Flow *f,
+static int DetectFilestoreMatch (DetectEngineThreadCtx *det_ctx, Flow *f,
         uint8_t flags, File *file, const Signature *s, const SigMatchCtx *m)
 {
     uint32_t file_id = 0;
index a47808edb276f7ea4dab0e0da063cdf7262d90c7..236025b4d3b215c66684913b5c19e46732ddc2a8 100644 (file)
@@ -49,7 +49,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-int DetectFlowMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+int DetectFlowMatch (DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectFlowSetup (DetectEngineCtx *, Signature *, const char *);
 void DetectFlowRegisterTests(void);
@@ -133,7 +133,7 @@ static inline int FlowMatch(const uint32_t pflags, const uint8_t pflowflags,
  * \retval 0 no match
  * \retval 1 match
  */
-int DetectFlowMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+int DetectFlowMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
     SCEnter();
index efb946d66c3d2fddee534b94a675b54641876d96..651303bd0a4b8bdf68e74844329b4a9618a2f35e 100644 (file)
@@ -49,7 +49,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-int DetectFlowbitMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+int DetectFlowbitMatch (DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectFlowbitSetup (DetectEngineCtx *, Signature *, const char *);
 void DetectFlowbitFree (void *);
@@ -123,7 +123,7 @@ static int DetectFlowbitMatchIsnotset (Packet *p, const DetectFlowbitsData *fd)
  *        -1: error
  */
 
-int DetectFlowbitMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+int DetectFlowbitMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectFlowbitsData *fd = (const DetectFlowbitsData *)ctx;
index 59fb0d8faff5a2ee1e7b9a96f07e0f66484d4cc2..42d5a3b7a3077d16328272ca0eee2ed92ca08e57 100644 (file)
@@ -53,7 +53,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-int DetectFlowintMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+int DetectFlowintMatch(DetectEngineThreadCtx *, Packet *,
                        const Signature *, const SigMatchCtx *);
 static int DetectFlowintSetup(DetectEngineCtx *, Signature *, const char *);
 void DetectFlowintFree(void *);
@@ -86,7 +86,7 @@ void DetectFlowintRegister(void)
  * \retval 1 match, when a var is initialized well, add/substracted, or a true
  * condition
  */
-int DetectFlowintMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+int DetectFlowintMatch(DetectEngineThreadCtx *det_ctx,
                         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectFlowintData *sfd = (const DetectFlowintData *)ctx;
index 3025df14f167410ab4f6b18f51c37484e1ca6b61..18850cc39fd9ffc4950319745900557a8d9a5bf9 100644 (file)
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-int DetectFlowvarMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+int DetectFlowvarMatch (DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectFlowvarSetup (DetectEngineCtx *, Signature *, const char *);
-static int DetectFlowvarPostMatch(ThreadVars *tv, DetectEngineThreadCtx *det_ctx,
+static int DetectFlowvarPostMatch(DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx);
 static void DetectFlowvarDataFree(void *ptr);
 
@@ -96,7 +96,7 @@ static void DetectFlowvarDataFree(void *ptr)
  *        -1: error
  */
 
-int DetectFlowvarMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+int DetectFlowvarMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
     int ret = 0;
@@ -291,7 +291,7 @@ error:
  *  \param sm sigmatch containing the idx to store
  *  \retval 1 or -1 in case of error
  */
-static int DetectFlowvarPostMatch(ThreadVars *tv,
+static int DetectFlowvarPostMatch(
         DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
index a09041d3669137356f4d6051901819732401a76d..06e5efc375fb6870e2c6b345627aac955ef6f244 100644 (file)
@@ -68,7 +68,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectFragBitsMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectFragBitsMatch (DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectFragBitsSetup (DetectEngineCtx *, Signature *, const char *);
 static void DetectFragBitsFree(void *);
@@ -136,7 +136,7 @@ FragBitsMatch(const uint8_t pbits, const uint8_t modifier,
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectFragBitsMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectFragBitsMatch (DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     if (!ctx || !PKT_IS_IPV4(p) || PKT_IS_PSEUDOPKT(p))
@@ -496,7 +496,7 @@ static int FragBitsTestParse03 (void)
     sm->type = DETECT_FRAGBITS;
     sm->ctx = (SigMatchCtx *)de;
 
-    ret = DetectFragBitsMatch(&tv, NULL, p, NULL, sm->ctx);
+    ret = DetectFragBitsMatch(NULL, p, NULL, sm->ctx);
     FAIL_IF(ret == 0);
 
     FlowShutdown();
@@ -586,7 +586,7 @@ static int FragBitsTestParse04 (void)
     sm->type = DETECT_FRAGBITS;
     sm->ctx = (SigMatchCtx *)de;
 
-    ret = DetectFragBitsMatch(&tv, NULL, p, NULL, sm->ctx);
+    ret = DetectFragBitsMatch(NULL, p, NULL, sm->ctx);
     FAIL_IF(ret);
     SCFree(de);
     SCFree(sm);
index 052aa82ac38a3302a383b2809b478eb6f93a7184..7599703b4a3d8411deba24f5d42d418254ad5c9c 100644 (file)
@@ -44,7 +44,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectFragOffsetMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectFragOffsetMatch(DetectEngineThreadCtx *,
         Packet *, const Signature *, const SigMatchCtx *);
 static int DetectFragOffsetSetup(DetectEngineCtx *, Signature *, const char *);
 void DetectFragOffsetRegisterTests(void);
@@ -103,7 +103,7 @@ static inline int FragOffsetMatch(const uint16_t poffset, const uint8_t mode,
  * \retval 1 match
  *
  */
-static int DetectFragOffsetMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectFragOffsetMatch (DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     uint16_t frag = 0;
index 4f1eedaf019f489534a5c63be86a3b37bbcb127a..ef66ab80d0fb49e5be6b0e71c09bdbf523af05f2 100644 (file)
@@ -47,7 +47,7 @@
 #include "stream-tcp.h"
 #include "util-byte.h"
 
-static int DetectFtpbounceALMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectFtpbounceALMatch(DetectEngineThreadCtx *,
         Flow *, uint8_t, void *, void *,
         const Signature *, const SigMatchCtx *);
 
@@ -186,7 +186,7 @@ static int DetectFtpbounceMatchArgs(uint8_t *payload, uint16_t payload_len,
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectFtpbounceALMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectFtpbounceALMatch(DetectEngineThreadCtx *det_ctx,
         Flow *f, uint8_t flags,
         void *state, void *txv,
         const Signature *s, const SigMatchCtx *m)
index 1e186d7d31bcbab354cb85e52cacb8701b307e1d..b5c19b275fe2e57d901a4bd9330825c90ad97ed2 100644 (file)
@@ -42,7 +42,7 @@ static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
 /* Prototypes of functions registered in DetectFtpdataRegister below */
-static int DetectFtpdataMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectFtpdataMatch(DetectEngineThreadCtx *,
         Flow *, uint8_t, void *, void *,
         const Signature *, const SigMatchCtx *);
 static int DetectFtpdataSetup (DetectEngineCtx *, Signature *, const char *);
@@ -109,7 +109,7 @@ static int DetectEngineInspectFtpdataGeneric(ThreadVars *tv,
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectFtpdataMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectFtpdataMatch(DetectEngineThreadCtx *det_ctx,
         Flow *f, uint8_t flags,
         void *state, void *txv,
         const Signature *s, const SigMatchCtx *m)
index dfda9872061a726d01857ddf952e3b99057f5ad0..a231e52e6febc4860c4649993fed4285ffde61d3 100644 (file)
@@ -61,7 +61,7 @@ void DetectGeoipRegister(void)
 
 #include <GeoIP.h>
 
-static int DetectGeoipMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectGeoipMatch(DetectEngineThreadCtx *, Packet *,
                             const Signature *, const SigMatchCtx *);
 static int DetectGeoipSetup(DetectEngineCtx *, Signature *, const char *);
 static void DetectGeoipRegisterTests(void);
@@ -163,7 +163,7 @@ static int CheckGeoMatchIPv4(const DetectGeoipData *geoipdata, uint32_t ip)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectGeoipMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectGeoipMatch(DetectEngineThreadCtx *det_ctx,
                             Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectGeoipData *geoipdata = (const DetectGeoipData *)ctx;
index 76aa7fa2e0b99c44393cbf6f1f589a3b79f1ce6f..abc840188ba6a46e546c2c57c5b29c4da4ebfbea 100644 (file)
@@ -68,7 +68,7 @@ TODO:
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectHostbitMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectHostbitMatch (DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectHostbitSetup (DetectEngineCtx *, Signature *, const char *);
 void DetectHostbitFree (void *);
@@ -266,7 +266,7 @@ int DetectXbitMatchHost(Packet *p, const DetectXbitsData *xd)
  *        -1: error
  */
 
-static int DetectHostbitMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectHostbitMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectXbitsData *xd = (const DetectXbitsData *)ctx;
index 82da577c972714c49a4616a2651a4f0051af2080..499c1fedcb3fe2f4f4d09d5c3621b9f3950e4914 100644 (file)
@@ -43,7 +43,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectIcmpIdMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectIcmpIdMatch(DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectIcmpIdSetup(DetectEngineCtx *, Signature *, const char *);
 void DetectIcmpIdRegisterTests(void);
@@ -130,7 +130,7 @@ static inline _Bool GetIcmpId(Packet *p, uint16_t *id)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectIcmpIdMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectIcmpIdMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
     uint16_t pid;
index 27313df684f32fa52d07bc2356a3c9d9491fc8ce..e9875b5cb42977c7ee81640b4e6f3c3e5a4e72f3 100644 (file)
@@ -43,7 +43,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectIcmpSeqMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectIcmpSeqMatch(DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectIcmpSeqSetup(DetectEngineCtx *, Signature *, const char *);
 void DetectIcmpSeqRegisterTests(void);
@@ -132,7 +132,7 @@ static inline _Bool GetIcmpSeq(Packet *p, uint16_t *seq)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectIcmpSeqMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectIcmpSeqMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
     uint16_t seqn;
index 0faf45493416501ed2587e142d1cd5e3fa8ff8ec..40f5c70ba56a0d231839af1199e767437fccd08e 100644 (file)
@@ -46,7 +46,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectICodeMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectICodeMatch(DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectICodeSetup(DetectEngineCtx *, Signature *, const char *);
 void DetectICodeRegisterTests(void);
@@ -116,7 +116,7 @@ static inline int ICodeMatch(const uint8_t pcode, const uint8_t mode,
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectICodeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectICodeMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
     if (PKT_IS_PSEUDOPKT(p))
index c1010b2160473a43fcf90ece8209e11321e55cfe..235a09c61d77de317a9b72a6ea3f2cdfa581186a 100644 (file)
@@ -49,7 +49,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectIdMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectIdMatch (DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectIdSetup (DetectEngineCtx *, Signature *, const char *);
 void DetectIdRegisterTests(void);
@@ -88,7 +88,7 @@ void DetectIdRegister (void)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectIdMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectIdMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
                           const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectIdData *id_d = (const DetectIdData *)ctx;
index ed826b58e927a41b7fb965764b02399cf58d1168..952ef2100a69a66c2e663f257edd984abecd0193 100644 (file)
@@ -43,7 +43,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectIpOptsMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectIpOptsMatch (DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectIpOptsSetup (DetectEngineCtx *, Signature *, const char *);
 void IpOptsRegisterTests(void);
@@ -99,7 +99,7 @@ struct DetectIpOpts_ {
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectIpOptsMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectIpOptsMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectIpOptsData *de = (const DetectIpOptsData *)ctx;
@@ -287,7 +287,7 @@ static int IpOptsTestParse03 (void)
     sm->type = DETECT_IPOPTS;
     sm->ctx = (SigMatchCtx *)de;
 
-    ret = DetectIpOptsMatch(&tv, NULL, p, NULL, sm->ctx);
+    ret = DetectIpOptsMatch(NULL, p, NULL, sm->ctx);
 
     if(ret) {
         SCFree(p);
@@ -337,7 +337,7 @@ static int IpOptsTestParse04 (void)
     sm->type = DETECT_IPOPTS;
     sm->ctx = (SigMatchCtx *)de;
 
-    ret = DetectIpOptsMatch(&tv, NULL, p, NULL, sm->ctx);
+    ret = DetectIpOptsMatch(NULL, p, NULL, sm->ctx);
 
     if(ret) {
         SCFree(p);
index 765ceabdae39896fd4040215d18a254c4ee38ca1..be1a91afd74704000d383173a61ca1589006e452 100644 (file)
@@ -52,7 +52,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectIPRepMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectIPRepMatch (DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectIPRepSetup (DetectEngineCtx *, Signature *, const char *);
 void DetectIPRepFree (void *);
@@ -167,7 +167,7 @@ static inline int RepMatch(uint8_t op, uint8_t val1, uint8_t val2)
  *         1: match
  *        -1: error
  */
-static int DetectIPRepMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectIPRepMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectIPRepData *rd = (const DetectIPRepData *)ctx;
index 8546c92bcb56fe0d133ef190b5cd14e8e8df3d9e..5637cfabba6c75a07b15de49928c24a3ac4464ac 100644 (file)
@@ -46,7 +46,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectITypeMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectITypeMatch(DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectITypeSetup(DetectEngineCtx *, Signature *, const char *);
 void DetectITypeRegisterTests(void);
@@ -116,7 +116,7 @@ static inline int ITypeMatch(const uint8_t ptype, const uint8_t mode,
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectITypeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectITypeMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
     if (PKT_IS_PSEUDOPKT(p))
index fb61819544fcbd9b33a9bde6779e8f243bf3231e..60e937d1a23299ed3e1a58d709a6b608947cb032 100644 (file)
@@ -42,7 +42,7 @@ static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
 /* Prototypes of functions registered in DetectKrb5ErrCodeRegister below */
-static int DetectKrb5ErrCodeMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectKrb5ErrCodeMatch (DetectEngineThreadCtx *, Flow *,
                                    uint8_t, void *, void *, const Signature *,
                                    const SigMatchCtx *);
 static int DetectKrb5ErrCodeSetup (DetectEngineCtx *, Signature *, const char *);
@@ -108,7 +108,7 @@ static int DetectEngineInspectKRB5Generic(ThreadVars *tv,
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectKrb5ErrCodeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectKrb5ErrCodeMatch (DetectEngineThreadCtx *det_ctx,
                                    Flow *f, uint8_t flags, void *state,
                                    void *txv, const Signature *s,
                                    const SigMatchCtx *ctx)
index 9ec944970953757b111ea69ac4ad8dfb592ee52a..9f6132f2cc8af5ec95aaca94673b06b59ea7b792 100644 (file)
@@ -42,7 +42,7 @@ static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
 /* Prototypes of functions registered in DetectKrb5MsgTypeRegister below */
-static int DetectKrb5MsgTypeMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectKrb5MsgTypeMatch (DetectEngineThreadCtx *, Flow *,
                                    uint8_t, void *, void *, const Signature *,
                                    const SigMatchCtx *);
 static int DetectKrb5MsgTypeSetup (DetectEngineCtx *, Signature *, const char *);
@@ -108,7 +108,7 @@ static int DetectEngineInspectKRB5Generic(ThreadVars *tv,
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectKrb5MsgTypeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectKrb5MsgTypeMatch (DetectEngineThreadCtx *det_ctx,
                                    Flow *f, uint8_t flags, void *state,
                                    void *txv, const Signature *s,
                                    const SigMatchCtx *ctx)
index 90f1e1d0168af2de0ad46abadef985b7981216f8..5d8bc47f5a002ea2d74169314462b23f7aa75d52 100644 (file)
@@ -88,9 +88,9 @@ void DetectLuaRegister(void)
 
 #include "util-lua.h"
 
-static int DetectLuaMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectLuaMatch (DetectEngineThreadCtx *,
         Packet *, const Signature *, const SigMatchCtx *);
-static int DetectLuaAppTxMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectLuaAppTxMatch (DetectEngineThreadCtx *det_ctx,
                                 Flow *f, uint8_t flags,
                                 void *state, void *txv, const Signature *s,
                                 const SigMatchCtx *ctx);
@@ -319,7 +319,7 @@ int DetectLuaMatchBuffer(DetectEngineThreadCtx *det_ctx,
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectLuaMatch (ThreadVars *tv, DetectEngineThreadCtx *det_ctx,
+static int DetectLuaMatch (DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     SCEnter();
@@ -339,7 +339,7 @@ static int DetectLuaMatch (ThreadVars *tv, DetectEngineThreadCtx *det_ctx,
     else if (p->flowflags & FLOW_PKT_TOCLIENT)
         flags = STREAM_TOCLIENT;
 
-    LuaStateSetThreadVars(tlua->luastate, tv);
+    LuaStateSetThreadVars(tlua->luastate, det_ctx->tv);
 
     LuaExtensionsMatchSetup(tlua->luastate, lua, det_ctx,
             p->flow, p, flags);
@@ -451,7 +451,7 @@ static int DetectLuaMatch (ThreadVars *tv, DetectEngineThreadCtx *det_ctx,
     SCReturnInt(ret);
 }
 
-static int DetectLuaAppMatchCommon (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectLuaAppMatchCommon (DetectEngineThreadCtx *det_ctx,
         Flow *f, uint8_t flags, void *state,
         const Signature *s, const SigMatchCtx *ctx)
 {
@@ -564,12 +564,12 @@ static int DetectLuaAppMatchCommon (ThreadVars *t, DetectEngineThreadCtx *det_ct
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectLuaAppTxMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectLuaAppTxMatch (DetectEngineThreadCtx *det_ctx,
                                 Flow *f, uint8_t flags,
                                 void *state, void *txv, const Signature *s,
                                 const SigMatchCtx *ctx)
 {
-    return DetectLuaAppMatchCommon(t, det_ctx, f, flags, state, s, ctx);
+    return DetectLuaAppMatchCommon(det_ctx, f, flags, state, s, ctx);
 }
 
 #ifdef UNITTESTS
index 093f1b126ff08553c8c80f672c7fda310aa2871b..2ec6982b7ef2dbb37b634272bf4314a9fcc86d3e 100644 (file)
@@ -43,7 +43,7 @@ static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
 static int DetectMarkSetup (DetectEngineCtx *, Signature *, const char *);
-static int DetectMarkPacket(ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectMarkPacket(DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx);
 void DetectMarkDataFree(void *ptr);
 
@@ -214,7 +214,7 @@ void DetectMarkDataFree(void *ptr)
 }
 
 
-static int DetectMarkPacket(ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectMarkPacket(DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
 #ifdef NFQ
index 935c83074547a8522a6662bad88f8b105d019246..5fafcdc2a12cf09cd308b83d9d192012b6284c3c 100644 (file)
@@ -81,7 +81,7 @@ static int DetectEngineInspectNfsRequestGeneric(ThreadVars *tv,
         Flow *f, uint8_t flags, void *alstate,
         void *txv, uint64_t tx_id);
 
-static int DetectNfsProcedureMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectNfsProcedureMatch (DetectEngineThreadCtx *, Flow *,
                                    uint8_t, void *, void *, const Signature *,
                                    const SigMatchCtx *);
 
@@ -172,7 +172,7 @@ ProcedureMatch(const uint32_t procedure,
  * \retval 0 no match.
  * \retval 1 match.
  */
-static int DetectNfsProcedureMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectNfsProcedureMatch (DetectEngineThreadCtx *det_ctx,
                                    Flow *f, uint8_t flags, void *state,
                                    void *txv, const Signature *s,
                                    const SigMatchCtx *ctx)
index e39b4cdba21519f75c32edc330f8e6404020b2ee..908a2b4e58f9e12d58a1737e223d34a84544aff9 100644 (file)
@@ -81,7 +81,7 @@ static int DetectEngineInspectNfsRequestGeneric(ThreadVars *tv,
         Flow *f, uint8_t flags, void *alstate,
         void *txv, uint64_t tx_id);
 
-static int DetectNfsVersionMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectNfsVersionMatch (DetectEngineThreadCtx *, Flow *,
                                    uint8_t, void *, void *, const Signature *,
                                    const SigMatchCtx *);
 
@@ -169,7 +169,7 @@ VersionMatch(const uint32_t version,
  * \retval 0 no match.
  * \retval 1 match.
  */
-static int DetectNfsVersionMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectNfsVersionMatch (DetectEngineThreadCtx *det_ctx,
                                    Flow *f, uint8_t flags, void *state,
                                    void *txv, const Signature *s,
                                    const SigMatchCtx *ctx)
index 4546efbf70a338f6d20ac1f49fd9ca65e0965296..e2b4bd789af3e82411deb1f66ff1717bf31de3be 100644 (file)
@@ -40,7 +40,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectPktvarMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectPktvarMatch (DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectPktvarSetup (DetectEngineCtx *, Signature *, const char *);
 
@@ -61,7 +61,7 @@ void DetectPktvarRegister (void)
  *        -1: error
  */
 
-static int DetectPktvarMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectPktvarMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
     int ret = 0;
index 8e3b2aa707f1972973ca87aa2d8143d35278acb4..b17cb6d666a4deb5e5c5166cac4b45006ccf0dec 100644 (file)
@@ -62,8 +62,7 @@ extern int run_mode;
 static int DetectReplaceSetup(DetectEngineCtx *, Signature *, const char *);
 void DetectReplaceRegisterTests(void);
 
-static int DetectReplacePostMatch(ThreadVars *tv,
-        DetectEngineThreadCtx *det_ctx,
+static int DetectReplacePostMatch(DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx);
 
 void DetectReplaceRegister (void)
@@ -76,8 +75,7 @@ void DetectReplaceRegister (void)
     sigmatch_table[DETECT_REPLACE].flags = (SIGMATCH_QUOTES_MANDATORY|SIGMATCH_HANDLE_NEGATION);
 }
 
-static int DetectReplacePostMatch(ThreadVars *tv,
-        DetectEngineThreadCtx *det_ctx,
+static int DetectReplacePostMatch(DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     if (det_ctx->replist) {
index d40733f48d5a19f50dccb273551bc35d7454b72d..abd28dc25cb01bdb72cb23639404110e9a995b74 100644 (file)
@@ -48,7 +48,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectRpcMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectRpcMatch (DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectRpcSetup (DetectEngineCtx *, Signature *, const char *);
 void DetectRpcRegisterTests(void);
@@ -87,7 +87,7 @@ void DetectRpcRegister (void)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectRpcMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectRpcMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
     /* PrintRawDataFp(stdout, p->payload, p->payload_len); */
index 828157461b53a2e5ae91eef77871dce8884ce69f..61d7d32c2f3249df0f5106f307179e069ab83200 100644 (file)
@@ -37,7 +37,7 @@
 #include "util-unittest.h"
 #include "util-unittest-helper.h"
 
-static int DetectSameipMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectSameipMatch(DetectEngineThreadCtx *, Packet *,
                              const Signature *, const SigMatchCtx *);
 static int DetectSameipSetup(DetectEngineCtx *, Signature *, const char *);
 static void DetectSameipRegisterTests(void);
@@ -70,7 +70,7 @@ void DetectSameipRegister(void)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectSameipMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectSameipMatch(DetectEngineThreadCtx *det_ctx,
                              Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     return CMP_ADDR(&p->src, &p->dst) ? 1 : 0;
index 162826eddf3543abebae01676d6179e680ba6dda..cd78ede521fcabfdb16b2b7c8f9e3e82d4acf632 100644 (file)
@@ -58,7 +58,7 @@ static int DetectEngineInspectSNMPRequestGeneric(ThreadVars *tv,
         Flow *f, uint8_t flags, void *alstate,
         void *txv, uint64_t tx_id);
 
-static int DetectSNMPPduTypeMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectSNMPPduTypeMatch (DetectEngineThreadCtx *, Flow *,
                                    uint8_t, void *, void *, const Signature *,
                                    const SigMatchCtx *);
 
@@ -115,7 +115,7 @@ static int DetectEngineInspectSNMPRequestGeneric(ThreadVars *tv,
  * \retval 0 no match.
  * \retval 1 match.
  */
-static int DetectSNMPPduTypeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectSNMPPduTypeMatch (DetectEngineThreadCtx *det_ctx,
                                    Flow *f, uint8_t flags, void *state,
                                    void *txv, const Signature *s,
                                    const SigMatchCtx *ctx)
index e8180797f420a996cfadb1ab64ec04b0b4229c56..206045825c9b24559b2501cd29fb771d3041c486 100644 (file)
@@ -67,7 +67,7 @@ static int DetectEngineInspectSNMPRequestGeneric(ThreadVars *tv,
         Flow *f, uint8_t flags, void *alstate,
         void *txv, uint64_t tx_id);
 
-static int DetectSNMPVersionMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectSNMPVersionMatch (DetectEngineThreadCtx *, Flow *,
                                    uint8_t, void *, void *, const Signature *,
                                    const SigMatchCtx *);
 
@@ -156,7 +156,7 @@ VersionMatch(const uint32_t version,
  * \retval 0 no match.
  * \retval 1 match.
  */
-static int DetectSNMPVersionMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectSNMPVersionMatch (DetectEngineThreadCtx *det_ctx,
                                    Flow *f, uint8_t flags, void *state,
                                    void *txv, const Signature *s,
                                    const SigMatchCtx *ctx)
index a541d1cc4de26894d2dfab50a2280788f9853f22..3a76501c5a242635434572588444aeecc1e29c7e 100644 (file)
@@ -62,7 +62,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectSshVersionMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectSshVersionMatch (DetectEngineThreadCtx *,
         Flow *, uint8_t, void *, void *,
         const Signature *, const SigMatchCtx *);
 static int DetectSshVersionSetup (DetectEngineCtx *, Signature *, const char *);
@@ -101,7 +101,7 @@ void DetectSshVersionRegister(void)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectSshVersionMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectSshVersionMatch (DetectEngineThreadCtx *det_ctx,
         Flow *f, uint8_t flags, void *state, void *txv,
         const Signature *s, const SigMatchCtx *m)
 {
index 448429962baf3a9828437a4f60629ce25b617b4a..50d0f3fafa4b93d4dd6e68c1c8ef8552d3d1b386 100644 (file)
@@ -66,7 +66,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectSshSoftwareVersionMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectSshSoftwareVersionMatch (DetectEngineThreadCtx *,
         Flow *, uint8_t, void *, void *,
         const Signature *, const SigMatchCtx *);
 static int DetectSshSoftwareVersionSetup (DetectEngineCtx *, Signature *, const char *);
@@ -122,7 +122,7 @@ void DetectSshSoftwareVersionRegister(void)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectSshSoftwareVersionMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectSshSoftwareVersionMatch (DetectEngineThreadCtx *det_ctx,
         Flow *f, uint8_t flags, void *state, void *txv,
         const Signature *s, const SigMatchCtx *m)
 {
index 691ad8fcaf025b3fb3221f9e8e5bcb63226fc7da..babfed13da47526fed752afbbacf3823c31da39b 100644 (file)
@@ -59,7 +59,7 @@ static pcre_extra *parse_regex1_study;
 static pcre *parse_regex2;
 static pcre_extra *parse_regex2_study;
 
-static int DetectSslStateMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectSslStateMatch(DetectEngineThreadCtx *,
         Flow *, uint8_t, void *, void *,
         const Signature *, const SigMatchCtx *);
 static int DetectSslStateSetup(DetectEngineCtx *, Signature *, const char *);
@@ -128,7 +128,7 @@ static int InspectTlsGeneric(ThreadVars *tv,
  * \retval 1 Match.
  * \retval 0 No match.
  */
-static int DetectSslStateMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectSslStateMatch(DetectEngineThreadCtx *det_ctx,
         Flow *f, uint8_t flags, void *alstate, void *txv,
         const Signature *s, const SigMatchCtx *m)
 {
index ba205b817f10cca5b9a7f49f7491c1fde5edf72f..fabe77e8c121d138e49c53ced40b2d510e0bdfd9 100644 (file)
@@ -60,7 +60,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectSslVersionMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectSslVersionMatch(DetectEngineThreadCtx *,
         Flow *, uint8_t, void *, void *,
         const Signature *, const SigMatchCtx *);
 static int DetectSslVersionSetup(DetectEngineCtx *, Signature *, const char *);
@@ -98,7 +98,7 @@ void DetectSslVersionRegister(void)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectSslVersionMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectSslVersionMatch(DetectEngineThreadCtx *det_ctx,
         Flow *f, uint8_t flags, void *state, void *txv,
         const Signature *s, const SigMatchCtx *m)
 {
index 5607f868111b9f56485febcef6ee1738698d6880..b6c72c24f39827ca83587f3dba973cefd2907ee1 100644 (file)
@@ -44,7 +44,7 @@ static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
 /*prototypes*/
-static int DetectStreamSizeMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectStreamSizeMatch (DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectStreamSizeSetup (DetectEngineCtx *, Signature *, const char *);
 void DetectStreamSizeFree(void *);
@@ -124,7 +124,7 @@ static int DetectStreamSizeCompare (uint32_t diff, uint32_t stream_size, uint8_t
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectStreamSizeMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectStreamSizeMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
 
@@ -432,7 +432,7 @@ static int DetectStreamSizeParseTest03 (void)
     p->tcph = &tcph;
     sm.ctx = (SigMatchCtx*)sd;
 
-    result = DetectStreamSizeMatch(&tv, &dtx, p, &s, sm.ctx);
+    result = DetectStreamSizeMatch(&dtx, p, &s, sm.ctx);
     if (result == 0) {
         printf("result 0 != 1: ");
     }
@@ -492,7 +492,7 @@ static int DetectStreamSizeParseTest04 (void)
     p->ip4h = &ip4h;
     sm.ctx = (SigMatchCtx*)sd;
 
-    if (!DetectStreamSizeMatch(&tv, &dtx, p, &s, sm.ctx))
+    if (!DetectStreamSizeMatch(&dtx, p, &s, sm.ctx))
         result = 1;
 
     SCFree(p);
index f51113082fa6dfa024de7e98e68c53ada419bde8..cd735d43ae0ed98ab70aef8b0eb83d01a05c6432 100644 (file)
@@ -57,7 +57,7 @@ SC_ATOMIC_EXTERN(unsigned int, num_tags);
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectTagMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectTagMatch(DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectTagSetup(DetectEngineCtx *, Signature *, const char *);
 void DetectTagRegisterTests(void);
@@ -89,7 +89,7 @@ void DetectTagRegister(void)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectTagMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectTagMatch(DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectTagData *td = (const DetectTagData *)ctx;
index 94d8b1a0218622ab4c80f55d110a5084b7efbec8..313b79acfbc31566f12a71a14384b0ccc64ac395 100644 (file)
@@ -44,7 +44,7 @@
 
 /* prototypes */
 static int DetectAckSetup(DetectEngineCtx *, Signature *, const char *);
-static int DetectAckMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectAckMatch(DetectEngineThreadCtx *,
                           Packet *, const Signature *, const SigMatchCtx *);
 static void DetectAckRegisterTests(void);
 static void DetectAckFree(void *);
@@ -79,7 +79,7 @@ void DetectAckRegister(void)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectAckMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectAckMatch(DetectEngineThreadCtx *det_ctx,
                           Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectAckData *data = (const DetectAckData *)ctx;
index c8055b3395ade16048a1f1e5f6522dd5bea61c04..1312e62b88258f13833c5ae42ace413891cddbb6 100644 (file)
@@ -58,7 +58,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectFlagsMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectFlagsMatch (DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectFlagsSetup (DetectEngineCtx *, Signature *, const char *);
 static void DetectFlagsFree(void *);
@@ -140,7 +140,7 @@ static inline int FlagsMatch(const uint8_t pflags, const uint8_t modifier,
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectFlagsMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectFlagsMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
     SCEnter();
@@ -681,7 +681,7 @@ static int FlagsTestParse03 (void)
     sm->type = DETECT_FLAGS;
     sm->ctx = (SigMatchCtx *)de;
 
-    ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+    ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
 
     if(ret) {
         if (de) SCFree(de);
@@ -736,7 +736,7 @@ static int FlagsTestParse04 (void)
     sm->type = DETECT_FLAGS;
     sm->ctx = (SigMatchCtx *)de;
 
-    ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+    ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
 
     if(ret) {
         if (de) SCFree(de);
@@ -792,7 +792,7 @@ static int FlagsTestParse05 (void)
     sm->type = DETECT_FLAGS;
     sm->ctx = (SigMatchCtx *)de;
 
-    ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+    ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
 
     if(ret) {
         if (de) SCFree(de);
@@ -848,7 +848,7 @@ static int FlagsTestParse06 (void)
     sm->type = DETECT_FLAGS;
     sm->ctx = (SigMatchCtx *)de;
 
-    ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+    ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
 
     if(ret) {
         if (de) SCFree(de);
@@ -903,7 +903,7 @@ static int FlagsTestParse07 (void)
     sm->type = DETECT_FLAGS;
     sm->ctx = (SigMatchCtx *)de;
 
-    ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+    ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
 
     if(ret) {
         if (de) SCFree(de);
@@ -959,7 +959,7 @@ static int FlagsTestParse08 (void)
     sm->type = DETECT_FLAGS;
     sm->ctx = (SigMatchCtx *)de;
 
-    ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+    ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
 
     if(ret) {
         if (de) SCFree(de);
@@ -1014,7 +1014,7 @@ static int FlagsTestParse09 (void)
     sm->type = DETECT_FLAGS;
     sm->ctx = (SigMatchCtx *)de;
 
-    ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+    ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
 
     if(ret) {
         if (de) SCFree(de);
@@ -1069,7 +1069,7 @@ static int FlagsTestParse10 (void)
     sm->type = DETECT_FLAGS;
     sm->ctx = (SigMatchCtx *)de;
 
-    ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+    ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
 
     if(ret) {
         if (de) SCFree(de);
@@ -1124,7 +1124,7 @@ static int FlagsTestParse11 (void)
     sm->type = DETECT_FLAGS;
     sm->ctx = (SigMatchCtx *)de;
 
-    ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+    ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
 
     if(ret) {
         if (de) SCFree(de);
@@ -1182,7 +1182,7 @@ static int FlagsTestParse12 (void)
     sm->type = DETECT_FLAGS;
     sm->ctx = (SigMatchCtx *)de;
 
-    ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+    ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
 
     if(ret) {
         if (de) SCFree(de);
@@ -1267,7 +1267,7 @@ static int FlagsTestParse15(void)
     sm->type = DETECT_FLAGS;
     sm->ctx = (SigMatchCtx *)de;
 
-    ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+    ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
 
     if (ret) {
         if (de)
@@ -1320,7 +1320,7 @@ static int FlagsTestParse16(void)
     sm->type = DETECT_FLAGS;
     sm->ctx = (SigMatchCtx *)de;
 
-    ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+    ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
 
     if (ret) {
         if (de)
@@ -1376,7 +1376,7 @@ static int FlagsTestParse17(void)
     sm->type = DETECT_FLAGS;
     sm->ctx = (SigMatchCtx *)de;
 
-    ret = DetectFlagsMatch(&tv, NULL, p, NULL, sm->ctx);
+    ret = DetectFlagsMatch(NULL, p, NULL, sm->ctx);
 
     if (ret == 0) {
         if (de)
index 63c5242f34c1603434b6330fb0314a56d8e65215..c5790b908799e2a3541b1d5174443a02287c2207 100644 (file)
@@ -41,7 +41,7 @@
 #include "util-debug.h"
 
 static int DetectSeqSetup(DetectEngineCtx *, Signature *, const char *);
-static int DetectSeqMatch(ThreadVars *, DetectEngineThreadCtx *,
+static int DetectSeqMatch(DetectEngineThreadCtx *,
                           Packet *, const Signature *, const SigMatchCtx *);
 static void DetectSeqRegisterTests(void);
 static void DetectSeqFree(void *);
@@ -75,7 +75,7 @@ void DetectSeqRegister(void)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectSeqMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectSeqMatch(DetectEngineThreadCtx *det_ctx,
                           Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectSeqData *data = (const DetectSeqData *)ctx;
index 2e3fbd962cf7fc2631140f66fff310daa0e035b4..92665c880f0bef1e634db83af98c632179e6bc99 100644 (file)
@@ -47,7 +47,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectWindowMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectWindowMatch(DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectWindowSetup(DetectEngineCtx *, Signature *, const char *);
 void DetectWindowRegisterTests(void);
@@ -81,7 +81,7 @@ void DetectWindowRegister (void)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectWindowMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectWindowMatch(DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectWindowData *wd = (const DetectWindowData *)ctx;
index 6096d7387667a4dfd5a6a992d64431b2eb799eac..4aa0c58a063f2a433d2b28fab9e9e96a5d99adf5 100644 (file)
@@ -39,7 +39,7 @@ static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
 /* prototypes */
-static int DetectTcpmssMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectTcpmssMatch (DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectTcpmssSetup (DetectEngineCtx *, Signature *, const char *);
 void DetectTcpmssFree (void *);
@@ -97,7 +97,7 @@ static inline int TcpmssMatch(const uint16_t parg, const uint8_t mode,
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectTcpmssMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectTcpmssMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
 
index 0f41027ff10ba7c1f3c2de66b67687bd25552bed..5c410915dcd62b50d2faf251fd73b1efba6aab32 100644 (file)
@@ -39,7 +39,7 @@ static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
 /* Prototypes of functions registered in DetectTemplateRegister below */
-static int DetectTemplateMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectTemplateMatch (DetectEngineThreadCtx *,
         Packet *, const Signature *, const SigMatchCtx *);
 static int DetectTemplateSetup (DetectEngineCtx *, Signature *, const char *);
 static void DetectTemplateFree (void *);
@@ -86,7 +86,7 @@ void DetectTemplateRegister(void) {
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectTemplateMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectTemplateMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
                                 const Signature *s, const SigMatchCtx *ctx)
 {
     int ret = 0;
index d45684a3ad66bc90ab9a5801a6cfbb7b54817b23..e9b8d839658d3f41de88c78d51516a339408792d 100644 (file)
@@ -39,7 +39,7 @@ static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
 /* prototypes */
-static int DetectTemplate2Match (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectTemplate2Match (DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectTemplate2Setup (DetectEngineCtx *, Signature *, const char *);
 void DetectTemplate2Free (void *);
@@ -97,7 +97,7 @@ static inline int Template2Match(const uint8_t parg, const uint8_t mode,
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectTemplate2Match (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectTemplate2Match (DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
 
index 88949b56b18f3828f7dcda60dc1ae5415eb24e0a..505d9459b7be4a26e789ec9e77ee27ba744ff670 100644 (file)
@@ -64,7 +64,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectThresholdMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectThresholdMatch(DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectThresholdSetup(DetectEngineCtx *, Signature *, const char *);
 static void DetectThresholdFree(void *);
@@ -88,7 +88,7 @@ void DetectThresholdRegister(void)
     DetectSetupParseRegexes(PARSE_REGEX, &parse_regex, &parse_regex_study);
 }
 
-static int DetectThresholdMatch(ThreadVars *thv, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectThresholdMatch(DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
     return 1;
index f772d8979693ce1a59bbdcb202990ce29da56b3f..47a242d1e674ff9df44ffca0f1083edfc50cda54 100644 (file)
@@ -56,7 +56,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectTlsValidityMatch (ThreadVars *, DetectEngineThreadCtx *, Flow *,
+static int DetectTlsValidityMatch (DetectEngineThreadCtx *, Flow *,
                                    uint8_t, void *, void *, const Signature *,
                                    const SigMatchCtx *);
 
@@ -163,7 +163,7 @@ static int DetectEngineInspectTlsValidity(ThreadVars *tv,
  * \retval 0 no match.
  * \retval 1 match.
  */
-static int DetectTlsValidityMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectTlsValidityMatch (DetectEngineThreadCtx *det_ctx,
                                    Flow *f, uint8_t flags, void *state,
                                    void *txv, const Signature *s,
                                    const SigMatchCtx *ctx)
index da038d6a024d96f88f4eed2553dfcb4788607531..dfd2a517a1047ad109968282d8a0c99895e44448 100644 (file)
@@ -59,7 +59,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectTlsVersionMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectTlsVersionMatch (DetectEngineThreadCtx *,
         Flow *, uint8_t, void *, void *,
         const Signature *, const SigMatchCtx *);
 static int DetectTlsVersionSetup (DetectEngineCtx *, Signature *, const char *);
@@ -100,7 +100,7 @@ void DetectTlsVersionRegister (void)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectTlsVersionMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectTlsVersionMatch (DetectEngineThreadCtx *det_ctx,
         Flow *f, uint8_t flags, void *state, void *txv,
         const Signature *s, const SigMatchCtx *m)
 {
index e7ec14b582d4b063ab7ace7d78aaf24537a98e16..cd7caaf9ddb45872280f0ff04ec36cf08db8b80f 100644 (file)
@@ -74,28 +74,28 @@ static pcre_extra *issuerdn_parse_regex_study;
 static pcre *fingerprint_parse_regex;
 static pcre_extra *fingerprint_parse_regex_study;
 
-static int DetectTlsSubjectMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectTlsSubjectMatch (DetectEngineThreadCtx *,
         Flow *, uint8_t, void *, void *,
         const Signature *, const SigMatchCtx *);
 static int DetectTlsSubjectSetup (DetectEngineCtx *, Signature *, const char *);
 static void DetectTlsSubjectRegisterTests(void);
 static void DetectTlsSubjectFree(void *);
 
-static int DetectTlsIssuerDNMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectTlsIssuerDNMatch (DetectEngineThreadCtx *,
         Flow *, uint8_t, void *, void *,
         const Signature *, const SigMatchCtx *);
 static int DetectTlsIssuerDNSetup (DetectEngineCtx *, Signature *, const char *);
 static void DetectTlsIssuerDNRegisterTests(void);
 static void DetectTlsIssuerDNFree(void *);
 
-static int DetectTlsFingerprintMatch (ThreadVars *, DetectEngineThreadCtx *,
+static int DetectTlsFingerprintMatch (DetectEngineThreadCtx *,
         Flow *, uint8_t, void *, void *,
         const Signature *, const SigMatchCtx *);
 static int DetectTlsFingerprintSetup (DetectEngineCtx *, Signature *, const char *);
 static void DetectTlsFingerprintFree(void *);
 
 static int DetectTlsStoreSetup (DetectEngineCtx *, Signature *, const char *);
-static int DetectTlsStorePostMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectTlsStorePostMatch (DetectEngineThreadCtx *det_ctx,
         Packet *, const Signature *s, const SigMatchCtx *unused);
 
 static int g_tls_cert_list_id = 0;
@@ -177,7 +177,7 @@ void DetectTlsRegister (void)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectTlsSubjectMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectTlsSubjectMatch (DetectEngineThreadCtx *det_ctx,
         Flow *f, uint8_t flags, void *state, void *txv,
         const Signature *s, const SigMatchCtx *m)
 {
@@ -377,7 +377,7 @@ static void DetectTlsSubjectRegisterTests(void)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectTlsIssuerDNMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectTlsIssuerDNMatch (DetectEngineThreadCtx *det_ctx,
         Flow *f, uint8_t flags, void *state, void *txv,
         const Signature *s, const SigMatchCtx *m)
 {
@@ -641,7 +641,7 @@ error:
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectTlsFingerprintMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectTlsFingerprintMatch (DetectEngineThreadCtx *det_ctx,
         Flow *f, uint8_t flags, void *state, void *txv,
         const Signature *s, const SigMatchCtx *m)
 {
@@ -777,7 +777,7 @@ static int DetectTlsStoreSetup (DetectEngineCtx *de_ctx, Signature *s, const cha
 }
 
 /** \warning modifies Flow::alstate */
-static int DetectTlsStorePostMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx,
+static int DetectTlsStorePostMatch (DetectEngineThreadCtx *det_ctx,
         Packet *p, const Signature *s, const SigMatchCtx *unused)
 {
     SCEnter();
index 4f6c2339f018b4653a673cd078692cba50ea6e66..48bb43c9c5e4d4708e4591c0cab3468707e15cbd 100644 (file)
@@ -49,7 +49,7 @@ static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
 static int DetectTosSetup(DetectEngineCtx *, Signature *, const char *);
-static int DetectTosMatch(ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectTosMatch(DetectEngineThreadCtx *, Packet *,
                           const Signature *, const SigMatchCtx *);
 static void DetectTosRegisterTests(void);
 static void DetectTosFree(void *);
@@ -86,7 +86,7 @@ void DetectTosRegister(void)
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectTosMatch(ThreadVars *tv, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectTosMatch(DetectEngineThreadCtx *det_ctx, Packet *p,
                    const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectTosData *tosd = (const DetectTosData *)ctx;
index aee5122d3a49a1ee3af5ca95eed167bfc6c67052..00c57359f264f1defe5046082e7b9145a408dcea 100644 (file)
@@ -43,7 +43,7 @@ static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
 /* prototypes */
-static int DetectTtlMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *,
+static int DetectTtlMatch (DetectEngineThreadCtx *, Packet *,
         const Signature *, const SigMatchCtx *);
 static int DetectTtlSetup (DetectEngineCtx *, Signature *, const char *);
 void DetectTtlFree (void *);
@@ -102,7 +102,7 @@ static inline int TtlMatch(const uint8_t pttl, const uint8_t mode,
  * \retval 0 no match
  * \retval 1 match
  */
-static int DetectTtlMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p,
+static int DetectTtlMatch (DetectEngineThreadCtx *det_ctx, Packet *p,
         const Signature *s, const SigMatchCtx *ctx)
 {
     if (PKT_IS_PSEUDOPKT(p))
index e722193609501161104501161cc502119508a4a6..4e40636e3427218f0811e762e4f8dafce8c07b60 100644 (file)
@@ -57,7 +57,7 @@
 static pcre *parse_regex;
 static pcre_extra *parse_regex_study;
 
-static int DetectXbitMatch (ThreadVars *, DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *);
+static int DetectXbitMatch (DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *);
 static int DetectXbitSetup (DetectEngineCtx *, Signature *, const char *);
 void DetectXbitFree (void *);
 void XBitsRegisterTests(void);
@@ -161,7 +161,7 @@ static int DetectXbitMatchIPPair(Packet *p, const DetectXbitsData *xd)
  *        -1: error
  */
 
-static int DetectXbitMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p, const Signature *s, const SigMatchCtx *ctx)
+static int DetectXbitMatch (DetectEngineThreadCtx *det_ctx, Packet *p, const Signature *s, const SigMatchCtx *ctx)
 {
     const DetectXbitsData *fd = (const DetectXbitsData *)ctx;
     if (fd == NULL)
index d224747e17edddc31b315ab13470990831ac26de..7318aa0b30cb08f97fa70b63313b70dc070a45c1 100644 (file)
@@ -157,7 +157,7 @@ static void DetectRunPostMatch(ThreadVars *tv,
 
         while (1) {
             KEYWORD_PROFILING_START;
-            (void)sigmatch_table[smd->type].Match(tv, det_ctx, p, s, smd->ctx);
+            (void)sigmatch_table[smd->type].Match(det_ctx, p, s, smd->ctx);
             KEYWORD_PROFILING_END(det_ctx, smd->type, 1);
             if (smd->is_last)
                 break;
index c2117d7a4917c2b399df1d0f928b96726d6a7978..f5f90f68cb02fab4215d10b511eb226560e14f04 100644 (file)
@@ -1150,16 +1150,15 @@ typedef struct DetectEngineThreadCtx_ {
  */
 typedef struct SigTableElmt_ {
     /** Packet match function pointer */
-    int (*Match)(ThreadVars *, DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *);
+    int (*Match)(DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *);
 
     /** AppLayer TX match function pointer */
-    int (*AppLayerTxMatch)(ThreadVars *, DetectEngineThreadCtx *, Flow *,
+    int (*AppLayerTxMatch)(DetectEngineThreadCtx *, Flow *,
             uint8_t flags, void *alstate, void *txv,
             const Signature *, const SigMatchCtx *);
 
     /** File match function  pointer */
-    int (*FileMatch)(ThreadVars *,  /**< thread local vars */
-        DetectEngineThreadCtx *,
+    int (*FileMatch)(DetectEngineThreadCtx *,
         Flow *,                     /**< *LOCKED* flow */
         uint8_t flags, File *, const Signature *, const SigMatchCtx *);