//-----------------------------------------------------------------------------
/**
- * @brief
+ * @brief Creates an ICMP packet from the input stream @c std::istream.
+ *
+ * @param protocol The packet's network layer protocol, IPv4 or IPv6.
+ * @param is The input stream.
+ *
+ * @return An ICMP Packet object.
*/
IcmpPacketItem IcmpPacketFactory::create_icmp_packet(
const icmp::socket::protocol_type &protocol,
{
GlobalLogger.notice() << "Could not read ICMP packet." << endl;
- // TODO why good packets reports as bad?
+ // TODO why good packets are reports as bad? The read() has problems!
//IcmpPacketItem icmp_packet_empty;
//icmp_packet = icmp_packet_empty;
}
}
/**
- * @brief
+ * @brief Creates an ICMP Echo Request packet.
+ *
+ * @param protocol The packet's network layer protocol, IPv4 or IPv6.
+ * @param identifier The packet's identifier number to aid in matching Echo
+ * Replies to this Echo Request. May be zero.
+ * @param sequence_number The packet's sequence number to aid in matching Echo
+ * Replies to this Echo Request. May be zero.
+ *
+ * @return An ICMP Echo Request packet object.
*/
IcmpPacketItem IcmpPacketFactory::create_icmp_packet_echo_request(
const icmp::socket::protocol_type &protocol,
}
/**
- * @brief
+ * @brief Creates an ICMPv4 Echo Request packet.
+ *
+ * @param identifier The packet's identifier number.
+ * @param sequence_number The packet's sequence number.
+ *
+ * @return An ICMPv4 Echo Request packet object.
*/
IcmpPacketItem IcmpPacketFactory::create_icmpv4_packet_echo_request(
const uint16_t identifier,
}
/**
- * @brief
+ * @brief Creates an ICMPv6 Echo Request packet.
+ *
+ * @param identifier The packet's identifier number.
+ * @param sequence_number The packet's sequence number.
+ *
+ * @return An ICMPv6 Echo Request packet object.
*/
IcmpPacketItem IcmpPacketFactory::create_icmpv6_packet_echo_request(
const uint16_t identifier,