com.h3c.util.pkt

## Class Dns

- java.lang.Object
- - com.h3c.util.pkt.Dns

- All Implemented Interfaces:
    Protocol

      public class Dns
      extends Object
      implements Protocol

  DNS Payload (immutable) and its associated Builder to create DNS requests and responses.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Dns.Builder` Builder (mutable) used to create new protocol instances.
    `static class` | `Dns.ClassType` DNS class type codes.
    `static class` | `Dns.MxData` DNS "MX" resource data (immutable).
    `static class` | `Dns.NextSecData` DNS "NextSECure" resource data (immutable).
    `static class` | `Dns.OpCode` Operation codes set by originator of a request (copied to response).
    `static class` | `Dns.Record` DNS record data store (immutable).
    `static class` | `Dns.RecordType` Record types.
    `static class` | `Dns.ResponseCode` Response codes.
    `static class` | `Dns.ResRecord<T>` DNS resource record data store (immutable).
    `static class` | `Dns.SigData` DNS "Signature" resource data (immutable).
    `static class` | `Dns.SoaData` DNS "Start Of Authority" resource data (immutable).

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Dns.ResRecord<?>[]` | `additionals()` Returns a copy of the additionals array.
    `Dns.ResRecord<?>[]` | `answers()` Returns a copy of the answers.
    `boolean` | `authData()` Returns the response's data authentication flag.
    `Dns.ResRecord<?>[]` | `authorities()` Returns a copy of the authorities array.
    `boolean` | `checkDisabled()` Returns the checking disabled flag.
    `ProtocolId` | `id()` Returns the protocol ID.
    `Dns.OpCode` | `opCode()` Returns the operation code.
    `Dns.Record[]` | `queries()` Returns a copy of the queries.
    `boolean` | `query()` Returns the query flag (true indicates that this is a query request).
    `boolean` | `recurDesired()` Returns the recursion desired flag.
    `Dns.ResponseCode` | `respCode()` Returns the response code.
    `boolean` | `responderAuth()` Returns whether this response is an authoritative response.
    `boolean` | `svrRecurAvail()` Returns the server recursion available flag.
    `String` | `toDebugString()` Returns the protocol debug string.
    `String` | `toString()`
    `boolean` | `trunc()` Returns the truncation flag which indicates that the query or response is truncated.
    `int` | `txId()` Returns the transaction.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### id

          public ProtocolId id()

      Description copied from interface: `Protocol`
      Returns the protocol ID.
      Specified by:
        `id` in interface `Protocol`
      Returns:
        protocol ID

    - #### txId

          public int txId()

      Returns the transaction.
      Returns:
        the transaction ID.

    - #### query

          public boolean query()

      Returns the query flag (true indicates that this is a query request).
      Returns:
        the query flag

    - #### opCode

          public Dns.OpCode opCode()

      Returns the operation code.
      Returns:
        the operation code.

    - #### recurDesired

          public boolean recurDesired()

      Returns the recursion desired flag.
      Returns:
        the recursion desired flag value

    - #### svrRecurAvail

          public boolean svrRecurAvail()

      Returns the server recursion available flag.
      Returns:
        the server recursion available flag.

    - #### trunc

          public boolean trunc()

      Returns the truncation flag which indicates that the query or response is truncated.
      Returns:
        the truncation flag value

    - #### responderAuth

          public boolean responderAuth()

      Returns whether this response is an authoritative response.
      Returns:
        the authoritative flag value

    - #### authData

          public boolean authData()

      Returns the response's data authentication flag.
      Returns:
        the data authentication flag

    - #### checkDisabled

          public boolean checkDisabled()

      Returns the checking disabled flag.
      Returns:
        the checking disabled flag

    - #### respCode

          public Dns.ResponseCode respCode()

      Returns the response code.
      Returns:
        the response code

    - #### queries

          public Dns.Record[] queries()

      Returns a copy of the queries.
      Returns:
        the queries array

    - #### answers

          public Dns.ResRecord<?>[] answers()

      Returns a copy of the answers.
      Returns:
        the answers array

    - #### authorities

          public Dns.ResRecord<?>[] authorities()

      Returns a copy of the authorities array.
      Returns:
        the authorities array

    - #### additionals

          public Dns.ResRecord<?>[] additionals()

      Returns a copy of the additionals array.
      Returns:
        the additionals array

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toDebugString

          public String toDebugString()

      Description copied from interface: `Protocol`
      Returns the protocol debug string.
      Specified by:
        `toDebugString` in interface `Protocol`
      Returns:
        the protocol debug string

Copyright © 2014. All Rights Reserved.