aboutsummaryrefslogtreecommitdiff
path: root/src/lib/ndpi_main.c
diff options
context:
space:
mode:
authorVladimir Gavrilov <105977161+0xA50C1A1@users.noreply.github.com>2023-12-16 15:30:21 +0300
committerGitHub <noreply@github.com>2023-12-16 13:30:21 +0100
commit0f3e6d832b3df7f6eb5ded0296142f6f93537022 (patch)
tree788dcb3e67ee27faef5c5f409229e9637b55c6b6 /src/lib/ndpi_main.c
parent8ea16ffd77d486cce4c4bb0d58d80b32d68a4f4f (diff)
Add PROFINET/IO protocol dissector (#2213)
* Add PROFINET/IO protocol dissector * Add LE (Little Endian) to the file name * Rework dissector * Remove redundant check
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r--src/lib/ndpi_main.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 9c327aa09..1620f6a57 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -1510,7 +1510,7 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_RPC,
"RPC", NDPI_PROTOCOL_CATEGORY_RPC,
- ndpi_build_default_ports(ports_a, 135, 0, 0, 0, 0) /* TCP */,
+ ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_NETFLOW,
"NetFlow", NDPI_PROTOCOL_CATEGORY_NETWORK,
@@ -2178,6 +2178,18 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
"Monero", NDPI_PROTOCOL_CATEGORY_CRYPTO_CURRENCY,
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
+ ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_DCERPC,
+ "DCERPC", NDPI_PROTOCOL_CATEGORY_RPC,
+ ndpi_build_default_ports(ports_a, 135, 0, 0, 0, 0) /* TCP */,
+ ndpi_build_default_ports(ports_b, 135, 0, 0, 0, 0) /* UDP */);
+ ndpi_set_proto_subprotocols(ndpi_str, NDPI_PROTOCOL_DCERPC,
+ NDPI_PROTOCOL_PROFINET_IO,
+ NDPI_PROTOCOL_MATCHED_BY_CONTENT,
+ NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS);
+ ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_PROFINET_IO,
+ "PROFINET_IO", NDPI_PROTOCOL_CATEGORY_IOT_SCADA,
+ ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
+ ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
#ifdef CUSTOM_NDPI_PROTOCOLS
#include "../../../nDPI-custom/custom_ndpi_main.c"
@@ -5666,6 +5678,9 @@ static int ndpi_callback_init(struct ndpi_detection_module_struct *ndpi_str) {
/* Monero Protocol */
init_monero_dissector(ndpi_str, &a);
+ /* PROFINET/IO */
+ init_profinet_io_dissector(ndpi_str, &a);
+
#ifdef CUSTOM_NDPI_PROTOCOLS
#include "../../../nDPI-custom/custom_ndpi_main_init.c"
#endif