detect: remove Threadvars argument from API calls

Remove it as it's (almost) never used. If it is really needed it can
be accessed through DetectEngineThreadCtx::tv as well.
pull/3988/head
Victor Julien 7 years ago
parent c1dd4534d9
commit 14896365ef

@ -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;

@ -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)
{

@ -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;

@ -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);

@ -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;

@ -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,

@ -40,43 +40,43 @@
#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;

@ -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);
}

@ -56,10 +56,9 @@
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);
}

@ -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;

@ -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)
{

@ -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();

@ -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;

@ -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);

@ -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) {

@ -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;

@ -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) {

@ -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();

@ -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 *);

@ -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();

@ -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();

@ -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();

@ -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();

@ -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;

@ -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();

@ -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;

@ -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;

@ -45,10 +45,10 @@
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)
{

@ -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);

@ -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;

@ -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)

@ -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)

@ -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;

@ -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;

@ -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;

@ -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;

@ -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))

@ -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;

@ -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);

@ -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;

@ -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))

@ -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)

@ -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)

@ -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

@ -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

@ -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)

@ -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)

@ -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;

@ -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) {

@ -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); */

@ -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;

@ -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)

@ -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)

@ -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)
{

@ -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)
{

@ -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)
{

@ -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)
{

@ -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);

@ -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;

@ -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;

@ -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)

@ -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;

@ -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;

@ -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)
{

@ -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;

@ -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)
{

@ -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;

@ -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)

@ -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)
{

@ -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();

@ -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;

@ -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))

@ -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)

@ -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;

@ -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 *);

Loading…
Cancel
Save