From 831562c141a01f73676ac67df9df1e2ea1658e0d Mon Sep 17 00:00:00 2001
From: Luca Deri <deri@ntop.org>
Date: Mon, 13 Jun 2022 23:53:32 +0200
Subject: Restored ndpi_set_proto_defaults() prototype Updated test results

---
 src/include/ndpi_main.h |  8 ++++++++
 src/lib/ndpi_main.c     | 14 +++++++-------
 2 files changed, 15 insertions(+), 7 deletions(-)

(limited to 'src')

diff --git a/src/include/ndpi_main.h b/src/include/ndpi_main.h
index 80ed758c1..614d0aed4 100644
--- a/src/include/ndpi_main.h
+++ b/src/include/ndpi_main.h
@@ -139,6 +139,14 @@ extern "C" {
   int ndpi_handle_ipv6_extension_headers(u_int16_t l3len,
 					 const u_int8_t ** l4ptr, u_int16_t * l4len,
 					 u_int8_t * nxt_hdr);
+  
+  void ndpi_set_proto_defaults(struct ndpi_detection_module_struct *ndpi_str,
+			       u_int8_t is_cleartext, u_int8_t is_app_protocol,
+			       ndpi_protocol_breed_t breed,
+			       u_int16_t protoId, char *protoName,
+			       ndpi_protocol_category_t protoCategory,
+			       ndpi_port_range *tcpDefPorts,
+			       ndpi_port_range *udpDefPorts);    
   void ndpi_set_risk(struct ndpi_detection_module_struct *ndpi_str,
 		     struct ndpi_flow_struct *flow, ndpi_risk_enum r,
 		     char *risk_message);
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 1c6703a7d..544470da3 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -466,13 +466,13 @@ void ndpi_set_proto_subprotocols(struct ndpi_detection_module_struct *ndpi_str,
 
 /* ********************************************************************************** */
 
-static void ndpi_set_proto_defaults(struct ndpi_detection_module_struct *ndpi_str,
-				    u_int8_t is_cleartext, u_int8_t is_app_protocol,
-				    ndpi_protocol_breed_t breed,
-				    u_int16_t protoId, char *protoName,
-				    ndpi_protocol_category_t protoCategory,
-				    ndpi_port_range *tcpDefPorts,
-				    ndpi_port_range *udpDefPorts) {
+void ndpi_set_proto_defaults(struct ndpi_detection_module_struct *ndpi_str,
+			     u_int8_t is_cleartext, u_int8_t is_app_protocol,
+			     ndpi_protocol_breed_t breed,
+			     u_int16_t protoId, char *protoName,
+			     ndpi_protocol_category_t protoCategory,
+			     ndpi_port_range *tcpDefPorts,
+			     ndpi_port_range *udpDefPorts) {
   char *name;
   int j;
 
-- 
cgit v1.2.3