Compilation fixes
This commit is contained in:
+5
-36
@@ -1244,7 +1244,7 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
|
||||
ndpi_build_default_ports(ports_b, 548, 0, 0, 0, 0) /* UDP */);
|
||||
ndpi_set_proto_defaults(ndpi_mod, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_CHECKMK,
|
||||
no_master,
|
||||
no_master, "CHECKMK", NDPI_PROTOCOL_CATEGORY_FILE_TRANSFER,
|
||||
no_master, "CHECKMK", NDPI_PROTOCOL_CATEGORY_DATA_TRANSFER,
|
||||
ndpi_build_default_ports(ports_a, 6556, 0, 0, 0, 0) /* TCP */,
|
||||
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
|
||||
ndpi_set_proto_defaults(ndpi_mod, NDPI_PROTOCOL_POTENTIALLY_DANGEROUS, NDPI_PROTOCOL_STEALTHNET,
|
||||
@@ -1377,11 +1377,6 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
|
||||
no_master, "Citrix", NDPI_PROTOCOL_CATEGORY_NETWORK,
|
||||
ndpi_build_default_ports(ports_a, 1494, 2598, 0, 0, 0) /* TCP */,
|
||||
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
|
||||
ndpi_set_proto_defaults(ndpi_mod, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SKYFILE_POSTPAID,
|
||||
no_master,
|
||||
no_master, "SkyFile_PostPaid", NDPI_PROTOCOL_CATEGORY_MAIL,
|
||||
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_mod, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_CITRIX_ONLINE,
|
||||
no_master,
|
||||
no_master, "Citrix_Online", NDPI_PROTOCOL_CATEGORY_REMOTE_ACCESS,
|
||||
@@ -3170,7 +3165,8 @@ void ndpi_connection_tracking(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
packet->packet_direction = 1;
|
||||
|
||||
#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
if(iphv6 != NULL && NDPI_COMPARE_IPV6_ADDRESS_STRUCTS(&iphv6->ip6_src, &iphv6->ip6_dst) != 0)
|
||||
if(iphv6 != NULL && NDPI_COMPARE_IPV6_ADDRESS_STRUCTS(&iphv6->ip6_src,
|
||||
&iphv6->ip6_dst) != 0)
|
||||
packet->packet_direction = 1;
|
||||
#endif
|
||||
}
|
||||
@@ -4513,23 +4509,6 @@ u_int16_t ntohs_ndpi_bytestream_to_number(const u_int8_t * str, u_int16_t max_ch
|
||||
|
||||
/* ****************************************************** */
|
||||
|
||||
ndpi_protocol ndpi_find_port_based_protocol(struct ndpi_detection_module_struct *ndpi_struct /* NOTUSED */,
|
||||
/* u_int8_t proto, */
|
||||
u_int32_t shost, u_int16_t sport,
|
||||
u_int32_t dhost, u_int16_t dport) {
|
||||
ndpi_protocol proto = NDPI_PROTOCOL_NULL;
|
||||
|
||||
/* Skyfile (host 193.252.234.246 or host 10.10.102.80) */
|
||||
if((shost == 0xC1FCEAF6) || (dhost == 0xC1FCEAF6)
|
||||
|| (shost == 0x0A0A6650) || (dhost == 0x0A0A6650)) {
|
||||
if((sport == 4710) || (dport == 4710)) proto.app_protocol = NDPI_PROTOCOL_SKYFILE_POSTPAID;
|
||||
}
|
||||
|
||||
return(proto);
|
||||
}
|
||||
|
||||
/* ****************************************************** */
|
||||
|
||||
u_int8_t ndpi_is_proto(ndpi_protocol proto, u_int16_t p) {
|
||||
return(((proto.app_protocol == p) || (proto.master_protocol == p)) ? 1 : 0);
|
||||
}
|
||||
@@ -4575,10 +4554,6 @@ ndpi_protocol ndpi_guess_undetected_protocol(struct ndpi_detection_module_struct
|
||||
return(ret);
|
||||
}
|
||||
|
||||
ret = ndpi_find_port_based_protocol(ndpi_struct/* , proto */, shost, sport, dhost, dport);
|
||||
if(ret.app_protocol != NDPI_PROTOCOL_UNKNOWN)
|
||||
return(ret);
|
||||
|
||||
check_guessed_skype:
|
||||
addr.s_addr = htonl(shost);
|
||||
if(ndpi_network_ptree_match(ndpi_struct, &addr) == NDPI_PROTOCOL_SKYPE) {
|
||||
@@ -4701,26 +4676,20 @@ const char* ndpi_category_get_name(struct ndpi_detection_module_struct *ndpi_mod
|
||||
switch(category) {
|
||||
case NDPI_PROTOCOL_CATEGORY_CUSTOM_1:
|
||||
return(ndpi_mod->custom_category_labels[0]);
|
||||
break;
|
||||
case NDPI_PROTOCOL_CATEGORY_CUSTOM_2:
|
||||
return(ndpi_mod->custom_category_labels[1]);
|
||||
break;
|
||||
case NDPI_PROTOCOL_CATEGORY_CUSTOM_3:
|
||||
return(ndpi_mod->custom_category_labels[2]);
|
||||
break;
|
||||
case NDPI_PROTOCOL_CATEGORY_CUSTOM_4:
|
||||
return(ndpi_mod->custom_category_labels[3]);
|
||||
break;
|
||||
case NDPI_PROTOCOL_CATEGORY_CUSTOM_5:
|
||||
return(ndpi_mod->custom_category_labels[4]);
|
||||
break;
|
||||
case NDPI_PROTOCOL_NUM_CATEGORIES:
|
||||
return("Code should not use this internal constant");
|
||||
break;
|
||||
default:
|
||||
return("Unspecified");
|
||||
}
|
||||
}
|
||||
|
||||
return("Unspecified");
|
||||
}
|
||||
|
||||
/* ****************************************************** */
|
||||
|
||||
Reference in New Issue
Block a user