Go to the documentation of this file.
36 static int mqtt_qos_id = 0;
87 const uint8_t *
de = (
const uint8_t *)ctx;
92 return rs_mqtt_tx_has_qos(txv, *
de);
104 static uint8_t *DetectMQTTQosParse(
const char *rawstr)
112 SCLogError(
"invalid MQTT QOS level: %s", rawstr);
143 de = DetectMQTTQosParse(rawstr);
189 static int MQTTQosTestParse01 (
void)
193 de = DetectMQTTQosParse(
"0");
198 de = DetectMQTTQosParse(
" 0");
203 de = DetectMQTTQosParse(
"1");
208 de = DetectMQTTQosParse(
"2");
222 static int MQTTQosTestParse02 (
void)
225 de = DetectMQTTQosParse(
"3");
240 static int MQTTQosTestParse03 (
void)
243 de = DetectMQTTQosParse(
"12");
int DetectSignatureSetAppProto(Signature *s, AppProto alproto)
#define FAIL_IF_NULL(expr)
Fail a test if expression evaluates to NULL.
void DetectMQTTQosFree(DetectEngineCtx *de_ctx, void *)
void SigMatchAppendSMToList(Signature *s, SigMatch *new, const int list)
Append a SigMatch to the list type.
void(* Free)(DetectEngineCtx *, void *)
void DetectMQTTQosRegister(void)
Registration function for mqtt.qos: keyword.
void UtRegisterTest(const char *name, int(*TestFn)(void))
Register unit test.
void MQTTQosRegisterTests(void)
this function registers unit tests for MQTTQos
main detection engine ctx
int(* AppLayerTxMatch)(DetectEngineThreadCtx *, Flow *, uint8_t flags, void *alstate, void *txv, const Signature *, const SigMatchCtx *)
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
#define FAIL_IF_NOT(expr)
Fail a test if expression evaluates to false.
int DetectBufferTypeGetByName(const char *name)
#define SIG_FLAG_TOSERVER
#define PASS
Pass the test.
void DetectAppLayerInspectEngineRegister2(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr2 Callback2, InspectionBufferGetDataPtr GetData)
register inspect engine at start up time
SigMatch * SigMatchAlloc(void)
int StringParseU8RangeCheck(uint8_t *res, int base, size_t len, const char *str, uint8_t min, uint8_t max)
Used to start a pointer to SigMatch context Should never be dereferenced without casting to something...
SigTableElmt sigmatch_table[DETECT_TBLSIZE]
uint8_t DetectEngineInspectGenericList(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, const struct 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.
#define SCLogError(...)
Macro used to log ERROR messages.
a single match condition for a signature
void(* RegisterTests)(void)