Have a clear distinction between public and private/internal API (#2137)

1) Public API/headers in `src/include/` [as it has always been]
2) Private API/headers in `src/lib/`

Try to keep the "ndpi_" prefix only for the public functions
This commit is contained in:
Ivan Nardi
2023-11-09 10:50:59 +01:00
committed by GitHub
parent 0673da54b5
commit b08c787fe2
206 changed files with 621 additions and 424 deletions
+1
View File
@@ -24,6 +24,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_ACTIVISION
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_activision_add_connection(struct ndpi_detection_module_struct * const ndpi_struct,
struct ndpi_flow_struct * const flow)
+1
View File
@@ -28,6 +28,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_AFP
#include "ndpi_api.h"
#include "ndpi_private.h"
struct afpHeader {
u_int8_t flags, command;
+1
View File
@@ -25,6 +25,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_AJP
#include "ndpi_api.h"
#include "ndpi_private.h"
enum ajp_direction {
AJP_SERVER_TO_CONTAINER = 0x1234,
+1
View File
@@ -24,6 +24,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_ALICLOUD
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_alicloud_add_connection(struct ndpi_detection_module_struct * const ndpi_struct,
struct ndpi_flow_struct * const flow)
+1
View File
@@ -26,6 +26,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_AMAZON_VIDEO
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_check_amazon_video(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow) {
+1
View File
@@ -23,6 +23,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_AMONG_US
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_among_us_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow)
+1
View File
@@ -23,6 +23,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_AMQP
#include "ndpi_api.h"
#include "ndpi_private.h"
PACK_ON
+1
View File
@@ -26,6 +26,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_APPLE_PUSH
#include "ndpi_api.h"
#include "ndpi_private.h"
static int is_apple_push_addr(const struct ndpi_packet_struct *packet)
{
+1
View File
@@ -27,6 +27,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_ARMAGETRON
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_armagetron_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
+1
View File
@@ -24,6 +24,7 @@
#include <stdlib.h>
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_avast_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow)
+1
View File
@@ -24,6 +24,7 @@
#include <stdlib.h>
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_avast_securedns_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow)
+1
View File
@@ -26,6 +26,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_BACNET
#include "ndpi_api.h"
#include "ndpi_private.h"
// BVLC (BACnet Virtual Link Control) Annex is part of BVLL (BACnet Virtual Link Layer).
// See: https://www.ashrae.org/file%20library/technical%20resources/standards%20and%20guidelines/standards%20addenda/135-1995_addendum-a.pdf
+1
View File
@@ -26,6 +26,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_BGP
#include "ndpi_api.h"
#include "ndpi_private.h"
/* this detection also works asymmetrically */
+1
View File
@@ -23,6 +23,7 @@
#include "ndpi_protocol_ids.h"
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_BITCOIN
#include "ndpi_api.h"
#include "ndpi_private.h"
/*https://en.bitcoin.it/wiki/Protocol_documentation*/
#define MAIN_NET_MAGIC 0xF9BEB4D9
+2 -3
View File
@@ -28,6 +28,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_BITTORRENT
#include "ndpi_api.h"
#include "ndpi_private.h"
#define BITTORRENT_PROTO_STRING "BitTorrent protocol"
@@ -40,8 +41,6 @@ struct ndpi_utp_hdr {
u_int16_t sequence_nr, ack_nr;
};
extern int ndpi_search_into_bittorrent_cache(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow);
/* Forward declaration */
static void ndpi_search_bittorrent(struct ndpi_detection_module_struct *ndpi_struct,
@@ -467,7 +466,7 @@ static u_int8_t is_port(u_int16_t a, u_int16_t b, u_int16_t what) {
static void ndpi_skip_bittorrent(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
struct ndpi_packet_struct *packet) {
if(ndpi_search_into_bittorrent_cache(ndpi_struct, flow))
if(search_into_bittorrent_cache(ndpi_struct, flow))
ndpi_add_connection_as_bittorrent(ndpi_struct, flow, -1, 0, NDPI_CONFIDENCE_DPI_CACHE);
else
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
+1
View File
@@ -3,6 +3,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_BJNP
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_bjnp_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
+1
View File
@@ -26,6 +26,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_CAN
#include "ndpi_api.h"
#include "ndpi_private.h"
PACK_ON
struct can_hdr {
+1
View File
@@ -24,6 +24,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_CAPWAP
#include "ndpi_api.h"
#include "ndpi_private.h"
#define NDPI_CAPWAP_CONTROL_PORT 5246
#define NDPI_CAPWAP_DATA_PORT 5247
+1
View File
@@ -24,6 +24,7 @@
#include "ndpi_protocol_ids.h"
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_CASSANDRA
#include "ndpi_api.h"
#include "ndpi_private.h"
#define CASSANDRA_HEADER_LEN 9
#define CASSANDRA_MAX_BODY_SIZE 268435456 //256MB (256 * 1024^2)
+1
View File
@@ -26,6 +26,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_CHECKMK
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_checkmk_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
+1
View File
@@ -25,6 +25,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_CISCOVPN
#include "ndpi_api.h"
#include "ndpi_private.h"
/* ****************************************************************** */
+1
View File
@@ -26,6 +26,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_CITRIX
#include "ndpi_api.h"
#include "ndpi_private.h"
/* ************************************ */
+1
View File
@@ -26,6 +26,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_COAP
#include "ndpi_api.h"
#include "ndpi_private.h"
#define CON 0
+1
View File
@@ -24,6 +24,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_COLLECTD
#include "ndpi_api.h"
#include "ndpi_private.h"
#define COLLECTD_MIN_BLOCKS_REQUIRED 3
#define COLLECTD_MAX_BLOCKS_TO_DISSECT 5
+1
View File
@@ -23,6 +23,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_CORBA
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_corba_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
+1
View File
@@ -28,6 +28,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_CPHA
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_search_cpha(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
+1
View File
@@ -26,6 +26,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_CROSSFIRE
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_crossfire_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
+1
View File
@@ -24,6 +24,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_CRYNET
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_crynet_add_connection(struct ndpi_detection_module_struct * const ndpi_struct,
struct ndpi_flow_struct * const flow)
+1
View File
@@ -25,6 +25,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_CSGO
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_search_csgo(struct ndpi_detection_module_struct* ndpi_struct, struct ndpi_flow_struct* flow) {
struct ndpi_packet_struct* packet = &ndpi_struct->packet;
+1
View File
@@ -26,6 +26,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_RPC
#include "ndpi_api.h"
#include "ndpi_private.h"
#include <stdbool.h>
static void ndpi_int_dcerpc_add_connection(struct ndpi_detection_module_struct
+1
View File
@@ -23,6 +23,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_DHCP
#include "ndpi_api.h"
#include "ndpi_private.h"
/* freeradius/src/lib/dhcp.c */
#define DHCP_CHADDR_LEN 6
+1
View File
@@ -27,6 +27,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_DHCPV6
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_dhcpv6_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
+1
View File
@@ -27,6 +27,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_DIAMETER
#include "ndpi_api.h"
#include "ndpi_private.h"
// Header Flags possibile values
+1
View File
@@ -24,6 +24,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_DISCORD
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_discord_add_connection(struct ndpi_detection_module_struct * const ndpi_struct,
struct ndpi_flow_struct * const flow)
+1
View File
@@ -23,6 +23,7 @@
#include "ndpi_protocol_ids.h"
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_DNP3
#include "ndpi_api.h"
#include "ndpi_private.h"
/*
https://www.ixiacom.com/company/blog/scada-distributed-network-protocol-dnp3
+2 -3
View File
@@ -26,6 +26,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_DNS
#include "ndpi_api.h"
#include "ndpi_private.h"
#define FLAGS_MASK 0x8000
@@ -37,8 +38,6 @@
#define PKT_LEN_ALERT 512
/* ndpi_main.c */
extern u_int8_t ndpi_iph_is_valid_and_not_fragmented(const struct ndpi_iphdr *iph, const u_int16_t ipsize);
static void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow);
@@ -869,7 +868,7 @@ static void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, st
/* 0: fragmented; 1: not fragmented */
if((flags & 0x20)
|| (ndpi_iph_is_valid_and_not_fragmented(packet->iph, packet->l3_packet_len) == 0)) {
|| (iph_is_valid_and_not_fragmented(packet->iph, packet->l3_packet_len) == 0)) {
ndpi_set_risk(ndpi_struct, flow, NDPI_DNS_FRAGMENTED, NULL);
}
} else if(packet->iphv6 != NULL) {
+1
View File
@@ -23,6 +23,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_DNSCRYPT
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_dnscrypt_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow)
+1
View File
@@ -27,6 +27,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_DOFUS
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_dofus_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
+1
View File
@@ -22,6 +22,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_DRDA
#include "ndpi_api.h"
#include "ndpi_private.h"
struct ndpi_drda_hdr {
u_int16_t length;
+1
View File
@@ -26,6 +26,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_DROPBOX
#include "ndpi_api.h"
#include "ndpi_private.h"
#define DB_LSP_PORT 17500
+1
View File
@@ -30,6 +30,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_EAQ
#include "ndpi_api.h"
#include "ndpi_private.h"
#define EAQ_DEFAULT_PORT 6000
#define EAQ_DEFAULT_SIZE 16
+1
View File
@@ -28,6 +28,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_EDONKEY
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_edonkey_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
+1
View File
@@ -24,6 +24,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_ELASTICSEARCH
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_elasticsearch_add_connection(struct ndpi_detection_module_struct * const ndpi_struct,
struct ndpi_flow_struct * const flow)
+1
View File
@@ -24,6 +24,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_EPICGAMES
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_epicgames_add_connection(struct ndpi_detection_module_struct * const ndpi_struct,
struct ndpi_flow_struct * const flow)
+1
View File
@@ -23,6 +23,7 @@
#include "ndpi_protocol_ids.h"
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_ETHEREUM
#include "ndpi_api.h"
#include "ndpi_private.h"
/* ************************************************************************** */
+1
View File
@@ -23,6 +23,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_ETHERNET_IP
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_ethernet_ip_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow) {
+1
View File
@@ -24,6 +24,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_FASTCGI
#include "ndpi_api.h"
#include "ndpi_private.h"
/* Reference: http://www.mit.edu/~yandros/doc/specs/fcgi-spec.html */
+1
View File
@@ -26,6 +26,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_FIX
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_search_fix(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1 -4
View File
@@ -26,13 +26,10 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_FTP_CONTROL
#include "ndpi_api.h"
#include "ndpi_private.h"
// #define FTP_DEBUG
extern void switch_extra_dissection_to_tls(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow);
/* *************************************************************** */
static void ndpi_int_ftp_control_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow) {
+1
View File
@@ -28,6 +28,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_FTP_DATA
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_ftp_data_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_FTP_DATA, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI);
+1
View File
@@ -23,6 +23,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_GENSHIN_IMPACT
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_genshin_impact_add_connection(
+1
View File
@@ -23,6 +23,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_GIT
#include "ndpi_api.h"
#include "ndpi_private.h"
#define GIT_PORT 9418
+1
View File
@@ -27,6 +27,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_GNUTELLA
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_gnutella_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
+1
View File
@@ -23,6 +23,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_GTP
#include "ndpi_api.h"
#include "ndpi_private.h"
/* This code handles: GTP-U (port 2152), GTP-C (v1 and v2; port 2123) and GTP-PRIME
+1
View File
@@ -27,6 +27,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_GUILDWARS
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_guildwars_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1
View File
@@ -24,6 +24,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_H323
#include "ndpi_api.h"
#include "ndpi_private.h"
struct tpkt {
+1
View File
@@ -28,6 +28,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_HALFLIFE2
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_halflife2_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
+1
View File
@@ -22,6 +22,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_HAPROXY
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_haproxy_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
+1
View File
@@ -26,6 +26,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_HOTS
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_hots_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
+1
View File
@@ -23,6 +23,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_HPVIRTGRP
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_hpvirtgrp_add_connection(
+1
View File
@@ -27,6 +27,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_HSRP
#include "ndpi_api.h"
#include "ndpi_private.h"
#define HSRP_PORT 1985
#define HSRP_PORT_V6 2029
+1 -3
View File
@@ -28,6 +28,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_HTTP
#include "ndpi_api.h"
#include "ndpi_private.h"
static const char* binary_file_mimes_e[] = { "exe", NULL };
static const char* binary_file_mimes_j[] = { "java-vm", NULL };
@@ -46,9 +47,6 @@ static const char* binary_file_ext[] = {
NULL
};
extern void ookla_add_to_cache(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow);
static void ndpi_search_http_tcp(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow);
static void ndpi_check_http_header(struct ndpi_detection_module_struct *ndpi_struct,
+1
View File
@@ -24,6 +24,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_HTTP2
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_http2_add_connection(struct ndpi_detection_module_struct * const ndpi_struct,
struct ndpi_flow_struct * const flow)
+1
View File
@@ -24,6 +24,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_I3D
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_i3d_add_connection(struct ndpi_detection_module_struct * const ndpi_struct,
struct ndpi_flow_struct * const flow)
+1
View File
@@ -28,6 +28,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_IAX
#include "ndpi_api.h"
#include "ndpi_private.h"
#define NDPI_IAX_MAX_INFORMATION_ELEMENTS 15
+3 -5
View File
@@ -27,9 +27,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_ICECAST
#include "ndpi_api.h"
extern int ndpi_current_pkt_from_client_to_server(const struct ndpi_detection_module_struct *ndpi_str, const struct ndpi_flow_struct *flow);
extern int ndpi_current_pkt_from_server_to_client(const struct ndpi_detection_module_struct *ndpi_str, const struct ndpi_flow_struct *flow);
#include "ndpi_private.h"
static void ndpi_int_icecast_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
@@ -63,12 +61,12 @@ static void ndpi_search_icecast_tcp(struct ndpi_detection_module_struct *ndpi_st
}
}
if(ndpi_current_pkt_from_client_to_server(ndpi_struct, flow)
if(current_pkt_from_client_to_server(ndpi_struct, flow)
&& (flow->packet_counter < 10)) {
return;
}
if(ndpi_current_pkt_from_server_to_client(ndpi_struct, flow)) {
if(current_pkt_from_server_to_client(ndpi_struct, flow)) {
/* server answer, now test Server for Icecast */
ndpi_parse_packet_line_info(ndpi_struct, flow);
+1
View File
@@ -27,6 +27,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_IEC60870
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_search_iec60870_tcp(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow) {
+1
View File
@@ -26,6 +26,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_IMO
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_imo_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow) {
+1
View File
@@ -27,6 +27,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_IPP
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_ipp_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
+1
View File
@@ -23,6 +23,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_IPSEC
#include "ndpi_api.h"
#include "ndpi_private.h"
enum isakmp_type {
ISAKMP_INVALID = 0,
+1
View File
@@ -28,6 +28,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_IRC
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_irc_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow, ndpi_confidence_t confidence)
{
+1
View File
@@ -27,6 +27,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_JABBER
#include "ndpi_api.h"
#include "ndpi_private.h"
struct jabber_string {
char *string;
+1
View File
@@ -29,6 +29,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_KAKAOTALK_VOICE
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_search_kakaotalk_voice(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
+1
View File
@@ -27,6 +27,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_KERBEROS
#include "ndpi_api.h"
#include "ndpi_private.h"
/* #define KERBEROS_DEBUG 1 */
+1
View File
@@ -24,6 +24,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_KISMET
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_kismet_add_connection(struct ndpi_detection_module_struct * const ndpi_struct,
struct ndpi_flow_struct * const flow)
+1
View File
@@ -28,6 +28,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_KONTIKI
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_kontiki_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
+1
View File
@@ -27,6 +27,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_LDAP
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_ldap_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
+1 -2
View File
@@ -24,8 +24,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_LINE_CALL
#include "ndpi_api.h"
extern int is_valid_rtp_payload_type(uint8_t type);
#include "ndpi_private.h"
static void ndpi_int_line_add_connection(struct ndpi_detection_module_struct * const ndpi_struct,
struct ndpi_flow_struct * const flow)
+1
View File
@@ -23,6 +23,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_LISP
#include "ndpi_api.h"
#include "ndpi_private.h"
#define LISP_PORT 4341 /* Only UDP */
#define LISP_PORT1 4342 /* TCP and UDP */
+1
View File
@@ -23,6 +23,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_LOTUS_NOTES
#include "ndpi_api.h"
#include "ndpi_private.h"
/* ************************************ */
+1 -3
View File
@@ -27,12 +27,10 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MAIL_IMAP
#include "ndpi_api.h"
#include "ndpi_private.h"
/* #define IMAP_DEBUG 1*/
extern void switch_extra_dissection_to_tls(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow);
static void ndpi_int_mail_imap_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow,
u_int16_t protocol) {
flow->guessed_protocol_id = NDPI_PROTOCOL_UNKNOWN; /* Avoid IMAPS to be used s sub-protocol */
+1 -3
View File
@@ -28,6 +28,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MAIL_POP
#include "ndpi_api.h"
#include "ndpi_private.h"
#define POP_BIT_AUTH 0x0001
@@ -43,9 +44,6 @@
#define POP_BIT_STLS 0x0400
extern void switch_extra_dissection_to_tls(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow);
static void ndpi_int_mail_pop_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow,
u_int16_t protocol) {
+1 -2
View File
@@ -28,6 +28,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MAIL_SMTP
#include "ndpi_api.h"
#include "ndpi_private.h"
#define SMTP_BIT_220 0x01
@@ -48,8 +49,6 @@
/* #define SMTP_DEBUG 1 */
extern void switch_extra_dissection_to_tls(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow);
static void ndpi_int_mail_smtp_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow) {
+1
View File
@@ -27,6 +27,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MAPLESTORY
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_maplestory_add_connection(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
+1
View File
@@ -23,6 +23,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MEGACO
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_search_megaco(struct ndpi_detection_module_struct *ndpi_struct,
+1
View File
@@ -28,6 +28,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MEMCACHED
#include "ndpi_api.h"
#include "ndpi_private.h"
#define MCDC_SET "set "
#define MCDC_SET_LEN (sizeof(MCDC_SET) - 1)
+1
View File
@@ -23,6 +23,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MERAKI_CLOUD
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_merakicloud_add_connection(struct ndpi_detection_module_struct * const ndpi_struct,
struct ndpi_flow_struct * const flow)
+1
View File
@@ -26,6 +26,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MGCP
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_mgcp_add_connection(struct ndpi_detection_module_struct
*ndpi_struct, struct ndpi_flow_struct *flow)
+1
View File
@@ -23,6 +23,7 @@
#include "ndpi_protocol_ids.h"
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MINING
#include "ndpi_api.h"
#include "ndpi_private.h"
/* ************************************************************************** */
+1
View File
@@ -26,6 +26,7 @@
#include "ndpi_protocol_ids.h"
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MODBUS
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_search_modbus_tcp(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow) {
+1
View File
@@ -25,6 +25,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MONGODB
#include "ndpi_api.h"
#include "ndpi_private.h"
/* https://docs.mongodb.com/manual/reference/mongodb-wire-protocol/ */
+1
View File
@@ -26,6 +26,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MPEGDASH
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_mpegdash_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
+1
View File
@@ -24,6 +24,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MPEGTS
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_search_mpegts(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
+1
View File
@@ -26,6 +26,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MQTT
#include "ndpi_api.h"
#include "ndpi_private.h"
/**
+1
View File
@@ -27,6 +27,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MSSQL_TDS
#include "ndpi_api.h"
#include "ndpi_private.h"
struct tds_packet_header {
+1
View File
@@ -24,6 +24,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MUNIN
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_int_munin_add_connection(struct ndpi_detection_module_struct * const ndpi_struct,
struct ndpi_flow_struct * const flow)
+1
View File
@@ -28,6 +28,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MYSQL
#include "ndpi_api.h"
#include "ndpi_private.h"
static void ndpi_search_mysql_tcp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
struct ndpi_packet_struct *packet = &ndpi_struct->packet;
+1
View File
@@ -24,6 +24,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_NATPMP
#include "ndpi_api.h"
#include "ndpi_private.h"
#define NATPMP_PORT 5351
+1
View File
@@ -22,6 +22,7 @@
#include "ndpi_protocol_ids.h"
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_NATS
#include "ndpi_api.h"
#include "ndpi_private.h"
static const char* commands[] =
{
+1
View File
@@ -28,6 +28,7 @@
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_NEST_LOG_SINK
#include "ndpi_api.h"
#include "ndpi_private.h"
#define NEST_LOG_SINK_PORT 11095
#define NEST_LOG_SINK_MIN_LEN 8

Some files were not shown because too many files have changed in this diff Show More