パッケージ 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                    |
     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
     
    バージョン:
    pcap4j 1.7.1
    作成者:
    Kaito Yamada
    関連項目:
    RFC 1035, RFC 2535, 直列化された形式
    • メソッドの詳細

      • 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
      • length

        public int length()
        クラスからコピーされた説明: AbstractPacket.AbstractHeader
        Returns the header length in bytes. This method calls calcLength() 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