utils

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GooglePrimary            = DNSServer("8.8.8.8")
	GoogleSecondary          = DNSServer("8.8.4.4")
	Quad9Primary             = DNSServer("9.9.9.9")
	Quad9Secondary           = DNSServer("149.112.112.112")
	OpenDNSHomePrimary       = DNSServer("208.67.222.222")
	OpenDNSHomeSecondary     = DNSServer("208.67.220.220")
	CloudflarePrimary        = DNSServer("1.1.1.1")
	CloudflareSecondary      = DNSServer("1.0.0.1")
	CleanBrowsingPrimary     = DNSServer("185.228.168.9")
	CleanBrowsingSecondary   = DNSServer("185.228.169.9")
	VerisignPrimary          = DNSServer("64.6.64.6")
	VerisignSecondary        = DNSServer("64.6.65.6")
	AlternateDNSPrimary      = DNSServer("198.101.242.72")
	AlternateDNSSecondary    = DNSServer("23.253.163.53")
	AdGuardDNSPrimary        = DNSServer("94.140.14.14")
	AdGuardDNSSecondary      = DNSServer("94.140.15.15")
	DNSWATCHPrimary          = DNSServer("84.200.69.80")
	DNSWATCHSecondary        = DNSServer("84.200.70.40")
	ComodoSecureDNSPrimary   = DNSServer("8.26.56.26")
	ComodoSecureDNSSecondary = DNSServer("8.20.247.20")
	CenturyLinkPrimary       = DNSServer("205.171.3.66")
	CenturyLinkSecondary     = DNSServer("205.171.202.166")
	SafeDNSPrimary           = DNSServer("195.46.39.39")
	SafeDNSSecondary         = DNSServer("195.46.39.40")
	OpenNICPrimary           = DNSServer("192.71.245.208")
	OpenNICSecondary         = DNSServer("94.247.43.254")
	DynPrimary               = DNSServer("216.146.35.35")
	DynSecondary             = DNSServer("216.146.36.36")
	FreeDNSPrimary           = DNSServer("45.33.97.5")
	FreeDNSSecondary         = DNSServer("37.235.1.177")
	YandexDNSPrimary         = DNSServer("77.88.8.8")
	YandexDNSSecondary       = DNSServer("77.88.8.1")
	UncensoredDNSPrimary     = DNSServer("91.239.100.100")
	UncensoredDNSSecondary   = DNSServer("89.233.43.71")
	HurricaneElectricPrimary = DNSServer("74.82.42.42")
	PuntCATPrimary           = DNSServer("109.69.8.51")
	NeustarPrimary           = DNSServer("156.154.70.5")
	NeustarSecondary         = DNSServer("156.154.71.5")
	FourthEstatePrimary      = DNSServer("45.77.165.194")
	FourthEstateSecondary    = DNSServer("45.32.36.36")
)
View Source
const (
	NoError  = 0
	FormErr  = 1
	ServFail = 2
	NXDomain = 3
	NotImp   = 4
	Refused  = 5
	YXDomain = 6
	YXRRSet  = 7
	NXRRSet  = 8
	NotAuth  = 9
	NotZone  = 10
	BADVERS  = 16
	BADSIG   = 17
	BADKEY   = 18
	BADTIME  = 19
	BADMODE  = 20
	BADNAME  = 21
	BADALG   = 22
)
View Source
const (
	Query  = 0
	IQuery = 1
	Status = 2
	Notify = 4
	Update = 5
)

New OpCode assignments require an IETF Standards Action. Currently DNS OpCodes are assigned as follows:

