Package org.pcap4j.packet
Class IcmpV4InformationReplyPacket.IcmpV4InformationReplyHeader
- java.lang.Object
-
- org.pcap4j.packet.AbstractPacket.AbstractHeader
-
- org.pcap4j.packet.IcmpV4InformationReplyPacket.IcmpV4InformationReplyHeader
-
- All Implemented Interfaces:
java.io.Serializable
,Packet.Header
- Enclosing class:
- IcmpV4InformationReplyPacket
public static final class IcmpV4InformationReplyPacket.IcmpV4InformationReplyHeader extends AbstractPacket.AbstractHeader
- Since:
- pcap4j 0.9.11
- Author:
- Kaito Yamada
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
ICMP_IDENTIFIABLE_HEADER_SIZE
-
Method Summary
Modifier and Type Method Description protected java.lang.String
buildString()
This method builds the valuetoString()
will return.protected int
calcHashCode()
This method builds the valuehashCode()
will return using the byte arraygetRawData()
returns.boolean
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one using return values ofgetRawData()
.protected java.lang.String
getHeaderName()
short
getIdentifier()
int
getIdentifierAsInt()
protected java.util.List<byte[]>
getRawFields()
Returns a list of byte arrays which represents this header's fields.short
getSequenceNumber()
int
getSequenceNumberAsInt()
int
length()
Returns the header length in bytes.-
Methods inherited from class org.pcap4j.packet.AbstractPacket.AbstractHeader
buildHexString, buildRawData, calcLength, getRawData, hashCode, toHexString, toString
-
-
-
-
Field Detail
-
ICMP_IDENTIFIABLE_HEADER_SIZE
protected static final int ICMP_IDENTIFIABLE_HEADER_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getHeaderName
protected java.lang.String getHeaderName()
-
getIdentifier
public short getIdentifier()
- Returns:
- identifier
-
getIdentifierAsInt
public int getIdentifierAsInt()
- Returns:
- identifier
-
getSequenceNumber
public short getSequenceNumber()
- Returns:
- sequenceNumber
-
getSequenceNumberAsInt
public int getSequenceNumberAsInt()
- Returns:
- sequenceNumber
-
getRawFields
protected java.util.List<byte[]> getRawFields()
Description copied from class:AbstractPacket.AbstractHeader
Returns a list of byte arrays which represents this header's fields. This method is called bycalcLength()
andbuildRawData()
.- Specified by:
getRawFields
in classAbstractPacket.AbstractHeader
- Returns:
- a list of byte arrays which represents this header's fields
-
length
public int length()
Description copied from class:AbstractPacket.AbstractHeader
Returns the header length in bytes. This method callscalcLength()
and caches the return value when it is called for the first time, and then, this method returns the cached value from the second time.- Specified by:
length
in interfacePacket.Header
- Overrides:
length
in classAbstractPacket.AbstractHeader
- Returns:
- the length of the byte stream of the header represented by this object in bytes
-
buildString
protected java.lang.String buildString()
Description copied from class:AbstractPacket.AbstractHeader
This method builds the valuetoString()
will return.- Overrides:
buildString
in classAbstractPacket.AbstractHeader
- Returns:
- a string representation of this object
-
equals
public boolean equals(java.lang.Object obj)
Description copied from class:AbstractPacket.AbstractHeader
Indicates whether some other object is "equal to" this one using return values ofgetRawData()
. This method should be overridden so that it does more strict comparisons more efficiently.- Overrides:
equals
in classAbstractPacket.AbstractHeader
-
calcHashCode
protected int calcHashCode()
Description copied from class:AbstractPacket.AbstractHeader
This method builds the valuehashCode()
will return using the byte arraygetRawData()
returns. This method may be better to be overridden for performance reason.- Overrides:
calcHashCode
in classAbstractPacket.AbstractHeader
- Returns:
- a calculated hash code value for the object
-
-