modbus detect: register inspect engine from keyword

pull/2310/head
Victor Julien 10 years ago
parent 2db094ab7a
commit 08d0fe0916

@ -47,7 +47,6 @@
#include "detect-engine-uri.h" #include "detect-engine-uri.h"
#include "detect-engine-hrhd.h" #include "detect-engine-hrhd.h"
#include "detect-engine-file.h" #include "detect-engine-file.h"
#include "detect-engine-modbus.h"
#include "detect-engine-template.h" #include "detect-engine-template.h"
#include "detect-engine.h" #include "detect-engine.h"
@ -123,10 +122,6 @@ void DetectEngineRegisterAppInspectionEngines(void)
{ ALPROTO_SMTP, { ALPROTO_SMTP,
DETECT_SM_LIST_FILEMATCH, DETECT_SM_LIST_FILEMATCH,
DetectFileInspectSmtp }, DetectFileInspectSmtp },
/* Modbus */
{ ALPROTO_MODBUS,
DETECT_SM_LIST_MODBUS_MATCH,
DetectEngineInspectModbus },
/* Template. */ /* Template. */
{ ALPROTO_TEMPLATE, { ALPROTO_TEMPLATE,
DETECT_SM_LIST_TEMPLATE_BUFFER_MATCH, DETECT_SM_LIST_TEMPLATE_BUFFER_MATCH,
@ -137,10 +132,6 @@ void DetectEngineRegisterAppInspectionEngines(void)
{ ALPROTO_HTTP, { ALPROTO_HTTP,
DETECT_SM_LIST_FILEMATCH, DETECT_SM_LIST_FILEMATCH,
DetectFileInspectHttp }, DetectFileInspectHttp },
/* Modbus */
{ ALPROTO_MODBUS,
DETECT_SM_LIST_MODBUS_MATCH,
DetectEngineInspectModbus },
/* Template. */ /* Template. */
{ ALPROTO_TEMPLATE, { ALPROTO_TEMPLATE,
DETECT_SM_LIST_TEMPLATE_BUFFER_MATCH, DETECT_SM_LIST_TEMPLATE_BUFFER_MATCH,

@ -45,8 +45,10 @@
#include "detect.h" #include "detect.h"
#include "detect-parse.h" #include "detect-parse.h"
#include "detect-engine.h"
#include "detect-modbus.h" #include "detect-modbus.h"
#include "detect-engine-modbus.h"
#include "util-debug.h" #include "util-debug.h"
@ -412,11 +414,16 @@ void DetectModbusRegister(void)
&function_parse_regex, &function_parse_regex_study); &function_parse_regex, &function_parse_regex_study);
DetectSetupParseRegexes(PARSE_REGEX_ACCESS, DetectSetupParseRegexes(PARSE_REGEX_ACCESS,
&access_parse_regex, &access_parse_regex_study); &access_parse_regex, &access_parse_regex_study);
DetectAppLayerInspectEngineRegister(ALPROTO_MODBUS, SIG_FLAG_TOSERVER,
DETECT_SM_LIST_MODBUS_MATCH,
DetectEngineInspectModbus);
DetectAppLayerInspectEngineRegister(ALPROTO_MODBUS, SIG_FLAG_TOCLIENT,
DETECT_SM_LIST_MODBUS_MATCH,
DetectEngineInspectModbus);
} }
#ifdef UNITTESTS /* UNITTESTS */ #ifdef UNITTESTS /* UNITTESTS */
#include "detect-engine.h"
#include "util-unittest.h" #include "util-unittest.h"
/** \test Signature containing a function. */ /** \test Signature containing a function. */

Loading…
Cancel
Save