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.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
-
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
-
-
-
-
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:
setHeaderField
in 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
-
-