パッケージ org.pcap4j.packet
クラス IpV4Packet.IpV4Header
- java.lang.Object
-
- org.pcap4j.packet.AbstractPacket.AbstractHeader
-
- org.pcap4j.packet.IpV4Packet.IpV4Header
-
- すべての実装されたインタフェース:
Serializable
,IpPacket.IpHeader
,Packet.Header
- 含まれているクラス:
- IpV4Packet
public static final class IpV4Packet.IpV4Header extends AbstractPacket.AbstractHeader implements IpPacket.IpHeader
- 導入されたバージョン:
- pcap4j 0.9.1
- 作成者:
- Kaito Yamada
- 関連項目:
- 直列化された形式
-
-
メソッドの概要
すべてのメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 protected String
buildString()
This method builds the valuetoString()
will return.protected int
calcHashCode()
This method builds the valuehashCode()
will return using the byte arraygetRawData()
returns.protected int
calcLength()
This method calculates the valuelength()
will return by adding up the lengths of byte arrays in the listgetRawFields()
returns.boolean
equals(Object obj)
Indicates whether some other object is "equal to" this one using return values ofgetRawData()
.boolean
getDontFragmentFlag()
Inet4Address
getDstAddr()
short
getFragmentOffset()
short
getHeaderChecksum()
short
getIdentification()
int
getIdentificationAsInt()
byte
getIhl()
int
getIhlAsInt()
boolean
getMoreFragmentFlag()
List<IpV4Packet.IpV4Option>
getOptions()
byte[]
getPadding()
IpNumber
getProtocol()
protected List<byte[]>
getRawFields()
Returns a list of byte arrays which represents this header's fields.boolean
getReservedFlag()
Inet4Address
getSrcAddr()
IpV4Packet.IpV4Tos
getTos()
short
getTotalLength()
int
getTotalLengthAsInt()
byte
getTtl()
int
getTtlAsInt()
IpVersion
getVersion()
boolean
hasValidChecksum(boolean acceptZero)
-
クラスから継承されたメソッド org.pcap4j.packet.AbstractPacket.AbstractHeader
buildHexString, buildRawData, getRawData, hashCode, length, toHexString, toString
-
インタフェースから継承されたメソッド org.pcap4j.packet.Packet.Header
getRawData, length
-
-
-
-
メソッドの詳細
-
getVersion
public IpVersion getVersion()
- 定義:
getVersion
インタフェース内IpPacket.IpHeader
- 戻り値:
- version
-
getIhl
public byte getIhl()
- 戻り値:
- ihl
-
getIhlAsInt
public int getIhlAsInt()
- 戻り値:
- ihl
-
getTos
public IpV4Packet.IpV4Tos getTos()
- 戻り値:
- tos
-
getTotalLength
public short getTotalLength()
- 戻り値:
- totalLength
-
getTotalLengthAsInt
public int getTotalLengthAsInt()
- 戻り値:
- totalLength
-
getIdentification
public short getIdentification()
- 戻り値:
- identification
-
getIdentificationAsInt
public int getIdentificationAsInt()
- 戻り値:
- identification
-
getReservedFlag
public boolean getReservedFlag()
- 戻り値:
- reservedFlag
-
getDontFragmentFlag
public boolean getDontFragmentFlag()
- 戻り値:
- dontFragmentFlag
-
getMoreFragmentFlag
public boolean getMoreFragmentFlag()
- 戻り値:
- moreFragmentFlag
-
getFragmentOffset
public short getFragmentOffset()
- 戻り値:
- fragmentOffset
-
getTtl
public byte getTtl()
- 戻り値:
- ttl
-
getTtlAsInt
public int getTtlAsInt()
- 戻り値:
- ttl
-
getProtocol
public IpNumber getProtocol()
- 定義:
getProtocol
インタフェース内IpPacket.IpHeader
- 戻り値:
- an IpNumber object which indicates the protocol of the following header.
-
getHeaderChecksum
public short getHeaderChecksum()
- 戻り値:
- headerChecksum
-
getSrcAddr
public Inet4Address getSrcAddr()
- 定義:
getSrcAddr
インタフェース内IpPacket.IpHeader
- 戻り値:
- srcAddr
-
getDstAddr
public Inet4Address getDstAddr()
- 定義:
getDstAddr
インタフェース内IpPacket.IpHeader
- 戻り値:
- dstAddr
-
getOptions
public List<IpV4Packet.IpV4Option> getOptions()
- 戻り値:
- options
-
getPadding
public byte[] getPadding()
- 戻り値:
- padding
-
hasValidChecksum
public boolean hasValidChecksum(boolean acceptZero)
- パラメータ:
acceptZero
- acceptZero- 戻り値:
- true if the packet represented by this object has a valid checksum; false otherwise.
-
getRawFields
protected List<byte[]> getRawFields()
クラスからコピーされた説明:AbstractPacket.AbstractHeader
Returns a list of byte arrays which represents this header's fields. This method is called bycalcLength()
andbuildRawData()
.- 定義:
getRawFields
クラス内AbstractPacket.AbstractHeader
- 戻り値:
- a list of byte arrays which represents this header's fields
-
calcLength
protected int calcLength()
クラスからコピーされた説明:AbstractPacket.AbstractHeader
This method calculates the valuelength()
will return by adding up the lengths of byte arrays in the listgetRawFields()
returns.- オーバーライド:
calcLength
クラス内AbstractPacket.AbstractHeader
- 戻り値:
- a calculated length
-
buildString
protected String buildString()
クラスからコピーされた説明:AbstractPacket.AbstractHeader
This method builds the valuetoString()
will return.- オーバーライド:
buildString
クラス内AbstractPacket.AbstractHeader
- 戻り値:
- a string representation of this object
-
equals
public boolean equals(Object obj)
クラスからコピーされた説明: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.- オーバーライド:
equals
クラス内AbstractPacket.AbstractHeader
-
calcHashCode
protected int calcHashCode()
クラスからコピーされた説明: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.- オーバーライド:
calcHashCode
クラス内AbstractPacket.AbstractHeader
- 戻り値:
- a calculated hash code value for the object
-
-