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);
142 de = DetectMQTTQosParse(rawstr);
182 static int MQTTQosTestParse01 (
void)
186 de = DetectMQTTQosParse(
"0");
191 de = DetectMQTTQosParse(
" 0");
196 de = DetectMQTTQosParse(
"1");
201 de = DetectMQTTQosParse(
"2");
215 static int MQTTQosTestParse02 (
void)
218 de = DetectMQTTQosParse(
"3");
233 static int MQTTQosTestParse03 (
void)
236 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(* 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.
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.
void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr Callback, InspectionBufferGetDataPtr GetData)
register inspect engine at start up time
SigMatch * SigMatchAppendSMToList(DetectEngineCtx *de_ctx, Signature *s, uint16_t type, SigMatchCtx *ctx, const int list)
Append a SigMatch to the list type.
void(* RegisterTests)(void)