From: Christian Herdtweck Date: Thu, 22 Jan 2015 13:58:43 +0000 (+0100) Subject: corrected type of TTL: is now uint32_t everywhere (except for uint8_t in Payload... X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=3b6662f15a6db16a0b70a673fc47f403c158b1c8;p=pingcheck corrected type of TTL: is now uint32_t everywhere (except for uint8_t in Payload data) --- diff --git a/src/dns/dnsresolver.h b/src/dns/dnsresolver.h index b79d68c..5cb603a 100644 --- a/src/dns/dnsresolver.h +++ b/src/dns/dnsresolver.h @@ -82,7 +82,7 @@ private: /// 'A' resource records for the IPv4 addresses, or 'AAAA' resource records for the IPv6 addresses boost::net::dns::type_t AddressResourceRecord; /// Minimum time that IP has to be valid before creating new dns request - const int ResolvedIpTtlThreshold; + const uint32_t ResolvedIpTtlThreshold; }; diff --git a/src/icmp/icmpv4packet.cpp b/src/icmp/icmpv4packet.cpp index 4918aa5..82ed70d 100644 --- a/src/icmp/icmpv4packet.cpp +++ b/src/icmp/icmpv4packet.cpp @@ -180,7 +180,7 @@ void Icmpv4Packet::print_echo_reply( size_t bytes_received = bytes_transferred - ipv4_header.get_header_length(); string remote_address = ipv4_header.get_source_address().to_string(); uint16_t sequence_number = icmpv4_header.get_sequence_number(); - int ttl = ipv4_header.get_time_to_live(); + uint32_t ttl = ipv4_header.get_time_to_live(); ptime now = microsec_clock::universal_time(); time_resolution_traits_adapted64_impl::int_type elapsed_time = (now - time_packet_sent).total_milliseconds(); diff --git a/src/icmp/icmpv6packet.cpp b/src/icmp/icmpv6packet.cpp index 38910cb..6e8dfb8 100644 --- a/src/icmp/icmpv6packet.cpp +++ b/src/icmp/icmpv6packet.cpp @@ -193,7 +193,7 @@ void Icmpv6Packet::print_echo_reply( #endif uint16_t sequence_number = icmpv6_header.get_sequence_number(); - int ttl = ipv6_header.get_hop_limit(); + uint32_t ttl = ipv6_header.get_hop_limit(); ptime now = microsec_clock::universal_time(); time_resolution_traits_adapted64_impl::int_type elapsed_time = (now - time_packet_sent).total_milliseconds();