Class ICMP
- java.lang.Object
-
- org.opendaylight.openflowplugin.libraries.liblldp.Packet
-
- org.opendaylight.genius.mdsalutil.packet.ICMP
-
public class ICMP extends org.opendaylight.openflowplugin.libraries.liblldp.Packet
Class that represents the ICMP packet objects.
-
-
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.
-
-
-
Method Detail
-
setHeaderField
public void setHeaderField(java.lang.String headerField, byte[] readValue)
- Overrides:
setHeaderField
in classorg.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 classorg.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 classorg.opendaylight.openflowplugin.libraries.liblldp.Packet
- Throws:
org.opendaylight.openflowplugin.libraries.liblldp.PacketException
-
postDeserializeCustomOperation
protected void postDeserializeCustomOperation(byte[] data, int endBitOffset)
- Overrides:
postDeserializeCustomOperation
in classorg.opendaylight.openflowplugin.libraries.liblldp.Packet
-
getChecksum
public short getChecksum()
Gets the checksum value stored.- Returns:
- the checksum
-
-