API Reference DNS v0.2.2

View Source

Modules

DNS

Documentation for DNS.

DNS Class

Note

As noted in [RFC6762], Multicast DNS can only carry DNS records with classes in the range 0-32767. Classes in the range 32768 to 65535 are incompatible with Multicast DNS. But Multicast DNS uses the 32768(0x8000) as a special value to indicate a cache-flush request.

DNS Message

All communications inside of the domain protocol are carried in a single format called a message. The top level format of message is divided into 5 sections (some of which are empty in certain cases) shown below

DNS Domain

EDNS0 moudle

EDNS0 is defined in RFC6891

DNS COOKIE Option

The DNS COOKIE option is an OPT RR [RFC6891] option that can be included in the RDATA portion of an OPT RR in DNS requests and responses. The option length varies, depending on the circumstances in which it is being used. There are two cases, as described below. Both use the same OPTION-CODE; they are distinguished by their length.

edns-client-subnet

Option Code: 8

DNS EDNS0 Option Codes (OPT)

DNS Header

The header contains the following fields

DNS OpCode

OpCode  Name    Reference
0   Query   [RFC1035]
1   IQuery (Inverse Query, OBSOLETE)    [RFC3425]
2   Status  [RFC1035]
3   Unassigned
4   Notify  [RFC1996]
5   Update  [RFC2136]
6   DNS Stateful Operations (DSO)   [RFC8490]
7-15    Unassigned

Reference

DNS Question

DNS RCode

DNS return code

Record is a struct that represents a DNS resource record.

DNS RRTypes

DNS Resource Record Type