aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/tplink_shp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/protocols/tplink_shp.c')
-rw-r--r--src/lib/protocols/tplink_shp.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/lib/protocols/tplink_shp.c b/src/lib/protocols/tplink_shp.c
index c4b68f71b..4961f5955 100644
--- a/src/lib/protocols/tplink_shp.c
+++ b/src/lib/protocols/tplink_shp.c
@@ -57,7 +57,7 @@ static void ndpi_search_tplink_shp(struct ndpi_detection_module_struct *ndpi_str
if (packet->payload_packet_len - offset < _TPLSHP_MIN_LEN)
{
- NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
+ NDPI_EXCLUDE_DISSECTOR(ndpi_struct, flow);
return;
}
@@ -72,7 +72,7 @@ static void ndpi_search_tplink_shp(struct ndpi_detection_module_struct *ndpi_str
if (b[0] != '{' || (b[1] != '}' && b[1] != '"'))
{
- NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
+ NDPI_EXCLUDE_DISSECTOR(ndpi_struct, flow);
return;
}
@@ -81,16 +81,10 @@ static void ndpi_search_tplink_shp(struct ndpi_detection_module_struct *ndpi_str
/* ***************************************************** */
-void init_tplink_shp_dissector(struct ndpi_detection_module_struct *ndpi_struct,
- u_int32_t *id)
+void init_tplink_shp_dissector(struct ndpi_detection_module_struct *ndpi_struct)
{
- ndpi_set_bitmask_protocol_detection("TPLINK SHP", ndpi_struct, *id,
- NDPI_PROTOCOL_TPLINK_SHP,
- ndpi_search_tplink_shp,
- NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_OR_UDP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION,
- SAVE_DETECTION_BITMASK_AS_UNKNOWN,
- ADD_TO_DETECTION_BITMASK
- );
-
- *id += 1;
+ register_dissector("TPLINK SHP", ndpi_struct,
+ ndpi_search_tplink_shp,
+ NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_OR_UDP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION,
+ 1, NDPI_PROTOCOL_TPLINK_SHP);
}