aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/protocols')
-rw-r--r--src/lib/protocols/bittorrent.c8
-rw-r--r--src/lib/protocols/http.c2
-rw-r--r--src/lib/protocols/kerberos.c6
-rw-r--r--src/lib/protocols/ldap.c2
-rw-r--r--src/lib/protocols/snmp_proto.c6
-rw-r--r--src/lib/protocols/starcraft.c10
-rw-r--r--src/lib/protocols/stun.c4
7 files changed, 19 insertions, 19 deletions
diff --git a/src/lib/protocols/bittorrent.c b/src/lib/protocols/bittorrent.c
index b3838a8dd..2d687654e 100644
--- a/src/lib/protocols/bittorrent.c
+++ b/src/lib/protocols/bittorrent.c
@@ -108,14 +108,14 @@ u_int32_t make_bittorrent_host_key(struct ndpi_flow_struct *flow, int client, in
/* network byte order */
if(flow->is_ipv6) {
if(client)
- key = ndpi_ip_port_hash_funct(ndpi_quick_hash(flow->c_address.v6, 16), htons(ntohs(flow->c_port) + offset));
+ key = ip_port_hash_funct(ndpi_quick_hash(flow->c_address.v6, 16), htons(ntohs(flow->c_port) + offset));
else
- key = ndpi_ip_port_hash_funct(ndpi_quick_hash(flow->s_address.v6, 16), flow->s_port);
+ key = ip_port_hash_funct(ndpi_quick_hash(flow->s_address.v6, 16), flow->s_port);
} else {
if(client)
- key = ndpi_ip_port_hash_funct(flow->c_address.v4, htons(ntohs(flow->c_port) + offset));
+ key = ip_port_hash_funct(flow->c_address.v4, htons(ntohs(flow->c_port) + offset));
else
- key = ndpi_ip_port_hash_funct(flow->s_address.v4, flow->s_port);
+ key = ip_port_hash_funct(flow->s_address.v4, flow->s_port);
}
return key;
diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c
index ee0c61591..68ba42561 100644
--- a/src/lib/protocols/http.c
+++ b/src/lib/protocols/http.c
@@ -60,7 +60,7 @@ static void ndpi_set_binary_application_transfer(struct ndpi_detection_module_st
/*
Check known exceptions
*/
- if(ndpi_ends_with(ndpi_struct, (char*)flow->host_server_name, ".windowsupdate.com"))
+ if(ends_with(ndpi_struct, (char*)flow->host_server_name, ".windowsupdate.com"))
;
else
ndpi_set_risk(ndpi_struct, flow, NDPI_BINARY_APPLICATION_TRANSFER, msg);
diff --git a/src/lib/protocols/kerberos.c b/src/lib/protocols/kerberos.c
index 1939a2e32..ae09493b9 100644
--- a/src/lib/protocols/kerberos.c
+++ b/src/lib/protocols/kerberos.c
@@ -45,9 +45,9 @@ static int krb_decode_asn1_length(struct ndpi_detection_module_struct *ndpi_stru
int64_t length;
u_int16_t value_len;
- length = ndpi_asn1_ber_decode_length(&packet->payload[*kasn1_offset],
- packet->payload_packet_len - *kasn1_offset,
- &value_len);
+ length = asn1_ber_decode_length(&packet->payload[*kasn1_offset],
+ packet->payload_packet_len - *kasn1_offset,
+ &value_len);
if (length == -1 ||
packet->payload_packet_len < *kasn1_offset + value_len + length)
diff --git a/src/lib/protocols/ldap.c b/src/lib/protocols/ldap.c
index 36f4c5686..b4df469f9 100644
--- a/src/lib/protocols/ldap.c
+++ b/src/lib/protocols/ldap.c
@@ -47,7 +47,7 @@ static void ndpi_search_ldap(struct ndpi_detection_module_struct *ndpi_struct, s
if(packet->payload_packet_len > 1 &&
packet->payload[0] == 0x30) {
- length = ndpi_asn1_ber_decode_length(&packet->payload[1], packet->payload_packet_len - 1, &length_len);
+ length = asn1_ber_decode_length(&packet->payload[1], packet->payload_packet_len - 1, &length_len);
NDPI_LOG_DBG(ndpi_struct, "length %d (%d bytes)\n", length, length_len);
if(length > 0 &&
packet->payload_packet_len > 1 + length_len + 1 &&
diff --git a/src/lib/protocols/snmp_proto.c b/src/lib/protocols/snmp_proto.c
index 66e415db3..75e829126 100644
--- a/src/lib/protocols/snmp_proto.c
+++ b/src/lib/protocols/snmp_proto.c
@@ -72,7 +72,7 @@ static void ndpi_search_snmp(struct ndpi_detection_module_struct *ndpi_struct,
u_int16_t len_length = 0, offset;
int64_t len;
- len = ndpi_asn1_ber_decode_length(&packet->payload[1], packet->payload_packet_len - 1, &len_length);
+ len = asn1_ber_decode_length(&packet->payload[1], packet->payload_packet_len - 1, &len_length);
if(len > 2 &&
1 + len_length + len == packet->payload_packet_len &&
@@ -106,10 +106,10 @@ static void ndpi_search_snmp(struct ndpi_detection_module_struct *ndpi_struct,
if(snmp_primitive == 2 /* Get Response */ &&
snmp_primitive_offset + 1 < packet->payload_packet_len) {
offset = snmp_primitive_offset + 1;
- ndpi_asn1_ber_decode_length(&packet->payload[offset], packet->payload_packet_len - offset, &len_length);
+ asn1_ber_decode_length(&packet->payload[offset], packet->payload_packet_len - offset, &len_length);
offset += len_length + 1;
if(offset < packet->payload_packet_len) {
- len = ndpi_asn1_ber_decode_length(&packet->payload[offset], packet->payload_packet_len - offset, &len_length);
+ len = asn1_ber_decode_length(&packet->payload[offset], packet->payload_packet_len - offset, &len_length);
u_int8_t error_status_offset = offset + len_length + len + 2;
diff --git a/src/lib/protocols/starcraft.c b/src/lib/protocols/starcraft.c
index 8cf59bbbf..d04f2a381 100644
--- a/src/lib/protocols/starcraft.c
+++ b/src/lib/protocols/starcraft.c
@@ -35,11 +35,11 @@ static u_int8_t sc2_match_logon_ip(struct ndpi_packet_struct* packet)
u_int32_t source_ip = ntohl(packet->iph->saddr);
u_int32_t dest_ip = ntohl(packet->iph->daddr);
- return (ndpi_ips_match(source_ip, dest_ip, 0xD5F87F82, 32) // EU 213.248.127.130
- || ndpi_ips_match(source_ip, dest_ip, 0x0C81CE82, 32) // US 12.129.206.130
- || ndpi_ips_match(source_ip, dest_ip, 0x79FEC882, 32) // KR 121.254.200.130
- || ndpi_ips_match(source_ip, dest_ip, 0xCA09424C, 32) // SG 202.9.66.76
- || ndpi_ips_match(source_ip, dest_ip, 0x0C81ECFE, 32)); // BETA 12.129.236.254
+ return (ips_match(source_ip, dest_ip, 0xD5F87F82, 32) // EU 213.248.127.130
+ || ips_match(source_ip, dest_ip, 0x0C81CE82, 32) // US 12.129.206.130
+ || ips_match(source_ip, dest_ip, 0x79FEC882, 32) // KR 121.254.200.130
+ || ips_match(source_ip, dest_ip, 0xCA09424C, 32) // SG 202.9.66.76
+ || ips_match(source_ip, dest_ip, 0x0C81ECFE, 32)); // BETA 12.129.236.254
}
/*
diff --git a/src/lib/protocols/stun.c b/src/lib/protocols/stun.c
index 589c599d2..76a75b459 100644
--- a/src/lib/protocols/stun.c
+++ b/src/lib/protocols/stun.c
@@ -408,8 +408,8 @@ static int stun_search_again(struct ndpi_detection_module_struct *ndpi_struct,
first_dtls_pkt = 1;
/* TODO: right way? It is a bit scary... do we need to reset something else too? */
- ndpi_reset_detected_protocol(ndpi_struct, flow);
- ndpi_int_change_category(ndpi_struct, flow, NDPI_PROTOCOL_CATEGORY_UNSPECIFIED);
+ reset_detected_protocol(ndpi_struct, flow);
+ change_category(ndpi_struct, flow, NDPI_PROTOCOL_CATEGORY_UNSPECIFIED);
/* Give room for DTLS handshake, where we might have
retransmissions and fragments */