Documentation ¶
Overview ¶
Package dns traces DNS activity and caches DNS lookups for reverse DNS capability
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Hostname ¶
type Hostname = *intern.StringValue
Hostname represents a DNS hostname (aka domain name)
func HostnameFromBytes ¶
HostnameFromBytes converts a byte slice representing a hostname to a dns.Hostname
func ToHostname ¶
ToHostname converts from a string to a dns.Hostname
type Key ¶
type Key struct { ServerIP util.Address ClientIP util.Address ClientPort uint16 // ConnectionType will be either TCP or UDP Protocol uint8 }
Key is an identifier for a set of DNS connections
type QueryType ¶
type QueryType int
QueryType is the DNS record type
const ( TypeA QueryType = 1 // a host address TypeNS QueryType = 2 // an authoritative name server TypeMD QueryType = 3 // a mail destination (Obsolete - use MX) TypeMF QueryType = 4 // a mail forwarder (Obsolete - use MX) TypeCNAME QueryType = 5 // the canonical name for an alias TypeSOA QueryType = 6 // marks the start of a zone of authority TypeMB QueryType = 7 // a mailbox domain name (EXPERIMENTAL) TypeMG QueryType = 8 // a mail group member (EXPERIMENTAL) TypeMR QueryType = 9 // a mail rename domain name (EXPERIMENTAL) TypeNULL QueryType = 10 // a null RR (EXPERIMENTAL) TypeWKS QueryType = 11 // a well known service description TypePTR QueryType = 12 // a domain name pointer TypeHINFO QueryType = 13 // host information TypeMINFO QueryType = 14 // mailbox or mail list information TypeMX QueryType = 15 // mail exchange TypeTXT QueryType = 16 // text strings TypeAAAA QueryType = 28 // a IPv6 host address [RFC3596] TypeSRV QueryType = 33 // server discovery [RFC2782] [RFC6195] TypeOPT QueryType = 41 // OPT Pseudo-RR [RFC6891] TypeURI QueryType = 256 // URI RR [RFC7553] )
DNSType known values.
type ReverseDNS ¶
type ReverseDNS interface { Resolve(map[util.Address]struct{}) map[util.Address][]Hostname GetDNSStats() StatsByKeyByNameByType // WaitForDomain is used in tests to ensure a domain has been // seen by the ReverseDNS. WaitForDomain(domain string) error Start() error Close() }
ReverseDNS translates IPs to names
Click to show internal directories.
Click to hide internal directories.