PingDoneCallback = ping_done_callback;
// Prepare ping
- PingerStatus = PingStatus_NotSent;
+ set_ping_status( PingStatus_NotSent );
set_destination_endpoint( destination_ip );
* 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 )
}
}
+/**
+ * @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
<< " 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