Commit 72e02475 authored by Brickner_cp's avatar Brickner_cp

Improve TCP documentation (use the same field overview format used in Datagrams in TCP options).

parent f6130fc7
...@@ -23,6 +23,7 @@ namespace PcapDotNet.Packets.Transport ...@@ -23,6 +23,7 @@ namespace PcapDotNet.Packets.Transport
/// | 128 | Checksum | Urgent Pointer | /// | 128 | Checksum | Urgent Pointer |
/// +-----+-----------------------------------------------------------------------------+------------------+ /// +-----+-----------------------------------------------------------------------------+------------------+
/// | 160 | Options + Padding | /// | 160 | Options + Padding |
/// | ... | |
/// +-----+------------------------------------------------------------------------------------------------+ /// +-----+------------------------------------------------------------------------------------------------+
/// </pre> /// </pre>
/// </summary> /// </summary>
......
...@@ -13,9 +13,16 @@ namespace PcapDotNet.Packets.Transport ...@@ -13,9 +13,16 @@ namespace PcapDotNet.Packets.Transport
/// <para> /// <para>
/// The format of the TCP Alternate Checksum Data Option is: /// The format of the TCP Alternate Checksum Data Option is:
/// <pre> /// <pre>
/// +---------+---------+---------+ +---------+ /// +-----+--------+
/// | Kind=15 |Length=N | data | ... | data | /// | Bit | 0-7 |
/// +---------+---------+---------+ +---------+ /// +-----+--------+
/// | 0 | Kind |
/// +-----+--------+
/// | 8 | Length |
/// +-----+--------+
/// | 16 | Data |
/// | ... | |
/// +-----+--------+
/// </pre> /// </pre>
/// </para> /// </para>
/// ///
......
...@@ -6,9 +6,15 @@ namespace PcapDotNet.Packets.Transport ...@@ -6,9 +6,15 @@ namespace PcapDotNet.Packets.Transport
/// <summary> /// <summary>
/// TCP Alternate Checksum Request Option (RFC 1146). /// TCP Alternate Checksum Request Option (RFC 1146).
/// <pre> /// <pre>
/// +----------+----------+----------+ /// +-----+----------+
/// | Kind=14 | Length=3 | chksum | /// | Bit | 0-7 |
/// +----------+----------+----------+ /// +-----+----------+
/// | 0 | Kind |
/// +-----+----------+
/// | 8 | Length |
/// +-----+----------+
/// | 16 | Checksum |
/// +-----+----------+
/// </pre> /// </pre>
/// ///
/// <para> /// <para>
......
...@@ -13,15 +13,20 @@ namespace PcapDotNet.Packets.Transport ...@@ -13,15 +13,20 @@ namespace PcapDotNet.Packets.Transport
/// <para> /// <para>
/// The format of the TCP Authentication Option is: /// The format of the TCP Authentication Option is:
/// <pre> /// <pre>
/// +------------+------------+------------+------------+ /// +-----+------------+
/// | Kind=29 | Length=N | KeyId | RNextKeyId | /// | Bit | 0-7 |
/// +------------+------------+------------+------------+ /// +-----+------------+
/// | MAC ... /// | 0 | Kind |
/// +-----------------------------------... /// +-----+------------+
/// /// | 8 | Length |
/// ...-----------------+ /// +-----+------------+
/// ... MAC (con't) | /// | 16 | KeyId |
/// ...-----------------+ /// +-----+------------+
/// | 24 | RNextKeyId |
/// +-----+------------+
/// | 32 | MAC |
/// | ... | |
/// +-----+------------+
/// </pre> /// </pre>
/// </para> /// </para>
/// ///
...@@ -41,7 +46,7 @@ namespace PcapDotNet.Packets.Transport ...@@ -41,7 +46,7 @@ namespace PcapDotNet.Packets.Transport
/// <summary> /// <summary>
/// The minimum number of bytes this option takes. /// The minimum number of bytes this option takes.
/// </summary> /// </summary>
public const int OptionMinimumLength = OptionHeaderLength + 2; public const int OptionMinimumLength = OptionHeaderLength + sizeof(byte) + sizeof(byte);
/// <summary> /// <summary>
/// The minimum number of bytes this option's value takes. /// The minimum number of bytes this option's value takes.
......
...@@ -5,10 +5,14 @@ namespace PcapDotNet.Packets.Transport ...@@ -5,10 +5,14 @@ namespace PcapDotNet.Packets.Transport
/// <summary> /// <summary>
/// CC Option (RFC 1644). /// CC Option (RFC 1644).
/// <pre> /// <pre>
/// +--------+--------+--------+--------+--------+--------+ /// +-----+------+--------+
/// |00001011|00000110| Connection Count: SEG.CC | /// | Bit | 0-7 | 8-15 |
/// +--------+--------+--------+--------+--------+--------+ /// +-----+------+--------+
/// Kind=11 Length=6 /// | 0 | Kind | Length |
/// +-----+------+--------+
/// | 16 | Connection |
/// | | Count |
/// +-----+---------------+
/// </pre> /// </pre>
/// ///
/// <para> /// <para>
......
...@@ -5,10 +5,14 @@ namespace PcapDotNet.Packets.Transport ...@@ -5,10 +5,14 @@ namespace PcapDotNet.Packets.Transport
/// <summary> /// <summary>
/// CC.ECHO Option (RFC 1644). /// CC.ECHO Option (RFC 1644).
/// <pre> /// <pre>
/// +--------+--------+--------+--------+--------+--------+ /// +-----+------+--------+
/// |00001101|00000110| Connection Count: SEG.CC | /// | Bit | 0-7 | 8-15 |
/// +--------+--------+--------+--------+--------+--------+ /// +-----+------+--------+
/// Kind=13 Length=6 /// | 0 | Kind | Length |
/// +-----+------+--------+
/// | 16 | Connection |
/// | | Count |
/// +-----+---------------+
/// </pre> /// </pre>
/// ///
/// <para> /// <para>
......
...@@ -5,10 +5,14 @@ namespace PcapDotNet.Packets.Transport ...@@ -5,10 +5,14 @@ namespace PcapDotNet.Packets.Transport
/// <summary> /// <summary>
/// CC.NEW Option (RFC 1644). /// CC.NEW Option (RFC 1644).
/// <pre> /// <pre>
/// +--------+--------+--------+--------+--------+--------+ /// +-----+------+--------+
/// |00001100|00000110| Connection Count: SEG.CC | /// | Bit | 0-7 | 8-15 |
/// +--------+--------+--------+--------+--------+--------+ /// +-----+------+--------+
/// Kind=12 Length=6 /// | 0 | Kind | Length |
/// +-----+------+--------+
/// | 16 | Connection |
/// | | Count |
/// +-----+---------------+
/// </pre> /// </pre>
/// ///
/// <para> /// <para>
......
...@@ -6,9 +6,14 @@ namespace PcapDotNet.Packets.Transport ...@@ -6,9 +6,14 @@ namespace PcapDotNet.Packets.Transport
/// <summary> /// <summary>
/// TCP Echo Option: /// TCP Echo Option:
/// <pre> /// <pre>
/// +--------+--------+--------+--------+--------+--------+ /// +-----+------+----------+
/// | Kind=6 | Length | 4 bytes of info to be echoed | /// | Bit | 0-7 | 8-15 |
/// +--------+--------+--------+--------+--------+--------+ /// +-----+------+----------+
/// | 0 | Kind | Length |
/// +-----+------+----------+
/// | 16 | 4 bytes of info |
/// | | to be echoed |
/// +-----+-----------------+
/// </pre> /// </pre>
/// ///
/// <para> /// <para>
......
...@@ -6,9 +6,14 @@ namespace PcapDotNet.Packets.Transport ...@@ -6,9 +6,14 @@ namespace PcapDotNet.Packets.Transport
/// <summary> /// <summary>
/// TCP Echo Reply Option: /// TCP Echo Reply Option:
/// <pre> /// <pre>
/// +--------+--------+--------+--------+--------+--------+ /// +-----+------+--------+
/// | Kind=7 | Length | 4 bytes of echoed info | /// | Bit | 0-7 | 8-15 |
/// +--------+--------+--------+--------+--------+--------+ /// +-----+------+--------+
/// | 0 | Kind | Length |
/// +-----+------+--------+
/// | 16 | 4 bytes of |
/// | | echoed info |
/// +-----+---------------+
/// </pre> /// </pre>
/// ///
/// <para> /// <para>
......
...@@ -6,10 +6,13 @@ namespace PcapDotNet.Packets.Transport ...@@ -6,10 +6,13 @@ namespace PcapDotNet.Packets.Transport
/// <summary> /// <summary>
/// Maximum Segment Size (RFC 793) /// Maximum Segment Size (RFC 793)
/// <pre> /// <pre>
/// +--------+--------+---------+--------+ /// +-----+------+--------+
/// |00000010|00000100| max seg size | /// | Bit | 0-7 | 8-15 |
/// +--------+--------+---------+--------+ /// +-----+------+--------+
/// Kind=2 Length=4 /// | 0 | Kind | Length |
/// +-----+------+--------+
/// | 16 | max seg size |
/// +-----+---------------+
/// </pre> /// </pre>
/// ///
/// <para> /// <para>
......
...@@ -9,17 +9,20 @@ namespace PcapDotNet.Packets.Transport ...@@ -9,17 +9,20 @@ namespace PcapDotNet.Packets.Transport
{ {
/// <summary> /// <summary>
/// <pre> /// <pre>
/// +---------+---------+-------------------+ /// +-----+------+--------+
/// | Kind=19 |Length=18| MD5 digest... | /// | Bit | 0-7 | 8-15 |
/// +---------+---------+-------------------+ /// +-----+------+--------+
/// | | /// | 0 | Kind | Length |
/// +---------------------------------------+ /// +-----+------+--------+
/// | | /// | 16 | MD5 digest |
/// +---------------------------------------+ /// | | |
/// | | /// | | |
/// +-------------------+-------------------+ /// | | |
/// | | /// | | |
/// +-------------------+ /// | | |
/// | | |
/// | | |
/// +-----+---------------+
/// </pre> /// </pre>
/// ///
/// <para> /// <para>
......
...@@ -7,15 +7,23 @@ using PcapDotNet.Packets.Ip; ...@@ -7,15 +7,23 @@ using PcapDotNet.Packets.Ip;
namespace PcapDotNet.Packets.Transport namespace PcapDotNet.Packets.Transport
{ {
/// <summary> /// <summary>
/// RFC 5841.
/// TCP Mood Option: /// TCP Mood Option:
/// <pre> /// <pre>
/// +---------+--------+------------+ /// +-----+--------+
/// | Kind=25 | Length | ASCII Mood | /// | Bit | 0-7 |
/// +---------+--------+------------+ /// +-----+--------+
/// | 0 | Kind |
/// +-----+--------+
/// | 8 | Length |
/// +-----+--------+
/// | 16 | ASCII |
/// | ... | Mood |
/// +-----+--------+
/// </pre> /// </pre>
/// ///
/// <para> /// <para>
/// It is proposed that option 25 (released 2000-12-18) be used to define packet mood. /// It is proposed that option 25 (released 2000-12-18) be used to define packet mood.
/// This option would have a length value of 4 or 5 bytes. /// This option would have a length value of 4 or 5 bytes.
/// All the simple emotions described as expressible via this mechanism can be displayed with two or three 7-bit, ASCII-encoded characters. /// All the simple emotions described as expressible via this mechanism can be displayed with two or three 7-bit, ASCII-encoded characters.
/// Multiple mood options may appear in a TCP header, so as to express more complex moods than those defined here (for instance if a packet were happy and surprised). /// Multiple mood options may appear in a TCP header, so as to express more complex moods than those defined here (for instance if a packet were happy and surprised).
......
...@@ -6,9 +6,11 @@ namespace PcapDotNet.Packets.Transport ...@@ -6,9 +6,11 @@ namespace PcapDotNet.Packets.Transport
/// <summary> /// <summary>
/// TCP POC-permitted Option (RFC 1693) /// TCP POC-permitted Option (RFC 1693)
/// <pre> /// <pre>
/// +-----------+-------------+ /// +-----+------+--------+
/// | Kind=9 | Length=2 | /// | Bit | 0-7 | 8-15 |
/// +-----------+-------------+ /// +-----+------+--------+
/// | 0 | Kind | Length |
/// +-----+------+--------+
/// </pre> /// </pre>
/// </summary> /// </summary>
[TcpOptionTypeRegistration(TcpOptionType.PartialOrderConnectionPermitted)] [TcpOptionTypeRegistration(TcpOptionType.PartialOrderConnectionPermitted)]
......
...@@ -8,10 +8,15 @@ namespace PcapDotNet.Packets.Transport ...@@ -8,10 +8,15 @@ namespace PcapDotNet.Packets.Transport
/// TCP POC-service-profile Option (RFC 1693). /// TCP POC-service-profile Option (RFC 1693).
/// ///
/// <pre> /// <pre>
/// 1 bit 1 bit 6 bits /// +-----+------------+----------+--------+
/// +----------+----------+------------+----------+--------+ /// | Bit | 0 | 1 | 2-7 |
/// | Kind=10 | Length=3 | Start_flag | End_flag | Filler | /// +-----+------------+----------+--------+
/// +----------+----------+------------+----------+--------+ /// | 0 | Kind |
/// +-----+--------------------------------+
/// | 8 | Length |
/// +-----+------------+----------+--------+
/// | 16 | Start_flag | End_flag | Filler |
/// +-----+------------+----------+--------+
/// </pre> /// </pre>
/// ///
/// <para> /// <para>
......
...@@ -8,24 +8,29 @@ using PcapDotNet.Packets.Ip; ...@@ -8,24 +8,29 @@ using PcapDotNet.Packets.Ip;
namespace PcapDotNet.Packets.Transport namespace PcapDotNet.Packets.Transport
{ {
/// <summary> /// <summary>
/// RFC 2018.
/// The SACK option is to be used to convey extended acknowledgment information from the receiver to the sender over an established TCP connection. /// The SACK option is to be used to convey extended acknowledgment information from the receiver to the sender over an established TCP connection.
/// ///
/// <pre> /// <pre>
/// +--------+--------+ /// +-----+------+--------+
/// | Kind=5 | Length | /// | Bit | 0-7 | 8-15 |
/// +--------+--------+--------+--------+ /// +-----+------+--------+
/// | Left Edge of 1st Block | /// | 0 | Kind | Length |
/// +--------+--------+--------+--------+ /// +-----+------+--------+
/// | Right Edge of 1st Block | /// | 16 | Left Edge of |
/// +--------+--------+--------+--------+ /// | | 1st Block |
/// | | /// +-----+---------------+
/// / . . . / /// | 48 | Right Edge of |
/// | | /// | | 1st Block |
/// +--------+--------+--------+--------+ /// +-----+---------------+
/// | Left Edge of nth Block | /// ...
/// +--------+--------+--------+--------+ /// +-----+---------------+
/// | Right Edge of nth Block | /// | | Left Edge of |
/// +--------+--------+--------+--------+ /// | | nth Block |
/// +-----+---------------+
/// | | Right Edge of |
/// | | nth Block |
/// +-----+---------------+
/// </pre> /// </pre>
/// ///
/// <para> /// <para>
......
...@@ -10,9 +10,11 @@ namespace PcapDotNet.Packets.Transport ...@@ -10,9 +10,11 @@ namespace PcapDotNet.Packets.Transport
/// It MUST NOT be sent on non-SYN segments. /// It MUST NOT be sent on non-SYN segments.
/// ///
/// <pre> /// <pre>
/// +---------+---------+ /// +-----+------+--------+
/// | Kind=4 | Length=2| /// | Bit | 0-7 | 8-15 |
/// +---------+---------+ /// +-----+------+--------+
/// | 0 | Kind | Length |
/// +-----+------+--------+
/// </pre> /// </pre>
/// </summary> /// </summary>
[TcpOptionTypeRegistration(TcpOptionType.SelectiveAcknowledgmentPermitted)] [TcpOptionTypeRegistration(TcpOptionType.SelectiveAcknowledgmentPermitted)]
......
...@@ -4,12 +4,20 @@ using PcapDotNet.Packets.Ip; ...@@ -4,12 +4,20 @@ using PcapDotNet.Packets.Ip;
namespace PcapDotNet.Packets.Transport namespace PcapDotNet.Packets.Transport
{ {
/// <summary> /// <summary>
/// RFC 1323.
/// TCP Timestamps Option (TSopt): /// TCP Timestamps Option (TSopt):
/// <pre> /// <pre>
/// +-------+-------+---------------------+---------------------+ /// +-----+------+--------+
/// |Kind=8 | 10 | TS Value (TSval) |TS Echo Reply (TSecr)| /// | Bit | 0-7 | 8-15 |
/// +-------+-------+---------------------+---------------------+ /// +-----+------+--------+
/// 1 1 4 4 /// | 0 | Kind | Length |
/// +-----+------+--------+
/// | 16 | TS Value |
/// | | (TSval) |
/// +-----+---------------+
/// | 48 | TS Echo Reply |
/// | | (TSecr) |
/// +-----+---------------+
/// </pre> /// </pre>
/// ///
/// <para> /// <para>
......
...@@ -12,9 +12,15 @@ namespace PcapDotNet.Packets.Transport ...@@ -12,9 +12,15 @@ namespace PcapDotNet.Packets.Transport
/// The scale factor is limited to a power of two and encoded logarithmically, so it may be implemented by binary shift operations. /// The scale factor is limited to a power of two and encoded logarithmically, so it may be implemented by binary shift operations.
/// ///
/// <pre> /// <pre>
/// +---------+---------+---------+ /// +-----+-----------+
/// | Kind=3 |Length=3 |shift.cnt| /// | Bit | 0-7 |
/// +---------+---------+---------+ /// +-----+-----------+
/// | 0 | Kind |
/// +-----+-----------+
/// | 8 | Length |
/// +-----+-----------+
/// | 16 | shift.cnt |
/// +-----+-----------+
/// </pre> /// </pre>
/// ///
/// <para> /// <para>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment