Class TCP


  • public class TCP
    extends org.opendaylight.openflowplugin.libraries.liblldp.Packet
    Class that represents the TCP segment objects.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ACKNUMBER  
      static java.lang.String CHECKSUM  
      static java.lang.String DATAOFFSET  
      static java.lang.String DESTPORT  
      static java.lang.String HEADERLENFLAGS  
      static java.lang.String RESERVED  
      static java.lang.String SEQNUMBER  
      static java.lang.String SRCPORT  
      static java.lang.String URGENTPOINTER  
      static java.lang.String WINDOWSIZE  
      • Fields inherited from class org.opendaylight.openflowplugin.libraries.liblldp.Packet

        corrupted, hdrFieldCoordMap, hdrFieldsMap, parent, payload, payloadClass, rawPayload, writeAccess
    • Constructor Summary

      Constructors 
      Constructor Description
      TCP()
      Default constructor that sets all the header fields to zero.
      TCP​(boolean writeAccess)
      Constructor that sets the access level for the packet and sets all the header fields to zero.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      short getChecksum()
      Get the stored checksum value of the TCP header.
      short getDestinationPort()
      Gets the stored destination port value of TCP header.
      short getSourcePort()
      Gets the stored source port value of TCP header.
      TCP setAckNumber​(int tcpAckNumber)
      Sets the TCP Ack number for the current TCP object instance.
      TCP setChecksum​(short tcpChecksum)
      Sets the TCP checksum for the current TCP object instance.
      TCP setDataOffset​(byte tcpDataOffset)
      Sets the TCP data offset for the current TCP object instance.
      TCP setDestinationPort​(short tcpDestinationPort)
      Sets the TCP destination port for the current TCP object instance.
      void setHeaderField​(java.lang.String headerField, byte[] readValue)  
      TCP setHeaderLenFlags​(short tcpFlags)
      Sets the TCP flags for the current TCP object instance.
      TCP setReserved​(byte tcpReserved)
      Sets the TCP reserved bits for the current TCP object instance.
      TCP setSequenceNumber​(int tcpSequenceNumber)
      Sets the TCP sequence number for the current TCP object instance.
      TCP setSourcePort​(short tcpSourcePort)
      Sets the TCP source port for the current TCP object instance.
      TCP setUrgentPointer​(short tcpUrgentPointer)
      Sets the TCP Urgent Pointer for the current TCP object instance.
      TCP setWindowSize​(short tcpWsize)
      Sets the TCP window size for the current TCP object instance.
      • Methods inherited from class org.opendaylight.openflowplugin.libraries.liblldp.Packet

        deserialize, equals, getfieldnumBits, getfieldOffset, getHeaderSize, getParent, getPayload, getRawPayload, hashCode, isCorrupted, postDeserializeCustomOperation, postSerializeCustomOperation, serialize, setParent, setPayload, setRawPayload, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TCP

        public TCP()
        Default constructor that sets all the header fields to zero.
      • TCP

        public TCP​(boolean writeAccess)
        Constructor that sets the access level for the packet and sets all the header fields to zero.
        Parameters:
        writeAccess - - boolean
    • Method Detail

      • setHeaderField

        public void setHeaderField​(java.lang.String headerField,
                                   byte[] readValue)
        Overrides:
        setHeaderField in class org.opendaylight.openflowplugin.libraries.liblldp.Packet
      • setSourcePort

        public TCP setSourcePort​(short tcpSourcePort)
        Sets the TCP source port for the current TCP object instance.
        Parameters:
        tcpSourcePort - short
        Returns:
        TCP
      • setDestinationPort

        public TCP setDestinationPort​(short tcpDestinationPort)
        Sets the TCP destination port for the current TCP object instance.
        Parameters:
        tcpDestinationPort - short
        Returns:
        TCP
      • setSequenceNumber

        public TCP setSequenceNumber​(int tcpSequenceNumber)
        Sets the TCP sequence number for the current TCP object instance.
        Parameters:
        tcpSequenceNumber - - int
        Returns:
        TCP
      • setDataOffset

        public TCP setDataOffset​(byte tcpDataOffset)
        Sets the TCP data offset for the current TCP object instance.
        Parameters:
        tcpDataOffset - - byte
        Returns:
        TCP
      • setReserved

        public TCP setReserved​(byte tcpReserved)
        Sets the TCP reserved bits for the current TCP object instance.
        Parameters:
        tcpReserved - byte
        Returns:
        TCP
      • setAckNumber

        public TCP setAckNumber​(int tcpAckNumber)
        Sets the TCP Ack number for the current TCP object instance.
        Parameters:
        tcpAckNumber - int
        Returns:
        TCP
      • setHeaderLenFlags

        public TCP setHeaderLenFlags​(short tcpFlags)
        Sets the TCP flags for the current TCP object instance.
        Parameters:
        tcpFlags - short
        Returns:
        TCP
      • setWindowSize

        public TCP setWindowSize​(short tcpWsize)
        Sets the TCP window size for the current TCP object instance.
        Parameters:
        tcpWsize - short
        Returns:
        TCP
      • setChecksum

        public TCP setChecksum​(short tcpChecksum)
        Sets the TCP checksum for the current TCP object instance.
        Parameters:
        tcpChecksum - short
        Returns:
        TCP
      • setUrgentPointer

        public TCP setUrgentPointer​(short tcpUrgentPointer)
        Sets the TCP Urgent Pointer for the current TCP object instance.
        Parameters:
        tcpUrgentPointer - short
        Returns:
        TCP
      • getSourcePort

        public short getSourcePort()
        Gets the stored source port value of TCP header.
        Returns:
        the sourcePort
      • getDestinationPort

        public short getDestinationPort()
        Gets the stored destination port value of TCP header.
        Returns:
        the destinationPort
      • getChecksum

        public short getChecksum()
        Get the stored checksum value of the TCP header.
        Returns:
        short - the checksum