mirror of https://github.com/OISF/suricata
Add noalert keyword for use with sigs that are used for capturing only.
parent
63bb777100
commit
eaaeb30cd6
@ -0,0 +1,31 @@
|
|||||||
|
/* NOALERT part of the detection engine. */
|
||||||
|
|
||||||
|
#include "decode.h"
|
||||||
|
#include "detect.h"
|
||||||
|
#include "flow-var.h"
|
||||||
|
|
||||||
|
#include <pcre.h>
|
||||||
|
|
||||||
|
int DetectNoalertSetup (Signature *, SigMatch *, char *);
|
||||||
|
|
||||||
|
void DetectNoalertRegister (void) {
|
||||||
|
sigmatch_table[DETECT_NOALERT].name = "noalert";
|
||||||
|
sigmatch_table[DETECT_NOALERT].Match = NULL;
|
||||||
|
sigmatch_table[DETECT_NOALERT].Setup = DetectNoalertSetup;
|
||||||
|
sigmatch_table[DETECT_NOALERT].Free = NULL;
|
||||||
|
sigmatch_table[DETECT_NOALERT].RegisterTests = NULL;
|
||||||
|
|
||||||
|
sigmatch_table[DETECT_NOALERT].flags |= SIGMATCH_NOOPT;
|
||||||
|
}
|
||||||
|
|
||||||
|
int DetectNoalertSetup (Signature *s, SigMatch *m, char *nullstr)
|
||||||
|
{
|
||||||
|
if (nullstr != NULL) {
|
||||||
|
printf("DetectNoalertSetup: nocase has no value\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
s->flags |= SIG_FLAG_NOALERT;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef __DETECT_NOALERT_H__
|
||||||
|
#define __DETECT_NOALERT_H__
|
||||||
|
|
||||||
|
/* prototypes */
|
||||||
|
void DetectNoalertRegister (void);
|
||||||
|
|
||||||
|
#endif /* __DETECT_NOALERT_H__ */
|
||||||
|
|
||||||
Loading…
Reference in New Issue