static DetectEngineAppInspectionEngine *g_app_inspect_engines = NULL;
void DetectAppLayerInspectEngineRegister(AppProto alproto,
- uint32_t dir, int32_t sm_list,
- int (*Callback)(ThreadVars *tv,
- DetectEngineCtx *de_ctx,
- DetectEngineThreadCtx *det_ctx,
- const Signature *sig, Flow *f,
- uint8_t flags, void *alstate,
- void *tx, uint64_t tx_id))
+ uint32_t dir, int32_t sm_list, InspectEngineFuncPtr Callback)
{
if ((alproto >= ALPROTO_FAILED) ||
(!(dir == SIG_FLAG_TOSERVER || dir == SIG_FLAG_TOCLIENT)) ||
* \param Callback The engine callback.
*/
void DetectAppLayerInspectEngineRegister(AppProto alproto,
- uint32_t dir,
- int32_t sm_list,
- int (*Callback)(ThreadVars *tv,
- DetectEngineCtx *de_ctx,
- DetectEngineThreadCtx *det_ctx,
- const Signature *sig, Flow *f,
- uint8_t flags, void *alstate,
- void *tx, uint64_t tx_id));
+ uint32_t dir, int32_t sm_list, InspectEngineFuncPtr Callback);
int DetectEngineAppInspectionEngine2Signature(Signature *s);
struct DetectEngineThreadCtx_;// DetectEngineThreadCtx;
+typedef int (*InspectEngineFuncPtr)(ThreadVars *tv,
+ struct DetectEngineCtx_ *de_ctx, struct DetectEngineThreadCtx_ *det_ctx,
+ const struct Signature_ *sig, Flow *f, uint8_t flags, void *alstate,
+ void *tx, uint64_t tx_id);
+
typedef struct DetectEngineAppInspectionEngine_ {
AppProto alproto;
uint8_t dir;
* 3 Special value used by filestore sigs to indicate disabling
* filestore for the tx.
*/
- int (*Callback)(ThreadVars *tv,
- struct DetectEngineCtx_ *de_ctx, struct DetectEngineThreadCtx_ *det_ctx,
- const struct Signature_ *sig, Flow *f, uint8_t flags, void *alstate,
- void *tx, uint64_t tx_id);
+ InspectEngineFuncPtr Callback;
struct DetectEngineAppInspectionEngine_ *next;
} DetectEngineAppInspectionEngine;