rework API (part 1) - minor fixes functions
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user