Class ICMP


  • public class ICMP
    extends org.opendaylight.openflowplugin.libraries.liblldp.Packet
    Class that represents the ICMP packet 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
      ICMP()
      Default constructor that creates and sets the hash map values.
      ICMP​(boolean writeAccess)
      Constructor that sets the access level for the packet.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      short getChecksum()
      Gets the checksum value stored.
      byte getCode()
      Gets the ICMP code (type subtype) for the current ICMP object instance.
      int getHeaderSize()
      Gets the header size in bits.
      short getIdentifier()
      Gets the ICMP identifier of the current ICMP object instance.
      short getSequenceNumber()
      Gets the ICMP sequence number of the current ICMP object instance.
      byte getType()
      Returns the type field of the current ICMP packet.
      protected void postDeserializeCustomOperation​(byte[] data, int endBitOffset)  
      protected void postSerializeCustomOperation​(byte[] serializedBytes)  
      ICMP setChecksum​(short checksum)
      Sets the ICMP checksum for the current ICMP object instance.
      ICMP setCode​(byte code)
      Sets the ICMP code (type subtype) for the current ICMP object instance.
      void setHeaderField​(java.lang.String headerField, byte[] readValue)  
      ICMP setIdentifier​(short identifier)
      Sets the ICMP identifier for the current ICMP object instance.
      ICMP setSequenceNumber​(short seqNumber)
      Sets the ICMP sequence number for the current ICMP object instance.
      ICMP setType​(byte type)
      Sets the type for the current ICMP message.
      • Methods inherited from class org.opendaylight.openflowplugin.libraries.liblldp.Packet

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

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

      • ICMP

        public ICMP()
        Default constructor that creates and sets the hash map values.
      • ICMP

        public ICMP​(boolean writeAccess)
        Constructor that sets the access level for the packet.
        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
      • setType

        public ICMP setType​(byte type)
        Sets the type for the current ICMP message.
        Parameters:
        type - The ICMP message type
        Returns:
        This ICMP object
      • getType

        public byte getType()
        Returns the type field of the current ICMP packet.
        Returns:
        The type code of the current ICMP packet
      • setCode

        public ICMP setCode​(byte code)
        Sets the ICMP code (type subtype) for the current ICMP object instance.
        Parameters:
        code - The ICMP message type subtype
        Returns:
        This ICMP object
      • getCode

        public byte getCode()
        Gets the ICMP code (type subtype) for the current ICMP object instance.
        Returns:
        The ICMP message type subtype
      • setChecksum

        public ICMP setChecksum​(short checksum)
        Sets the ICMP checksum for the current ICMP object instance.
        Parameters:
        checksum - - short
        Returns:
        ICMP
      • setIdentifier

        public ICMP setIdentifier​(short identifier)
        Sets the ICMP identifier for the current ICMP object instance.
        Parameters:
        identifier - - short
        Returns:
        ICMP
      • getIdentifier

        public short getIdentifier()
        Gets the ICMP identifier of the current ICMP object instance.
        Returns:
        short - identifier
      • setSequenceNumber

        public ICMP setSequenceNumber​(short seqNumber)
        Sets the ICMP sequence number for the current ICMP object instance.
        Parameters:
        seqNumber - sequence number
        Returns:
        sequence number
      • getSequenceNumber

        public short getSequenceNumber()
        Gets the ICMP sequence number of the current ICMP object instance.
        Returns:
        short - seqNumber
      • getHeaderSize

        public int getHeaderSize()
        Gets the header size in bits.
        Overrides:
        getHeaderSize in class org.opendaylight.openflowplugin.libraries.liblldp.Packet
        Returns:
        The ICMP header size in bits
      • postSerializeCustomOperation

        protected void postSerializeCustomOperation​(byte[] serializedBytes)
                                             throws org.opendaylight.openflowplugin.libraries.liblldp.PacketException
        Overrides:
        postSerializeCustomOperation in class org.opendaylight.openflowplugin.libraries.liblldp.Packet
        Throws:
        org.opendaylight.openflowplugin.libraries.liblldp.PacketException
      • postDeserializeCustomOperation

        protected void postDeserializeCustomOperation​(byte[] data,
                                                      int endBitOffset)
        Overrides:
        postDeserializeCustomOperation in class org.opendaylight.openflowplugin.libraries.liblldp.Packet
      • getChecksum

        public short getChecksum()
        Gets the checksum value stored.
        Returns:
        the checksum