@@ -813,6 +813,8 @@ int ndpi_init_empty_app_protocol(ndpi_protocol_match const * const hostname_list
813813 return 0 ;
814814}
815815
816+ /* ******************************************************************** */
817+
816818int ndpi_init_app_protocol (struct ndpi_detection_module_struct * ndpi_str ,
817819 ndpi_protocol_match const * const match ) {
818820 ndpi_port_range ports_a [MAX_DEFAULT_PORTS ], ports_b [MAX_DEFAULT_PORTS ];
@@ -1056,6 +1058,7 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
10561058 NDPI_PROTOCOL_MPEGDASH ,
10571059 NDPI_PROTOCOL_RTSP ,
10581060 NDPI_PROTOCOL_APACHE_THRIFT ,
1061+ NDPI_PROTOCOL_JSON_RPC ,
10591062 NDPI_PROTOCOL_MATCHED_BY_CONTENT ,
10601063 NDPI_PROTOCOL_NO_MORE_SUBPROTOCOLS ); /* NDPI_PROTOCOL_HTTP can have (content-matched) subprotocols */
10611064 ndpi_set_proto_defaults (ndpi_str , 1 /* cleartext */ , 0 /* nw proto */ , NDPI_PROTOCOL_ACCEPTABLE , NDPI_PROTOCOL_MDNS ,
@@ -2166,13 +2169,25 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
21662169 ndpi_build_default_ports (ports_a , 4880 , 0 , 0 , 0 , 0 ) /* TCP */ ,
21672170 ndpi_build_default_ports (ports_b , 0 , 0 , 0 , 0 , 0 ) /* UDP */ );
21682171 ndpi_set_proto_defaults (ndpi_str , 0 /* encrypted */ , 0 /* nw proto */ , NDPI_PROTOCOL_ACCEPTABLE , NDPI_PROTOCOL_UFTP ,
2169- "UFTP" , NDPI_PROTOCOL_CATEGORY_DOWNLOAD_FT ,
2170- ndpi_build_default_ports (ports_a , 0 , 0 , 0 , 0 , 0 ) /* TCP */ ,
2171- ndpi_build_default_ports (ports_b , 1044 , 0 , 0 , 0 , 0 ) /* UDP */ );
2172+ "UFTP" , NDPI_PROTOCOL_CATEGORY_DOWNLOAD_FT ,
2173+ ndpi_build_default_ports (ports_a , 0 , 0 , 0 , 0 , 0 ) /* TCP */ ,
2174+ ndpi_build_default_ports (ports_b , 1044 , 0 , 0 , 0 , 0 ) /* UDP */ );
21722175 ndpi_set_proto_defaults (ndpi_str , 1 /* cleartext */ , 0 /* nw proto */ , NDPI_PROTOCOL_ACCEPTABLE , NDPI_PROTOCOL_OPENFLOW ,
21732176 "OpenFlow" , NDPI_PROTOCOL_CATEGORY_NETWORK ,
21742177 ndpi_build_default_ports (ports_a , 6653 , 0 , 0 , 0 , 0 ) /* TCP */ ,
21752178 ndpi_build_default_ports (ports_b , 0 , 0 , 0 , 0 , 0 ) /* UDP */ );
2179+ ndpi_set_proto_defaults (ndpi_str , 1 /* cleartext */ , 0 /* nw proto */ , NDPI_PROTOCOL_ACCEPTABLE , NDPI_PROTOCOL_JSON_RPC ,
2180+ "JSON-RPC" , NDPI_PROTOCOL_CATEGORY_RPC ,
2181+ ndpi_build_default_ports (ports_a , 0 , 0 , 0 , 0 , 0 ) /* TCP */ ,
2182+ ndpi_build_default_ports (ports_b , 0 , 0 , 0 , 0 , 0 ) /* UDP */ );
2183+ ndpi_set_proto_defaults (ndpi_str , 1 /* cleartext */ , 0 /* nw proto */ , NDPI_PROTOCOL_ACCEPTABLE , NDPI_PROTOCOL_WEBDAV ,
2184+ "WebDAV" , NDPI_PROTOCOL_CATEGORY_COLLABORATIVE ,
2185+ ndpi_build_default_ports (ports_a , 0 , 0 , 0 , 0 , 0 ), /* TCP */
2186+ ndpi_build_default_ports (ports_b , 0 , 0 , 0 , 0 , 0 )); /* UDP */
2187+ ndpi_set_proto_defaults (ndpi_str , 1 /* cleartext */ , 0 /* nw proto */ , NDPI_PROTOCOL_ACCEPTABLE , NDPI_PROTOCOL_APACHE_KAFKA ,
2188+ "Kafka" , NDPI_PROTOCOL_CATEGORY_RPC ,
2189+ ndpi_build_default_ports (ports_a , 9092 , 0 , 0 , 0 , 0 ) /* TCP */ ,
2190+ ndpi_build_default_ports (ports_b , 0 , 0 , 0 , 0 , 0 ) /* UDP */ );
21762191
21772192#ifdef CUSTOM_NDPI_PROTOCOLS
21782193#include "../../../nDPI-custom/custom_ndpi_main.c"
@@ -5692,6 +5707,12 @@ static int ndpi_callback_init(struct ndpi_detection_module_struct *ndpi_str) {
56925707 /* OpenFlow */
56935708 init_openflow_dissector (ndpi_str , & a );
56945709
5710+ /* JSON-RPC */
5711+ init_json_rpc_dissector (ndpi_str , & a );
5712+
5713+ /* Apache Kafka */
5714+ init_kafka_dissector (ndpi_str , & a );
5715+
56955716#ifdef CUSTOM_NDPI_PROTOCOLS
56965717#include "../../../nDPI-custom/custom_ndpi_main_init.c"
56975718#endif
@@ -6949,6 +6970,7 @@ static void ndpi_reconcile_protocols(struct ndpi_detection_module_struct *ndpi_s
69496970 break ;
69506971
69516972 case NDPI_PROTOCOL_SYSLOG :
6973+ case NDPI_PROTOCOL_MDNS :
69526974 if (flow -> l4_proto == IPPROTO_UDP )
69536975 ndpi_unset_risk (ndpi_str , flow , NDPI_UNIDIRECTIONAL_TRAFFIC );
69546976 break ;
0 commit comments