// 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
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,
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,
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,