Skip to content

Commit

Permalink
modbus: move into app-layer/modbus
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonish committed Dec 3, 2023
1 parent 46a0df5 commit 99c4dbd
Show file tree
Hide file tree
Showing 11 changed files with 398 additions and 423 deletions.
12 changes: 6 additions & 6 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ noinst_HEADERS = \
app-layer-http2.h \
app-layer/ike/parser.h \
app-layer-krb5.h \
app-layer-modbus.h \
app-layer/modbus/parser.h \
app-layer-quic.h \
app-layer-mqtt.h \
app-layer-nfs-tcp.h \
Expand Down Expand Up @@ -240,7 +240,7 @@ noinst_HEADERS = \
detect-lua.h \
detect-mark.h \
detect-metadata.h \
detect-modbus.h \
app-layer/modbus/detect.h \
detect-quic-sni.h \
detect-quic-ua.h \
detect-quic-version.h \
Expand Down Expand Up @@ -415,7 +415,7 @@ noinst_HEADERS = \
app-layer/ike/logger.h \
output-json-krb5.h \
output-json-metadata.h \
output-json-modbus.h \
app-layer/modbus/logger.h \
output-json-quic.h \
output-json-mqtt.h \
output-json-netflow.h \
Expand Down Expand Up @@ -650,7 +650,7 @@ libsuricata_c_a_SOURCES = \
app-layer-http2.c \
app-layer/ike/parser.c \
app-layer-krb5.c \
app-layer-modbus.c \
app-layer/modbus/parser.c \
app-layer-quic.c \
app-layer-mqtt.c \
app-layer-nfs-tcp.c \
Expand Down Expand Up @@ -853,7 +853,7 @@ libsuricata_c_a_SOURCES = \
detect-lua-extensions.c \
detect-mark.c \
detect-metadata.c \
detect-modbus.c \
app-layer/modbus/detect.c \
detect-quic-sni.c \
detect-quic-ua.c \
detect-quic-version.c \
Expand Down Expand Up @@ -1027,7 +1027,7 @@ libsuricata_c_a_SOURCES = \
app-layer/ike/logger.c \
output-json-krb5.c \
output-json-metadata.c \
output-json-modbus.c \
app-layer/modbus/logger.c \
output-json-quic.c \
output-json-mqtt.c \
output-json-netflow.c \
Expand Down
2 changes: 1 addition & 1 deletion src/app-layer-parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include "app-layer-htp.h"
#include "app-layer-ssl.h"
#include "app-layer-ssh.h"
#include "app-layer-modbus.h"
#include "app-layer/modbus/parser.h"
#include "app-layer-enip.h"
#include "app-layer/dnp3/app-layer-dnp3.h"
#include "app-layer-nfs-tcp.h"
Expand Down
5 changes: 3 additions & 2 deletions src/detect-modbus.c → src/app-layer/modbus/detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#include "detect-parse.h"
#include "detect-engine.h"

#include "detect-modbus.h"
#include "app-layer/modbus/detect.h"

#include "util-debug.h"
#include "util-byte.h"
Expand All @@ -63,7 +63,8 @@ static int g_modbus_buffer_id = 0;
*
* \param ptr pointer to DetectModbus
*/
static void DetectModbusFree(DetectEngineCtx *de_ctx, void *ptr) {
static void DetectModbusFree(DetectEngineCtx *de_ctx, void *ptr)
{
SCEnter();
if (ptr != NULL) {
rs_modbus_free(ptr);
Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions src/output-json-modbus.c → src/app-layer/modbus/logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include "suricata-common.h"
#include "detect.h"
#include "pkt-var.h"
#include "conf.h"
#include "threads.h"
#include "threadvars.h"
Expand All @@ -30,7 +29,7 @@
#include "output-json.h"
#include "app-layer.h"
#include "app-layer-parser.h"
#include "output-json-modbus.h"
#include "app-layer/modbus/logger.h"
#include "rust.h"

typedef struct LogModbusFileCtx_ {
Expand Down
File renamed without changes.
793 changes: 384 additions & 409 deletions src/app-layer-modbus.c → src/app-layer/modbus/parser.c

Large diffs are not rendered by default.

File renamed without changes.
2 changes: 1 addition & 1 deletion src/detect-engine-register.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@
#include "detect-http-stat-code.h"
#include "detect-ssl-version.h"
#include "detect-ssl-state.h"
#include "detect-modbus.h"
#include "app-layer/modbus/detect.h"
#include "detect-cipservice.h"
#include "app-layer/dnp3/detect-dnp3.h"
#include "app-layer/ike/detect-exch-type.h"
Expand Down
2 changes: 1 addition & 1 deletion src/output-json-alert.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
#include "output-json-rfb.h"
#include "output-json-mqtt.h"
#include "app-layer/ike/logger.h"
#include "output-json-modbus.h"
#include "app-layer/modbus/logger.h"
#include "output-json-frame.h"
#include "output-json-quic.h"

Expand Down
2 changes: 1 addition & 1 deletion src/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#include "log-httplog.h"
#include "output-json-http.h"
#include "output-json-dns.h"
#include "output-json-modbus.h"
#include "app-layer/modbus/logger.h"
#include "log-tlslog.h"
#include "log-tlsstore.h"
#include "output-json-tls.h"
Expand Down

0 comments on commit 99c4dbd

Please sign in to comment.