Class UDP
- java.lang.Object
-
- org.opendaylight.openflowplugin.libraries.liblldp.Packet
-
- org.opendaylight.genius.mdsalutil.packet.UDP
-
public class UDP extends org.opendaylight.openflowplugin.libraries.liblldp.PacketClass that represents the UDP datagram objects.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description shortgetChecksum()Get the stored checksum value of the UDP header.intgetDestinationPort()Get the stored destination port.shortgetLength()Gets the stored length of UDP header.intgetSourcePort()Get the stored source port.UDPsetChecksum(short udpChecksum)Set the checksum for the current UDP object instance.UDPsetDestinationPort(int udpDestinationPort)Sets the destinationPort value for the current UDP object instance.voidsetHeaderField(java.lang.String headerField, byte[] readValue)Store the value read from data stream in hdrFieldMap.UDPsetLength(short udpLength)Set the UDP header length value for the current UDP object instance.UDPsetSourcePort(int udpSourcePort)Sets the sourcePort value for the current UDP 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
-
-
-
-
Method Detail
-
getSourcePort
public int getSourcePort()
Get the stored source port.- Returns:
- int - the sourcePort
-
getDestinationPort
public int getDestinationPort()
Get the stored destination port.- Returns:
- int - the destinationPort
-
getLength
public short getLength()
Gets the stored length of UDP header.- Returns:
- short - the length
-
getChecksum
public short getChecksum()
Get the stored checksum value of the UDP header.- Returns:
- short - the checksum
-
setHeaderField
public void setHeaderField(java.lang.String headerField, byte[] readValue)Store the value read from data stream in hdrFieldMap.- Overrides:
setHeaderFieldin classorg.opendaylight.openflowplugin.libraries.liblldp.Packet
-
setSourcePort
public UDP setSourcePort(int udpSourcePort)
Sets the sourcePort value for the current UDP object instance.- Parameters:
udpSourcePort- int source port to set- Returns:
- UDP
-
setDestinationPort
public UDP setDestinationPort(int udpDestinationPort)
Sets the destinationPort value for the current UDP object instance.- Parameters:
udpDestinationPort- int destination port to set- Returns:
- UDP
-
setLength
public UDP setLength(short udpLength)
Set the UDP header length value for the current UDP object instance.- Parameters:
udpLength- - short - the length to set- Returns:
- UDP
-
setChecksum
public UDP setChecksum(short udpChecksum)
Set the checksum for the current UDP object instance.- Parameters:
udpChecksum- - short - the checksum to set- Returns:
- UDP
-
-