aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/non_tcp_udp.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2022-06-15 12:25:26 +0200
committerGitHub <noreply@github.com>2022-06-15 12:25:26 +0200
commite2cc08bfe56dcd2738b684c44eb478cea352de4f (patch)
tree85e4ba68fe6823be2d255c49f55725d79174055a /src/lib/protocols/non_tcp_udp.c
parentd1773cc8e364bcc4934c6f577259c1098950c2c0 (diff)
Add support for PIM (Protocol Indipendent Multicast) protocol (#1599)
Close #1598
Diffstat (limited to 'src/lib/protocols/non_tcp_udp.c')
-rw-r--r--src/lib/protocols/non_tcp_udp.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/protocols/non_tcp_udp.c b/src/lib/protocols/non_tcp_udp.c
index 50e3a949b..9f3ced86e 100644
--- a/src/lib/protocols/non_tcp_udp.c
+++ b/src/lib/protocols/non_tcp_udp.c
@@ -89,6 +89,10 @@ void ndpi_search_in_non_tcp_udp(struct ndpi_detection_module_struct
set_protocol_and_bmask(NDPI_PROTOCOL_IP_ICMPV6);
break;
+ case NDPI_PIM_PROTOCOL_TYPE:
+ set_protocol_and_bmask(NDPI_PROTOCOL_IP_PIM);
+ break;
+
case 112:
set_protocol_and_bmask(NDPI_PROTOCOL_IP_VRRP);
break;
@@ -181,4 +185,12 @@ void init_non_tcp_udp_dissector(struct ndpi_detection_module_struct *ndpi_struct
NO_SAVE_DETECTION_BITMASK_AS_UNKNOWN,
ADD_TO_DETECTION_BITMASK);
*id += 1;
+
+ ndpi_set_bitmask_protocol_detection("IP_PIM", ndpi_struct, detection_bitmask, *id,
+ NDPI_PROTOCOL_IP_PIM,
+ ndpi_search_in_non_tcp_udp,
+ NDPI_SELECTION_BITMASK_PROTOCOL_IPV4_OR_IPV6,
+ NO_SAVE_DETECTION_BITMASK_AS_UNKNOWN,
+ ADD_TO_DETECTION_BITMASK);
+ *id += 1;
}