パッケージ org.pcap4j.packet

クラス DnsDomainName

  • すべての実装されたインタフェース:
    Serializable

    public final class DnsDomainName
    extends Object
    implements Serializable
    DNS domain name
     labels:
         1            len             1            len
     +-------+-------+-//-+-------+-------+-------+-//-+-------+--//--+-------+
     |  len  |       label        |  len  |       label        |      |len (0)|
     +-------+-------+-//-+-------+-------+-------+-//-+-------+--//--+-------+
    
     pointer:
     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
     | 1  1|                OFFSET                   |
     +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
     
    導入されたバージョン:
    pcap4j 1.7.1
    作成者:
    Kaito Yamada
    関連項目:
    RFC 1035, 直列化された形式
    • フィールドの詳細

      • ROOT_DOMAIN

        public static final DnsDomainName ROOT_DOMAIN
        The root domain (zero)
    • メソッドの詳細

      • getLabels

        public List<String> getLabels()
        戻り値:
        labels
      • getName

        public String getName()
        戻り値:
        name, which is made by joining labels with "."
      • getPointer

        public Short getPointer()
        戻り値:
        pointer (0 - 16383 (inclusive)). May be null.
      • getPointerAsInt

        public Integer getPointerAsInt()
        戻り値:
        pointer (0 - 16383 (inclusive)). May be null.
      • decompress

        public String decompress​(byte[] headerRawData)
                          throws IllegalRawDataException
        パラメータ:
        headerRawData - the raw data of the DNS header including this domain name.
        戻り値:
        decompressed name.
        例外:
        IllegalRawDataException - if an error occurred during decompression or circular reference is detected.
      • getBuilder

        public DnsDomainName.Builder getBuilder()
        戻り値:
        a new Builder object populated with this object's fields.
      • getRawData

        public byte[] getRawData()
        戻り値:
        the raw data.
      • length

        public int length()
        戻り値:
        length
      • toString

        public String toString​(byte[] headerRawData)
        Convert this object to string representation including all fields info and decompressed domain name.
        パラメータ:
        headerRawData - the raw data of the DNS header including this domain name.
        戻り値:
        string representation of this object.
      • hashCode

        public int hashCode()
        オーバーライド:
        hashCode クラス内 Object
      • equals

        public boolean equals​(Object obj)
        オーバーライド:
        equals クラス内 Object