From: Guilherme Maciel Ferreira Date: Thu, 3 Nov 2011 00:03:59 +0000 (-0200) Subject: Renamed methods, changed verb 'is' to 'match' X-Git-Tag: v1.2~43 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=c6c596e28d0d6a9b19067481f779a80c2334098c;p=pingcheck Renamed methods, changed verb 'is' to 'match' --- diff --git a/src/icmp/icmppacket.h b/src/icmp/icmppacket.h index 76110db..7949198 100644 --- a/src/icmp/icmppacket.h +++ b/src/icmp/icmppacket.h @@ -41,12 +41,12 @@ public: IcmpPacket(); virtual ~IcmpPacket(); - virtual bool is_echo_reply( + virtual bool match_echo_reply( const uint16_t identifier, const uint16_t sequence_number, const boost::asio::ip::address &source_address ) const = 0; - virtual bool is_destination_unreachable( + virtual bool match_destination_unreachable( const uint16_t identifier, const uint16_t sequence_number, const boost::asio::ip::address &source_address diff --git a/src/icmp/icmppinger.cpp b/src/icmp/icmppinger.cpp index e1c8f8d..49bcbd1 100644 --- a/src/icmp/icmppinger.cpp +++ b/src/icmp/icmppinger.cpp @@ -260,7 +260,7 @@ void IcmpPinger::handle_receive_icmp_packet( const size_t &bytes_transferred ) // expected sequence number, and destination host address (receive just // the ICMP packets from the host we had ping). - if ( icmp_packet.is_echo_reply( + if ( icmp_packet.match_echo_reply( Identifier, SequenceNumber, DestinationEndpoint.address() ) ) { @@ -272,7 +272,7 @@ void IcmpPinger::handle_receive_icmp_packet( const size_t &bytes_transferred ) IcmpPacketReceiveTimer.cancel(); } - else if ( icmp_packet.is_destination_unreachable( + else if ( icmp_packet.match_destination_unreachable( Identifier, SequenceNumber, DestinationEndpoint.address() ) ) { diff --git a/src/icmp/icmpv4packet.cpp b/src/icmp/icmpv4packet.cpp index 0d4c9f4..65155e2 100644 --- a/src/icmp/icmpv4packet.cpp +++ b/src/icmp/icmpv4packet.cpp @@ -94,7 +94,7 @@ IcmpData Icmpv4Packet::get_icmp_data() const * * @return @c true if this packet is a echo reply, or @c false otherwise. */ -bool Icmpv4Packet::is_echo_reply( +bool Icmpv4Packet::match_echo_reply( const uint16_t identifier, const uint16_t sequence_number, const address &source_address @@ -114,7 +114,7 @@ bool Icmpv4Packet::is_echo_reply( * @return @c true if this packet is a destination unreachable, or @c false * otherwise. */ -bool Icmpv4Packet::is_destination_unreachable( +bool Icmpv4Packet::match_destination_unreachable( const uint16_t identifier, const uint16_t sequence_number, const address &source_address diff --git a/src/icmp/icmpv4packet.h b/src/icmp/icmpv4packet.h index 499c77b..a2dc56d 100644 --- a/src/icmp/icmpv4packet.h +++ b/src/icmp/icmpv4packet.h @@ -80,12 +80,12 @@ public: Icmpv4Header get_icmp_header() const; IcmpData get_icmp_data() const; - bool is_echo_reply( + bool match_echo_reply( const uint16_t identifier, const uint16_t sequence_number, const boost::asio::ip::address &source_address ) const; - bool is_destination_unreachable( + bool match_destination_unreachable( const uint16_t identifier, const uint16_t sequence_number, const boost::asio::ip::address &source_address diff --git a/src/icmp/icmpv6packet.cpp b/src/icmp/icmpv6packet.cpp index bd716dd..0661c93 100644 --- a/src/icmp/icmpv6packet.cpp +++ b/src/icmp/icmpv6packet.cpp @@ -94,7 +94,7 @@ IcmpData Icmpv6Packet::get_icmp_data() const * * @return @c true if this packet is a echo reply, or @c false otherwise. */ -bool Icmpv6Packet::is_echo_reply( +bool Icmpv6Packet::match_echo_reply( const uint16_t identifier, const uint16_t sequence_number, const address &source_address @@ -114,7 +114,7 @@ bool Icmpv6Packet::is_echo_reply( * @return @c true if this packet is a destination unreachable, or @c false * otherwise. */ -bool Icmpv6Packet::is_destination_unreachable( +bool Icmpv6Packet::match_destination_unreachable( const uint16_t identifier, const uint16_t sequence_number, const address &source_address diff --git a/src/icmp/icmpv6packet.h b/src/icmp/icmpv6packet.h index d3b8b28..d3923b4 100644 --- a/src/icmp/icmpv6packet.h +++ b/src/icmp/icmpv6packet.h @@ -94,12 +94,12 @@ public: Icmpv6Header get_icmp_header() const; IcmpData get_icmp_data() const; - bool is_echo_reply( + bool match_echo_reply( const uint16_t identifier, const uint16_t sequence_number, const boost::asio::ip::address &source_address ) const; - bool is_destination_unreachable( + bool match_destination_unreachable( const uint16_t identifier, const uint16_t sequence_number, const boost::asio::ip::address &source_address