パッケージ 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 StringbuildString()This method builds the valuetoString()will return.protected intcalcHashCode()This method builds the valuehashCode()will return using the byte arraygetRawData()returns.protected intcalcLength()This method calculates the valuelength()will return by adding up the lengths of byte arrays in the listgetRawFields()returns.booleanequals(Object obj)Indicates whether some other object is "equal to" this one using return values ofgetRawData().booleangetDontFragmentFlag()Inet4AddressgetDstAddr()shortgetFragmentOffset()shortgetHeaderChecksum()shortgetIdentification()intgetIdentificationAsInt()bytegetIhl()intgetIhlAsInt()booleangetMoreFragmentFlag()List<IpV4Packet.IpV4Option>getOptions()byte[]getPadding()IpNumbergetProtocol()protected List<byte[]>getRawFields()Returns a list of byte arrays which represents this header's fields.booleangetReservedFlag()Inet4AddressgetSrcAddr()IpV4Packet.IpV4TosgetTos()shortgetTotalLength()intgetTotalLengthAsInt()bytegetTtl()intgetTtlAsInt()IpVersiongetVersion()booleanhasValidChecksum(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.AbstractHeaderReturns 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.AbstractHeaderThis 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.AbstractHeaderThis method builds the valuetoString()will return.- オーバーライド:
buildStringクラス内AbstractPacket.AbstractHeader- 戻り値:
- a string representation of this object
-
equals
public boolean equals(Object obj)
クラスからコピーされた説明:AbstractPacket.AbstractHeaderIndicates 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.AbstractHeaderThis 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
-
-