aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/modbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/protocols/modbus.c')
-rw-r--r--src/lib/protocols/modbus.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/lib/protocols/modbus.c b/src/lib/protocols/modbus.c
index d0b6bd593..e86fdf43c 100644
--- a/src/lib/protocols/modbus.c
+++ b/src/lib/protocols/modbus.c
@@ -61,20 +61,16 @@ static void ndpi_search_modbus_tcp(struct ndpi_detection_module_struct *ndpi_str
}
}
}
- NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
+ NDPI_EXCLUDE_DISSECTOR(ndpi_struct, flow);
}
-void init_modbus_dissector(struct ndpi_detection_module_struct *ndpi_struct,
- u_int32_t *id) {
-
- ndpi_set_bitmask_protocol_detection("Modbus", ndpi_struct, *id,
- NDPI_PROTOCOL_MODBUS,
- ndpi_search_modbus_tcp,
- NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION,
- SAVE_DETECTION_BITMASK_AS_UNKNOWN,
- ADD_TO_DETECTION_BITMASK);
- *id += 1;
+void init_modbus_dissector(struct ndpi_detection_module_struct *ndpi_struct) {
+
+ register_dissector("Modbus", ndpi_struct,
+ ndpi_search_modbus_tcp,
+ NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION,
+ 1, NDPI_PROTOCOL_MODBUS);
}