パッケージ org.pcap4j.packet
クラス DnsPacket.DnsHeader
- java.lang.Object
-
- org.pcap4j.packet.AbstractPacket.AbstractHeader
-
- org.pcap4j.packet.DnsPacket.DnsHeader
-
- すべての実装されたインタフェース:
Serializable
,Packet.Header
- 含まれているクラス:
- DnsPacket
public static final class DnsPacket.DnsHeader extends AbstractPacket.AbstractHeader
DNS header+---------------------+ | Header | +---------------------+ | Question | the question for the name server +---------------------+ | Answer | RRs answering the question +---------------------+ | Authority | RRs pointing toward an authority +---------------------+ | Additional | RRs holding additional information +---------------------+ Header: 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ID | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ |QR| Opcode |AA|TC|RD|RA| Z|AD|CD| RCODE | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | QDCOUNT | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ANCOUNT | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | NSCOUNT | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ARCOUNT | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
-
-
メソッドの概要
すべてのメソッド インスタンス・メソッド 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.boolean
equals(Object obj)
Indicates whether some other object is "equal to" this one using return values ofgetRawData()
.List<DnsResourceRecord>
getAdditionalInfo()
short
getAnCount()
int
getAnCountAsInt()
List<DnsResourceRecord>
getAnswers()
short
getArCount()
int
getArCountAsInt()
List<DnsResourceRecord>
getAuthorities()
short
getId()
short
getNsCount()
int
getNsCountAsInt()
DnsOpCode
getOpCode()
short
getQdCount()
int
getQdCountAsInt()
List<DnsQuestion>
getQuestions()
protected List<byte[]>
getRawFields()
Returns a list of byte arrays which represents this header's fields.DnsRCode
getrCode()
boolean
getReservedBit()
boolean
isAuthenticData()
boolean
isAuthoritativeAnswer()
boolean
isCheckingDisabled()
boolean
isRecursionAvailable()
boolean
isRecursionDesired()
boolean
isResponse()
boolean
isTruncated()
int
length()
Returns the header length in bytes.-
クラスから継承されたメソッド org.pcap4j.packet.AbstractPacket.AbstractHeader
buildHexString, buildRawData, calcLength, getRawData, hashCode, toHexString, toString
-
-
-
-
メソッドの詳細
-
getId
public short getId()
- 戻り値:
- id
-
isResponse
public boolean isResponse()
- 戻り値:
- true if the QR bit is set to 1; false otherwise.
-
getOpCode
public DnsOpCode getOpCode()
- 戻り値:
- opCode
-
isAuthoritativeAnswer
public boolean isAuthoritativeAnswer()
- 戻り値:
- true if the AA bit is set to 1; false otherwise.
-
isTruncated
public boolean isTruncated()
- 戻り値:
- true if the TC bit is set to 1; false otherwise.
-
isRecursionDesired
public boolean isRecursionDesired()
- 戻り値:
- true if the RD bit is set to 1; false otherwise.
-
isRecursionAvailable
public boolean isRecursionAvailable()
- 戻り値:
- true if the RA bit is set to 1; false otherwise.
-
getReservedBit
public boolean getReservedBit()
- 戻り値:
- true if the Z bit is set to 1; false otherwise.
-
isAuthenticData
public boolean isAuthenticData()
- 戻り値:
- true if the AD bit is set to 1; false otherwise.
-
isCheckingDisabled
public boolean isCheckingDisabled()
- 戻り値:
- true if the CD bit is set to 1; false otherwise.
-
getrCode
public DnsRCode getrCode()
- 戻り値:
- rCode
-
getQdCount
public short getQdCount()
- 戻り値:
- qdCount
-
getQdCountAsInt
public int getQdCountAsInt()
- 戻り値:
- qdCount
-
getAnCount
public short getAnCount()
- 戻り値:
- anCount
-
getAnCountAsInt
public int getAnCountAsInt()
- 戻り値:
- anCount
-
getNsCount
public short getNsCount()
- 戻り値:
- nsCount
-
getNsCountAsInt
public int getNsCountAsInt()
- 戻り値:
- nsCount
-
getArCount
public short getArCount()
- 戻り値:
- arCount
-
getArCountAsInt
public int getArCountAsInt()
- 戻り値:
- arCount
-
getQuestions
public List<DnsQuestion> getQuestions()
- 戻り値:
- questions
-
getAnswers
public List<DnsResourceRecord> getAnswers()
- 戻り値:
- answers
-
getAuthorities
public List<DnsResourceRecord> getAuthorities()
- 戻り値:
- authorities
-
getAdditionalInfo
public List<DnsResourceRecord> getAdditionalInfo()
- 戻り値:
- additionalInfo
-
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
-
length
public int length()
クラスからコピーされた説明: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.- 定義:
length
インタフェース内Packet.Header
- オーバーライド:
length
クラス内AbstractPacket.AbstractHeader
- 戻り値:
- the length of the byte stream of the header represented by this object in bytes
-
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
-
-