dns

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2017 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPTRRecord

func AddPTRRecord(ip string, domain string, ttl uint32, expires int64) error

AddPTRRecord for the specified domain and ip address

func GetHeader

func GetHeader(name string, rtype uint16, ttl uint32) dns.RR_Header

GetHeader create a new record header

func GetKey

func GetKey(domain string, rtype uint16) (r string, e error)

GetKey return the reverse domain

func GetRecord

func GetRecord(domain string, rtype uint16) (dns.RR, error)

GetRecord return a new DNS record

func HandleDNSRequest

func HandleDNSRequest(w dns.ResponseWriter, r *dns.Msg)

HandleDNSRequest handle incoming requests

func RemoveExpired

func RemoveExpired()

RemoveExpired Check for expired record and remove them

func Serve

func Serve(ip string, port int) error

Serve the DNS server

func UpdateRecord

func UpdateRecord(r dns.RR, q *dns.Question) error

UpdateRecord update or remove a record

Types

This section is empty.

Jump to

Keyboard shortcuts

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