Packet.HeaderField
Constructor and Description |
---|
ICMP() |
Modifier and Type | Method and Description |
---|---|
ICMP |
clone()
Return a deep copy of this packet.
|
short |
getChecksum()
Return the ICMP checksum in this packet.
|
byte |
getCode()
Gets the ICMP code (type subtype) for the current ICMP object instance.
|
protected Map<String,Packet.HeaderField> |
getHeaderFormat()
Return a map that determines the format of the packet.
|
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 offset)
This method re-computes the checksum of the bits received on the wire
and validates it with the checksum in the bits received.
|
protected void |
postSerializeCustomOperation(byte[] myBytes)
This method gets called at the end of the serialization process.
|
ICMP |
setChecksum(short cksum)
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.
|
ICMP |
setIdentifier(short id)
Sets the ICMP identifier for the current ICMP object instance.
|
ICMP |
setSequenceNumber(short seq)
Sets the ICMP sequence number for the current ICMP object instance.
|
ICMP |
setType(byte type)
Sets the type for the current ICMP message.
|
deserialize, equals, equalsField, getByte, getBytes, getFieldNumBits, getFieldNumBits, getFieldOffset, getFieldOffset, getHeaderFieldMap, getInt, getIp4Network, getPayload, getRawPayload, getRawPayloadSize, getShort, hashCode, isCorrupted, isZeroShort, serialize, setCorrupted, setHeaderField, setPayload, setPayloadClass, setRawPayload, toString
public ICMP setType(byte type)
type
- The ICMP message typepublic byte getType()
public ICMP setCode(byte code)
code
- The ICMP message type subtypepublic byte getCode()
public ICMP setChecksum(short cksum)
cksum
- The checksum value to be set.public short getChecksum()
public ICMP setIdentifier(short id)
id
- The ICMP identifier to be set.public short getIdentifier()
public ICMP setSequenceNumber(short seq)
seq
- The ICMP sequence number to be set.public short getSequenceNumber()
public int getHeaderSize()
getHeaderSize
in class Packet
protected Map<String,Packet.HeaderField> getHeaderFormat()
getHeaderFormat
in class Packet
protected void postSerializeCustomOperation(byte[] myBytes) throws PacketException
postSerializeCustomOperation
in class Packet
myBytes
- Serialized bytes.PacketException
- An error occurred.protected void postDeserializeCustomOperation(byte[] data, int offset)
postDeserializeCustomOperation
in class Packet
data
- The byte stream representing the Ethernet frame.offset
- The bit offset from where the byte array corresponding to
this Packet starts in the frameCopyright © 2018 OpenDaylight. All rights reserved.