Class TCP
- java.lang.Object
-
- org.opendaylight.openflowplugin.libraries.liblldp.Packet
-
- org.opendaylight.genius.mdsalutil.packet.TCP
-
public class TCP extends org.opendaylight.openflowplugin.libraries.liblldp.PacketClass that represents the TCP segment objects.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringACKNUMBERstatic java.lang.StringCHECKSUMstatic java.lang.StringDATAOFFSETstatic java.lang.StringDESTPORTstatic java.lang.StringHEADERLENFLAGSstatic java.lang.StringRESERVEDstatic java.lang.StringSEQNUMBERstatic java.lang.StringSRCPORTstatic java.lang.StringURGENTPOINTERstatic java.lang.StringWINDOWSIZE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description shortgetChecksum()Get the stored checksum value of the TCP header.shortgetDestinationPort()Gets the stored destination port value of TCP header.shortgetSourcePort()Gets the stored source port value of TCP header.TCPsetAckNumber(int tcpAckNumber)Sets the TCP Ack number for the current TCP object instance.TCPsetChecksum(short tcpChecksum)Sets the TCP checksum for the current TCP object instance.TCPsetDataOffset(byte tcpDataOffset)Sets the TCP data offset for the current TCP object instance.TCPsetDestinationPort(short tcpDestinationPort)Sets the TCP destination port for the current TCP object instance.voidsetHeaderField(java.lang.String headerField, byte[] readValue)TCPsetHeaderLenFlags(short tcpFlags)Sets the TCP flags for the current TCP object instance.TCPsetReserved(byte tcpReserved)Sets the TCP reserved bits for the current TCP object instance.TCPsetSequenceNumber(int tcpSequenceNumber)Sets the TCP sequence number for the current TCP object instance.TCPsetSourcePort(short tcpSourcePort)Sets the TCP source port for the current TCP object instance.TCPsetUrgentPointer(short tcpUrgentPointer)Sets the TCP Urgent Pointer for the current TCP object instance.TCPsetWindowSize(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
-
-
-
-
Field Detail
-
SRCPORT
public static final java.lang.String SRCPORT
- See Also:
- Constant Field Values
-
DESTPORT
public static final java.lang.String DESTPORT
- See Also:
- Constant Field Values
-
SEQNUMBER
public static final java.lang.String SEQNUMBER
- See Also:
- Constant Field Values
-
ACKNUMBER
public static final java.lang.String ACKNUMBER
- See Also:
- Constant Field Values
-
DATAOFFSET
public static final java.lang.String DATAOFFSET
- See Also:
- Constant Field Values
-
RESERVED
public static final java.lang.String RESERVED
- See Also:
- Constant Field Values
-
HEADERLENFLAGS
public static final java.lang.String HEADERLENFLAGS
- See Also:
- Constant Field Values
-
WINDOWSIZE
public static final java.lang.String WINDOWSIZE
- See Also:
- Constant Field Values
-
CHECKSUM
public static final java.lang.String CHECKSUM
- See Also:
- Constant Field Values
-
URGENTPOINTER
public static final java.lang.String URGENTPOINTER
- See Also:
- Constant Field Values
-
-
Method Detail
-
setHeaderField
public void setHeaderField(java.lang.String headerField, byte[] readValue)- Overrides:
setHeaderFieldin classorg.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
-
-