Renamed methods, changed verb 'is' to 'match'
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Thu, 3 Nov 2011 00:03:59 +0000 (22:03 -0200)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Thu, 3 Nov 2011 00:03:59 +0000 (22:03 -0200)
src/icmp/icmppacket.h
src/icmp/icmppinger.cpp
src/icmp/icmpv4packet.cpp
src/icmp/icmpv4packet.h
src/icmp/icmpv6packet.cpp
src/icmp/icmpv6packet.h

index 76110db..7949198 100644 (file)
@@ -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
index e1c8f8d..49bcbd1 100644 (file)
@@ -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() ) )
         {
index 0d4c9f4..65155e2 100644 (file)
@@ -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
index 499c77b..a2dc56d 100644 (file)
@@ -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
index bd716dd..0661c93 100644 (file)
@@ -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
index d3b8b28..d3923b4 100644 (file)
@@ -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