Go to the documentation of this file.
37 static void DetectSidRegisterTests(
void);
58 id = strtoul(sidstr, &endptr, 10);
59 if (errno == ERANGE || endptr == NULL || *endptr !=
'\0') {
65 SCLogError(
"sid value too high, max %u", UINT_MAX);
73 SCLogError(
"duplicated 'sid' keyword detected");
86 static int SidTestParse01(
void)
100 static int SidTestParse02(
void)
112 static int SidTestParse03(
void)
118 de_ctx,
"alert tcp any any -> any any (content:\"ABC\"; sid:\";)"));
124 static int SidTestParse04(
void)
130 de_ctx,
"alert tcp any any -> any any (content:\"ABC\"; sid: 0;)"));
143 static void DetectSidRegisterTests(
void)
#define FAIL_IF_NULL(expr)
Fail a test if expression evaluates to NULL.
SigTableElmt * sigmatch_table
void DetectSidRegister(void)
void UtRegisterTest(const char *name, int(*TestFn)(void))
Register unit test.
main detection engine ctx
void DetectEngineCtxFree(DetectEngineCtx *)
Free a DetectEngineCtx::
#define SIGMATCH_SUPPORT_FIREWALL
Signature * DetectEngineAppendSig(DetectEngineCtx *, const char *)
Parse and append a Signature into the Detection Engine Context signature list.
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
#define FAIL_IF_NOT_NULL(expr)
Fail a test if expression evaluates to non-NULL.
#define PASS
Pass the test.
int(* Match)(DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *)
#define FAIL_IF(expr)
Fail a test if expression evaluates to true.
#define SCLogError(...)
Macro used to log ERROR messages.
DetectEngineCtx * DetectEngineCtxInit(void)
void(* RegisterTests)(void)