aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/ndpi_protocol_ids.h8
-rw-r--r--src/lib/ndpi_main.c29
-rw-r--r--src/lib/protocols/non_tcp_udp.c16
3 files changed, 33 insertions, 20 deletions
diff --git a/src/include/ndpi_protocol_ids.h b/src/include/ndpi_protocol_ids.h
index 984ea7be5..265c4954b 100644
--- a/src/include/ndpi_protocol_ids.h
+++ b/src/include/ndpi_protocol_ids.h
@@ -103,7 +103,7 @@ typedef enum {
NDPI_PROTOCOL_HART_IP = 72,
NDPI_PROTOCOL_IP_VRRP = 73,
NDPI_PROTOCOL_STEAM = 74,
- NDPI_PROTOCOL_FREE_75 = 75,
+ NDPI_PROTOCOL_FREE_75 = 75, /* FREE */
NDPI_PROTOCOL_WORLDOFWARCRAFT = 76,
NDPI_PROTOCOL_TELNET = 77,
NDPI_PROTOCOL_STUN = 78,
@@ -144,8 +144,8 @@ typedef enum {
NDPI_PROTOCOL_NEXON = 113,
NDPI_PROTOCOL_MSSQL_TDS = 114,
NDPI_PROTOCOL_PPTP = 115,
- NDPI_PROTOCOL_FREE_116 = 116,
- NDPI_PROTOCOL_FREE_117 = 117,
+ NDPI_PROTOCOL_IP_AH = 116,
+ NDPI_PROTOCOL_IP_ESP = 117,
NDPI_PROTOCOL_SLACK = 118,
NDPI_PROTOCOL_FACEBOOK = 119,
NDPI_PROTOCOL_TWITTER = 120,
@@ -212,7 +212,7 @@ typedef enum {
NDPI_PROTOCOL_MEGACO = 181,
NDPI_PROTOCOL_RESP = 182,
NDPI_PROTOCOL_PINTEREST = 183,
- NDPI_PROTOCOL_FREE_184 = 184,
+ NDPI_PROTOCOL_OSPF = 184,
NDPI_PROTOCOL_TELEGRAM = 185,
NDPI_PROTOCOL_COD_MOBILE = 186,
NDPI_PROTOCOL_PANDORA = 187,
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index ef42b9e40..a9ac1b652 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -1418,8 +1418,8 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IP_OSPF,
- "OSPF", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
- ndpi_build_default_ports(ports_a, 2604, 0, 0, 0, 0) /* TCP */,
+ "IP_OSPF", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
+ ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_IP_IP_IN_IP,
"IP_in_IP", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
@@ -1551,12 +1551,12 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
"PPTP", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
- ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_FREE_116,
- "Free116", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
+ ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_IP_AH,
+ "AH", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
- ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_FREE_117,
- "Free117", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
+ ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_IP_ESP,
+ "ESP", NDPI_PROTOCOL_CATEGORY_VPN, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_MS_RPCH,
@@ -1781,10 +1781,10 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
"ZeroMQ", NDPI_PROTOCOL_CATEGORY_RPC, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0), /* TCP */
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0)); /* UDP */
- ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_FREE_184,
- "Free184", NDPI_PROTOCOL_CATEGORY_VOIP, NDPI_PROTOCOL_QOE_CATEGORY_VOIP_CALLS,
- ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0), /* TCP */
- ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0)); /* UDP */
+ ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_OSPF,
+ "OSPF", NDPI_PROTOCOL_CATEGORY_NETWORK, NDPI_PROTOCOL_QOE_CATEGORY_UNSPECIFIED,
+ ndpi_build_default_ports(ports_a, 2604, 0, 0, 0, 0), /* TCP */
+ ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0)); /* UDP */
ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 1 /* app proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_BLIZZARD,
"Blizzard", NDPI_PROTOCOL_CATEGORY_GAME, NDPI_PROTOCOL_QOE_CATEGORY_ONLINE_GAMING,
ndpi_build_default_ports(ports_a, 1119, 0, 0, 0, 0), /* TCP */
@@ -4576,12 +4576,15 @@ static u_int16_t guess_protocol_id(struct ndpi_detection_module_struct *ndpi_str
if the protocol is disabled */
switch(proto) {
case NDPI_IPSEC_PROTOCOL_ESP:
+ if(is_proto_enabled(ndpi_str, NDPI_PROTOCOL_IP_ESP))
+ return(NDPI_PROTOCOL_IP_ESP);
+ break;
case NDPI_IPSEC_PROTOCOL_AH:
- if(is_proto_enabled(ndpi_str, NDPI_PROTOCOL_IPSEC))
- return(NDPI_PROTOCOL_IPSEC);
+ if(is_proto_enabled(ndpi_str, NDPI_PROTOCOL_IP_AH))
+ return(NDPI_PROTOCOL_IP_AH);
break;
case NDPI_GRE_PROTOCOL_TYPE:
- if(is_proto_enabled(ndpi_str, NDPI_PROTOCOL_IPSEC))
+ if(is_proto_enabled(ndpi_str, NDPI_PROTOCOL_IP_GRE))
return(NDPI_PROTOCOL_IP_GRE);
break;
case NDPI_PGM_PROTOCOL_TYPE:
diff --git a/src/lib/protocols/non_tcp_udp.c b/src/lib/protocols/non_tcp_udp.c
index a2f8b518e..d20efdfa9 100644
--- a/src/lib/protocols/non_tcp_udp.c
+++ b/src/lib/protocols/non_tcp_udp.c
@@ -45,8 +45,11 @@ static void ndpi_search_in_non_tcp_udp(struct ndpi_detection_module_struct
switch (flow->l4_proto) {
case NDPI_IPSEC_PROTOCOL_ESP:
+ set_protocol_and_bmask(NDPI_PROTOCOL_IP_ESP);
+ break;
+
case NDPI_IPSEC_PROTOCOL_AH:
- set_protocol_and_bmask(NDPI_PROTOCOL_IPSEC);
+ set_protocol_and_bmask(NDPI_PROTOCOL_IP_AH);
break;
case NDPI_GRE_PROTOCOL_TYPE:
@@ -163,13 +166,20 @@ void init_non_tcp_udp_dissector(struct ndpi_detection_module_struct *ndpi_struct
/* always add non tcp/udp if one protocol is compiled in */
NDPI_SAVE_AS_BITMASK(ndpi_struct->callback_buffer[ndpi_struct->callback_buffer_num].detection_bitmask, NDPI_PROTOCOL_UNKNOWN);
- ndpi_set_bitmask_protocol_detection("IPSec", ndpi_struct,
- NDPI_PROTOCOL_IPSEC,
+ ndpi_set_bitmask_protocol_detection("AH", ndpi_struct,
+ NDPI_PROTOCOL_IP_AH,
ndpi_search_in_non_tcp_udp,
NDPI_SELECTION_BITMASK_PROTOCOL_IPV4_OR_IPV6,
NO_SAVE_DETECTION_BITMASK_AS_UNKNOWN,
ADD_TO_DETECTION_BITMASK);
+ ndpi_set_bitmask_protocol_detection("ESP", ndpi_struct,
+ NDPI_PROTOCOL_IP_ESP,
+ ndpi_search_in_non_tcp_udp,
+ NDPI_SELECTION_BITMASK_PROTOCOL_IPV4_OR_IPV6,
+ NO_SAVE_DETECTION_BITMASK_AS_UNKNOWN,
+ ADD_TO_DETECTION_BITMASK);
+
ndpi_set_bitmask_protocol_detection("IP_GRE", ndpi_struct,
NDPI_PROTOCOL_IP_GRE,
ndpi_search_in_non_tcp_udp,