From: Guilherme Maciel Ferreira Date: Thu, 23 Jun 2011 18:26:14 +0000 (-0300) Subject: Calling set_ping_status() in ping function and added some documentation X-Git-Tag: v1.1^2~67 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=c0950a056827ae42df70f72de184239930ca54df;p=pingcheck Calling set_ping_status() in ping function and added some documentation --- diff --git a/src/icmp/icmppinger.cpp b/src/icmp/icmppinger.cpp index 019c726..85fb14d 100644 --- a/src/icmp/icmppinger.cpp +++ b/src/icmp/icmppinger.cpp @@ -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