Class UDP


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

      • Fields inherited from class org.opendaylight.openflowplugin.libraries.liblldp.Packet

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

      Constructors 
      Constructor Description
      UDP()  
      UDP​(boolean writeAccess)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      short getChecksum()
      Get the stored checksum value of the UDP header.
      int getDestinationPort()
      Get the stored destination port.
      short getLength()
      Gets the stored length of UDP header.
      int getSourcePort()
      Get the stored source port.
      UDP setChecksum​(short udpChecksum)
      Set the checksum for the current UDP object instance.
      UDP setDestinationPort​(int udpDestinationPort)
      Sets the destinationPort value for the current UDP object instance.
      void setHeaderField​(java.lang.String headerField, byte[] readValue)
      Store the value read from data stream in hdrFieldMap.
      UDP setLength​(short udpLength)
      Set the UDP header length value for the current UDP object instance.
      UDP setSourcePort​(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
      • Methods inherited from class java.lang.Object

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

      • UDP

        public UDP()
      • UDP

        public UDP​(boolean writeAccess)
    • 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:
        setHeaderField in class org.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