com.h3c.util.pkt

## Class Tcp

- java.lang.Object
- - com.h3c.util.pkt.Tcp

- All Implemented Interfaces:
    Protocol

      public class Tcp
      extends Object
      implements Protocol

  TCP data store (immutable) and associated `Tcp.Builder` (mutable).

  Includes support for the following OpenFlow match fields:

  - TCP source port
  - TCP destination port

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Tcp.Builder` Builder (mutable) used to create new protocol instances.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `ackNum()` Returns the acknowledgment number.
    `int` | `checkSum()` Returns the decoded checksum.
    `TcpUdpPort` | `dstPort()` Returns the destination port.
    `int` | `flags()` Returns the flag bits.
    `int` | `hdrLen()` Returns the decoded header length.
    `ProtocolId` | `id()` Returns the protocol ID.
    `byte[]` | `options()` Returns a copy of the options byte array.
    `long` | `seqNum()` Returns the sequence number.
    `TcpUdpPort` | `srcPort()` Returns the source port.
    `String` | `toDebugString()` Returns the protocol debug string.
    `String` | `toString()`
    `int` | `urgentPtr()` Returns the urgent pointer.
    `int` | `winSize()` Returns the window size.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### id

          public ProtocolId id()

      Description copied from interface: `Protocol`
      Returns the protocol ID.
      Specified by:
        `id` in interface `Protocol`
      Returns:
        protocol ID

    - #### dstPort

          public TcpUdpPort dstPort()

      Returns the destination port.
      Returns:
        the destination port

    - #### srcPort

          public TcpUdpPort srcPort()

      Returns the source port.
      Returns:
        the source port

    - #### seqNum

          public long seqNum()

      Returns the sequence number.
      Returns:
        the sequence number

    - #### ackNum

          public long ackNum()

      Returns the acknowledgment number.
      Returns:
        the acknowledgment number

    - #### hdrLen

          public int hdrLen()

      Returns the decoded header length.
      Returns:
        the decoded header length

    - #### flags

          public int flags()

      Returns the flag bits.
      Returns:
        the flag bits

    - #### winSize

          public int winSize()

      Returns the window size.
      Returns:
        the window size

    - #### checkSum

          public int checkSum()

      Returns the decoded checksum.
      Returns:
        the decoded checksum

    - #### urgentPtr

          public int urgentPtr()

      Returns the urgent pointer.
      Returns:
        the urgent pointer

    - #### options

          public byte[] options()

      Returns a copy of the options byte array.
      Returns:
        the options byte array

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toDebugString

          public String toDebugString()

      Description copied from interface: `Protocol`
      Returns the protocol debug string.
      Specified by:
        `toDebugString` in interface `Protocol`
      Returns:
        the protocol debug string

Copyright © 2014. All Rights Reserved.