Calling set_ping_status() in ping function and added some documentation
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Thu, 23 Jun 2011 18:26:14 +0000 (15:26 -0300)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Thu, 23 Jun 2011 18:43:18 +0000 (15:43 -0300)
src/icmp/icmppinger.cpp

index 019c726..85fb14d 100644 (file)
@@ -95,7 +95,7 @@ void IcmpPinger::ping(
     PingDoneCallback = ping_done_callback;
 
     // Prepare ping
-    PingerStatus = PingStatus_NotSent;
+    set_ping_status( PingStatus_NotSent );
 
     set_destination_endpoint( destination_ip );
 
@@ -226,7 +226,7 @@ void IcmpPinger::handle_ping_done()
  * In the future we might redesign the code to handle all ICMP packets
  * from a single raw socket.
  *
- * @param bytes_transferred Number of bytes transferred
+ * @param bytes_transferred Number of bytes transferred.
  * @return void
  **/
 void IcmpPinger::handle_receive_icmp_packet( const size_t &bytes_transferred )
@@ -294,6 +294,13 @@ void IcmpPinger::handle_receive_icmp_packet( const size_t &bytes_transferred )
     }
 }
 
+/**
+ * @brief Prints the ICMP echo reply messages.
+ *
+ * @param icmp_packet The IcmpPacket object containing the received echo reply data.
+ * @param bytes_transferred Number of bytes transferred.
+ * @return void
+ */
 void IcmpPinger::print_echo_reply(
         const IcmpPacket &icmp_packet,
         const size_t &bytes_transferred
@@ -319,6 +326,13 @@ void IcmpPinger::print_echo_reply(
          << " time=" << elapsed_time << " ms" << endl;
 }
 
+/**
+ * @brief Prints the destination unreachable messages.
+ *
+ * @param icmp_packet The IcmpPacket object containing the received destination
+ * unreachable data.
+ * @return void
+ */
 void IcmpPinger::print_destination_unreachable(
         const IcmpPacket &icmp_packet
 ) const