Documentation ¶
Index ¶
Constants ¶
View Source
const (
DomainPattern = "^(?:[_a-z0-9](?:[_a-z0-9-]{0,61}[a-z0-9]\\.)|(?:[0-9]+/[0-9]{2})\\.)+(?:[a-z](?:[a-z0-9-]{0,61}[a-z0-9])?)?$"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Query ¶
type Query struct { ID uint16 // An arbitrary 16 bit request identifier (same id is used in the response) QR bool // A 1 bit flat specifying whether this message is a query (0) or a response (1) Opcode uint8 // A 4 bit fields that specifies the query type; 0 (standard), 1 (inverse), 2 (status), 4 (notify), 5 (update) AA bool // Authoritative answer TC bool // 1 bit flag specifying if the message has been truncated RD bool // 1 bit flag to specify if recursion is desired (if the DNS server we secnd out request to doesn't know the answer to our query, it can recursively ask other DNS servers) RA bool // Recursive available Z bool // Reserved for future use AD bool CD bool ResponseCode uint8 QDCount uint16 // Number of entries in the question section ANCount uint16 // Number of answers NSCount uint16 // Number of authorities ARCount uint16 // Number of additional records Questions []Question }
func DecodeQuery ¶
Click to show internal directories.
Click to hide internal directories.