Documentation for ICMP Packet Factory.
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Sat, 19 Nov 2011 12:04:40 +0000 (10:04 -0200)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Sat, 19 Nov 2011 12:05:16 +0000 (10:05 -0200)
src/icmp/icmppacketfactory.cpp

index 37a3825..cbae2ec 100644 (file)
@@ -41,7 +41,12 @@ using I2n::Logger::GlobalLogger;
 //-----------------------------------------------------------------------------
 
 /**
- * @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,
@@ -69,7 +74,7 @@ IcmpPacketItem IcmpPacketFactory::create_icmp_packet(
     {
         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;
     }
@@ -78,7 +83,15 @@ IcmpPacketItem IcmpPacketFactory::create_icmp_packet(
 }
 
 /**
- * @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,
@@ -107,7 +120,12 @@ IcmpPacketItem IcmpPacketFactory::create_icmp_packet_echo_request(
 }
 
 /**
- * @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,
@@ -131,7 +149,12 @@ IcmpPacketItem IcmpPacketFactory::create_icmpv4_packet_echo_request(
 }
 
 /**
- * @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,