From: Guilherme Maciel Ferreira Date: Thu, 10 Nov 2011 07:07:20 +0000 (-0200) Subject: Adjusting some comments X-Git-Tag: v1.2~26 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=8b4161a59f9e8b46148e091f8cbc2392b3e60e5e;p=pingcheck Adjusting some comments --- diff --git a/src/icmp/icmpv6packet.h b/src/icmp/icmpv6packet.h index 2816b0b..5d0bd69 100644 --- a/src/icmp/icmpv6packet.h +++ b/src/icmp/icmpv6packet.h @@ -45,8 +45,8 @@ * | | | * | | | * | | | - * | source IPv6 address | | - * | | 320 bytes + * | source IPv6 address | IPv6 Header + * | | 40 bytes * | | | * | | | * | | | diff --git a/src/ip/ipv6header.h b/src/ip/ipv6header.h index 076bc8b..f71d752 100644 --- a/src/ip/ipv6header.h +++ b/src/ip/ipv6header.h @@ -39,7 +39,7 @@ * | | | * | | | * | source IPv6 address | | - * | | 320 bytes + * | | 40 bytes * | | | * | | | * | | | diff --git a/src/ip/pseudoipv4header.h b/src/ip/pseudoipv4header.h index 4dd00cf..d5cc7fe 100644 --- a/src/ip/pseudoipv4header.h +++ b/src/ip/pseudoipv4header.h @@ -29,6 +29,9 @@ on this file might be covered by the GNU General Public License. * @brief This class represents a Pseudo IP header used to compute checksum of * transport level protocols. * + * When TCP runs over IPv4, the method used to compute the checksum is defined + * in RFC 793. + * * Pseudo IPv4 header format used by TCP and UDP checksums: * * @code diff --git a/src/tcp/tcpipv4segment.cpp b/src/tcp/tcpipv4segment.cpp index 8902676..500421f 100644 --- a/src/tcp/tcpipv4segment.cpp +++ b/src/tcp/tcpipv4segment.cpp @@ -122,7 +122,14 @@ void TcpIpv4Segment::print_rst_reply( << endl; } -bool TcpIpv4Segment::read( std::istream &is ) +/** + * @brief Read the TCP Segment from the @c istream. + * + * @param is The input stream. + * + * @return @c true if the read was successful, or @c false if an error occured. + */ +bool TcpIpv4Segment::read( istream &is ) { is.clear(); @@ -131,7 +138,14 @@ bool TcpIpv4Segment::read( std::istream &is ) return is.fail(); } -bool TcpIpv4Segment::write( std::ostream &os ) const +/** + * @brief Write the TCP Segment to the @c ostream. + * + * @param os The output stream. + * + * @return @c true if the write was successful, or @c false if an error occured. + */ +bool TcpIpv4Segment::write( ostream &os ) const { os.clear();