View Source
const (
	InternetClass = RecordClass(0x0001)
	CSNetClass    = RecordClass(0x0002)
	ChaosClass    = RecordClass(0x0003)
	HESIODClass   = RecordClass(0x0004)
	NoneClass     = RecordClass(0x00fe)
	AllClass      = RecordClass(0x00ff)
	AnyClass      = RecordClass(0x00ff)
)
View Source
const (
	A     = RecordType(0x0001)
	NS    = RecordType(0x0002)
	MD    = RecordType(0x0003)
	MF    = RecordType(0x0004)
	CNAME = RecordType(0x0005)
	SOA   = RecordType(0x0006)
	MB    = RecordType(0x0007)
	MG    = RecordType(0x0008)
	MR    = RecordType(0x0009)
	NULL  = RecordType(0x000a)
	WKS   = RecordType(0x000b)
	PTR   = RecordType(0x000c)
	HINFO = RecordType(0x000d)
	MINFO = RecordType(0x000e)
	MX    = RecordType(0x000f)

	TXT     = RecordType(0x0010)
	RP      = RecordType(0x0011)
	AFSDB   = RecordType(0x0012)
	X25     = RecordType(0x0013)
	ISDN    = RecordType(0x0014)
	RT      = RecordType(0x0015)
	NSAP    = RecordType(0x0016)
	NSAPPTR = RecordType(0x0017)
	SIG     = RecordType(0x0018)
	KEY     = RecordType(0x0019)
	PX      = RecordType(0x001a)
	GPOS    = RecordType(0x001b)
	AAAA    = RecordType(0x001c)
	LOC     = RecordType(0x001d)
	NXT     = RecordType(0x001e)
	EID     = RecordType(0x001f)

	NIMLOC = RecordType(0x0020)
	SRV    = RecordType(0x0021)
	ATMA   = RecordType(0x0022)
	NAPTR  = RecordType(0x0023)
	KX     = RecordType(0x0024)
	CERT   = RecordType(0x0025)
	A6     = RecordType(0x0026)
	DNAME  = RecordType(0x0027)
	SINK   = RecordType(0x0028)
	OPT    = RecordType(0x0029)
	DS     = RecordType(0x002B)
	RRSIG  = RecordType(0x002E)
	NSEC   = RecordType(0x002F)

	DNSKEY = RecordType(0x0030)
	DHCID  = RecordType(0x0031)

	UINFO  = RecordType(0x0064)
	UID    = RecordType(0x0065)
	GID    = RecordType(0x0066)
	UNSPEC = RecordType(0x0067)

	ADDRS = RecordType(0x00f8)
	TKEY  = RecordType(0x00f9)
	TSIG  = RecordType(0x00fa)
	IXFR  = RecordType(0x00fb)
	AXFR  = RecordType(0x00fc)
	MAILB = RecordType(0x00fd)
	MAILA = RecordType(0x00fe)
	ANY   = RecordType(0x00ff)

	WINS  = RecordType(0xff01)
	WINSR = RecordType(0xff02)
)

Variables

This section is empty.

Functions

func B2i

func B2i(b bool) int

func FormatErrorCode

func FormatErrorCode(err int) string

func FormatOpCode

func FormatOpCode(oc int) string

func I2b

func I2b(b int) bool

func PrintlnUint16WithZeroPad

func PrintlnUint16WithZeroPad(value uint16)

func PrintlnUint32WithZeroPad

func PrintlnUint32WithZeroPad(value uint32)

func PrintlnUint64WithZeroPad

func PrintlnUint64WithZeroPad(value uint64)

func PrintlnUint8WithZeroPad

func PrintlnUint8WithZeroPad(value uint8)

func ReadAABit

func ReadAABit(row uint16) bool

func ReadADBit

func ReadADBit(row uint16) bool

func ReadBoolFromUint16

func ReadBoolFromUint16(row uint16, shift int) bool

func ReadCDBit

func ReadCDBit(row uint16) bool

func ReadOpcode

func ReadOpcode(row uint16) uint8

func ReadQRBit

func ReadQRBit(row uint16) bool

func ReadRABit

func ReadRABit(row uint16) bool

func ReadRCode

func ReadRCode(row uint16) uint8

func ReadRDBit

func ReadRDBit(row uint16) bool

func ReadTCBit

func ReadTCBit(row uint16) bool

func ReadZBit

func ReadZBit(row uint16) bool

Types

type DNSServer

type DNSServer string

func (DNSServer) ToConnection

func (d DNSServer) ToConnection(deadline int64) (net.Conn, error)

type RecordClass

type RecordClass int

type RecordType

type RecordType uint16

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL