detect/dnp3: convert to v2 inspect API

pull/5635/head
Victor Julien 5 years ago
parent 9f8a8f368a
commit cd146adef0

@ -176,12 +176,12 @@ static InspectionBuffer *GetDNP3Data(DetectEngineThreadCtx *det_ctx,
return buffer; return buffer;
} }
static int DetectEngineInspectDNP3(ThreadVars *tv, DetectEngineCtx *de_ctx, static int DetectEngineInspectDNP3(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
DetectEngineThreadCtx *det_ctx, const Signature *s, const SigMatchData *smd, const struct DetectEngineAppInspectionEngine_ *engine, const Signature *s, Flow *f,
Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id) uint8_t flags, void *alstate, void *txv, uint64_t tx_id)
{ {
return DetectEngineInspectGenericList(tv, de_ctx, det_ctx, s, smd, return DetectEngineInspectGenericList(
f, flags, alstate, txv, tx_id); NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id);
} }
/** /**
@ -601,12 +601,10 @@ void DetectDNP3Register(void)
DetectDNP3ObjRegister(); DetectDNP3ObjRegister();
/* Register the list of func, ind and obj. */ /* Register the list of func, ind and obj. */
DetectAppLayerInspectEngineRegister("dnp3", DetectAppLayerInspectEngineRegister2(
ALPROTO_DNP3, SIG_FLAG_TOSERVER, 0, "dnp3", ALPROTO_DNP3, SIG_FLAG_TOSERVER, 0, DetectEngineInspectDNP3, NULL);
DetectEngineInspectDNP3); DetectAppLayerInspectEngineRegister2(
DetectAppLayerInspectEngineRegister("dnp3", "dnp3", ALPROTO_DNP3, SIG_FLAG_TOCLIENT, 0, DetectEngineInspectDNP3, NULL);
ALPROTO_DNP3, SIG_FLAG_TOCLIENT, 0,
DetectEngineInspectDNP3);
g_dnp3_match_buffer_id = DetectBufferTypeRegister("dnp3"); g_dnp3_match_buffer_id = DetectBufferTypeRegister("dnp3");

Loading…
Cancel
Save