Documentation for TCP Segment Factory.
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Sun, 20 Nov 2011 19:18:30 +0000 (17:18 -0200)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Sun, 20 Nov 2011 19:18:30 +0000 (17:18 -0200)
src/tcp/tcpsegmentfactory.cpp

index a7f754b..937c9e2 100644 (file)
@@ -41,6 +41,14 @@ using I2n::Logger::GlobalLogger;
 // TcpSegmentFactory
 //-----------------------------------------------------------------------------
 
+/**
+ * @brief Creates a TCP segment from the input stream @c std::istream.
+ *
+ * @param protocol The segment's network layer protocol, IPv4 or IPv6.
+ * @param is The input stream.
+ *
+ * @return A TCP Segment object.
+ */
 TcpSegmentItem TcpSegmentFactory::create_tcp_segment(
         const tcp_raw_protocol::socket::protocol_type &protocol,
         std::istream &is
@@ -73,7 +81,19 @@ TcpSegmentItem TcpSegmentFactory::create_tcp_segment(
     return tcp_segment;
 }
 
-
+/**
+ * @brief Creates a TCP ACK request segment.
+ *
+ * @param protocol The segment's network layer protocol, IPv4 or IPv6.
+ * @param source_address The local address originating the ping.
+ * @param destination_address The remote address where to ping.
+ * @param source_port The local TCP port.
+ * @param destination_port The remote TCP port.
+ * @param sequence_number The segment's sequence number to aid in matching RST
+ * replies to this ACK request. May be zero.
+ *
+ * @return A TCP ACK request segment object.
+ */
 TcpSegmentItem TcpSegmentFactory::create_tcp_segment_ack_request(
         const tcp_raw_protocol::socket::protocol_type &protocol,
         const address &source_address,
@@ -109,6 +129,18 @@ TcpSegmentItem TcpSegmentFactory::create_tcp_segment_ack_request(
     return tcp_segment;
 }
 
+/**
+ * @brief Creates a TCP ACK request segment over IPv4.
+ *
+ * @param source_address The local address originating the ping.
+ * @param destination_address The remote address where to ping.
+ * @param source_port The local TCP port.
+ * @param destination_port The remote TCP port.
+ * @param sequence_number The segment's sequence number to aid in matching RST
+ * replies to this ACK request. May be zero.
+ *
+ * @return A TCP ACK request segment object.
+ */
 TcpSegmentItem TcpSegmentFactory::create_tcp_ipv4_segment_ack_request(
         const address &source_address,
         const address &destination_address,
@@ -146,6 +178,18 @@ TcpSegmentItem TcpSegmentFactory::create_tcp_ipv4_segment_ack_request(
     return tcp_segment;
 }
 
+/**
+ * @brief Creates a TCP ACK request segment over IPv6.
+ *
+ * @param source_address The local address originating the ping.
+ * @param destination_address The remote address where to ping.
+ * @param source_port The local TCP port.
+ * @param destination_port The remote TCP port.
+ * @param sequence_number The segment's sequence number to aid in matching RST
+ * replies to this ACK request. May be zero.
+ *
+ * @return A TCP ACK request segment object.
+ */
 TcpSegmentItem TcpSegmentFactory::create_tcp_ipv6_segment_ack_request(
         const address &source_address,
         const address &destination_address,