rework API (part 1) - minor fixes functions

This commit is contained in:
Campus
2016-03-14 01:04:50 +01:00
parent 1cf4926b4e
commit 4370781b49
3 changed files with 463 additions and 171 deletions
+7 -3
View File
@@ -30,6 +30,7 @@ u_int ndpi_search_tcp_or_udp_raw(struct ndpi_detection_module_struct *ndpi_struc
u_int16_t sport, u_int16_t dport) /* host endianess */
{
u_int16_t rc;
struct in_addr host;
if(protocol == IPPROTO_UDP) {
if((sport == dport) && (sport == 17500)) {
@@ -37,9 +38,12 @@ u_int ndpi_search_tcp_or_udp_raw(struct ndpi_detection_module_struct *ndpi_struc
}
}
if((rc = ndpi_host_ptree_match(ndpi_struct, htonl(saddr))) != NDPI_PROTOCOL_UNKNOWN) return(rc);
return(ndpi_host_ptree_match(ndpi_struct, htonl(daddr)));
host.s_addr = htonl(saddr);
if((rc = ndpi_network_ptree_match(ndpi_struct, &host)) != NDPI_PROTOCOL_UNKNOWN)
return (rc);
host.s_addr = htonl(daddr);
return (ndpi_network_ptree_match(ndpi_struct, &host));
}
void ndpi_search_tcp_or_udp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)