Go to the documentation of this file.
38 static void DetectQuicVersionRegisterTests(
void);
41 #define BUFFER_NAME "quic_version"
42 #define KEYWORD_NAME "quic.version"
43 #define KEYWORD_ID DETECT_AL_QUIC_VERSION
45 static int quic_version_id = 0;
56 const uint8_t *b = NULL;
58 if (rs_quic_tx_get_version(
txv, &b, &b_len) != 1)
60 if (b == NULL || b_len == 0)
126 static int QuicVersionTestParse01(
void)
132 de_ctx,
"alert ip any any -> any any (quic.version; content:\"Q046\"; sid:1; rev:1;)");
136 de_ctx,
"alert ip any any -> any any (quic.version; content:\"|00|\"; sid:2; rev:1;)");
150 static int QuicVersionTestParse03(
void)
156 de_ctx,
"alert ip any any -> any any (quic.version:; sid:1; rev:1;)");
167 void DetectQuicVersionRegisterTests(
void)
int DetectSignatureSetAppProto(Signature *s, AppProto alproto)
void DetectAppLayerMpmRegister2(const char *name, int direction, int priority, PrefilterRegisterFunc PrefilterRegister, InspectionBufferGetDataPtr GetData, AppProto alproto, int tx_min_progress)
register a MPM engine
#define FAIL_IF_NULL(expr)
Fail a test if expression evaluates to NULL.
#define SIGMATCH_INFO_STICKY_BUFFER
uint8_t DetectEngineInspectBufferGeneric(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, const DetectEngineAppInspectionEngine *engine, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id)
Do the content inspection & validation for a signature.
void UtRegisterTest(const char *name, int(*TestFn)(void))
Register unit test.
int DetectBufferSetActiveList(DetectEngineCtx *de_ctx, Signature *s, const int list)
main detection engine ctx
void DetectEngineCtxFree(DetectEngineCtx *)
Free a DetectEngineCtx::
Signature * DetectEngineAppendSig(DetectEngineCtx *, const char *)
Parse and append a Signature into the Detection Engine Context signature list.
#define SIG_FLAG_TOCLIENT
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
InspectionBuffer * InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id)
int DetectBufferTypeGetByName(const char *name)
#define SIG_FLAG_TOSERVER
#define FAIL_IF_NOT_NULL(expr)
Fail a test if expression evaluates to non-NULL.
#define PASS
Pass the test.
int PrefilterGenericMpmRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
void DetectAppLayerInspectEngineRegister2(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr2 Callback2, InspectionBufferGetDataPtr GetData)
register inspect engine at start up time
void InspectionBufferApplyTransforms(InspectionBuffer *buffer, const DetectEngineTransforms *transforms)
SigTableElmt sigmatch_table[DETECT_TBLSIZE]
void InspectionBufferSetup(DetectEngineThreadCtx *det_ctx, const int list_id, InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len)
setup the buffer with our initial data
void DetectQuicVersionRegister(void)
Registration function for quic.version: keyword.
DetectEngineCtx * DetectEngineCtxInit(void)
void(* RegisterTests)(void)