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.PacketClass that represents the ICMP packet objects.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description shortgetChecksum()Gets the checksum value stored.bytegetCode()Gets the ICMP code (type subtype) for the current ICMP object instance.intgetHeaderSize()Gets the header size in bits.shortgetIdentifier()Gets the ICMP identifier of the current ICMP object instance.shortgetSequenceNumber()Gets the ICMP sequence number of the current ICMP object instance.bytegetType()Returns the type field of the current ICMP packet.protected voidpostDeserializeCustomOperation(byte[] data, int endBitOffset)protected voidpostSerializeCustomOperation(byte[] serializedBytes)ICMPsetChecksum(short checksum)Sets the ICMP checksum for the current ICMP object instance.ICMPsetCode(byte code)Sets the ICMP code (type subtype) for the current ICMP object instance.voidsetHeaderField(java.lang.String headerField, byte[] readValue)ICMPsetIdentifier(short identifier)Sets the ICMP identifier for the current ICMP object instance.ICMPsetSequenceNumber(short seqNumber)Sets the ICMP sequence number for the current ICMP object instance.ICMPsetType(byte type)Sets the type for the current ICMP message.
-
-
-
Method Detail
-
setHeaderField
public void setHeaderField(java.lang.String headerField, byte[] readValue)- Overrides:
setHeaderFieldin 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.
-
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:
getHeaderSizein 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:
postSerializeCustomOperationin classorg.opendaylight.openflowplugin.libraries.liblldp.Packet- Throws:
org.opendaylight.openflowplugin.libraries.liblldp.PacketException
-
postDeserializeCustomOperation
protected void postDeserializeCustomOperation(byte[] data, int endBitOffset)- Overrides:
postDeserializeCustomOperationin classorg.opendaylight.openflowplugin.libraries.liblldp.Packet
-
getChecksum
public short getChecksum()
Gets the checksum value stored.- Returns:
- the checksum
-
-