aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/gnutella.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2020-06-06 11:29:03 +0200
committerLuca Deri <deri@ntop.org>2020-06-06 11:29:03 +0200
commit801c9481cb9c1b55382dc6e14dd0f9f573d3fea7 (patch)
tree629d74482946020394f1a3dfd95f8ee71798f31e /src/lib/protocols/gnutella.c
parent605d548d4a5f2c298a6f98e5135d4ac63886d89a (diff)
Removed some obsolete protocols (battlefield, oscar, pcanywhere, tvants)
Diffstat (limited to 'src/lib/protocols/gnutella.c')
-rw-r--r--src/lib/protocols/gnutella.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/protocols/gnutella.c b/src/lib/protocols/gnutella.c
index 68313d668..18c5b2f2b 100644
--- a/src/lib/protocols/gnutella.c
+++ b/src/lib/protocols/gnutella.c
@@ -41,7 +41,7 @@ static void ndpi_int_gnutella_add_connection(struct ndpi_detection_module_struct
NDPI_LOG_INFO(ndpi_struct, "found GNUTELLA\n");
if (src != NULL) {
- src->gnutella_ts = packet->tick_timestamp;
+ src->gnutella_ts = packet->current_time_ms;
if (packet->udp != NULL) {
if (!src->detected_gnutella_udp_port1) {
src->detected_gnutella_udp_port1 = (packet->udp->source);
@@ -58,7 +58,7 @@ static void ndpi_int_gnutella_add_connection(struct ndpi_detection_module_struct
}
}
if (dst != NULL) {
- dst->gnutella_ts = packet->tick_timestamp;
+ dst->gnutella_ts = packet->current_time_ms;
}
}
@@ -74,19 +74,19 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
if (packet->detected_protocol_stack[0] == NDPI_PROTOCOL_GNUTELLA) {
if (src != NULL && ((u_int32_t)
- (packet->tick_timestamp - src->gnutella_ts) < ndpi_struct->gnutella_timeout)) {
+ (packet->current_time_ms - src->gnutella_ts) < ndpi_struct->gnutella_timeout)) {
NDPI_LOG_DBG2(ndpi_struct, "save src connection packet detected\n");
- src->gnutella_ts = packet->tick_timestamp;
+ src->gnutella_ts = packet->current_time_ms;
} else if (dst != NULL && ((u_int32_t)
- (packet->tick_timestamp - dst->gnutella_ts) < ndpi_struct->gnutella_timeout)) {
+ (packet->current_time_ms - dst->gnutella_ts) < ndpi_struct->gnutella_timeout)) {
NDPI_LOG_DBG2(ndpi_struct, "save dst connection packet detected\n");
- dst->gnutella_ts = packet->tick_timestamp;
+ dst->gnutella_ts = packet->current_time_ms;
}
- if (src != NULL && (packet->tick_timestamp - src->gnutella_ts) > ndpi_struct->gnutella_timeout) {
+ if (src != NULL && (packet->current_time_ms - src->gnutella_ts) > ndpi_struct->gnutella_timeout) {
src->detected_gnutella_udp_port1 = 0;
src->detected_gnutella_udp_port2 = 0;
}
- if (dst != NULL && (packet->tick_timestamp - dst->gnutella_ts) > ndpi_struct->gnutella_timeout) {
+ if (dst != NULL && (packet->current_time_ms - dst->gnutella_ts) > ndpi_struct->gnutella_timeout) {
dst->detected_gnutella_udp_port1 = 0;
dst->detected_gnutella_udp_port2 = 0;
}
@@ -236,7 +236,7 @@ void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struct, stru
} else if (packet->udp != NULL) {
if (src != NULL && (packet->udp->source == src->detected_gnutella_udp_port1 ||
packet->udp->source == src->detected_gnutella_udp_port2) &&
- (packet->tick_timestamp - src->gnutella_ts) < ndpi_struct->gnutella_timeout) {
+ (packet->current_time_ms - src->gnutella_ts) < ndpi_struct->gnutella_timeout) {
NDPI_LOG_DBG2(ndpi_struct, "port based detection\n\n");
ndpi_int_gnutella_add_connection(ndpi_struct, flow);
}