server

package
v0.0.0-...-4ed95ae Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2015 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "2.5.2c"

Variables

This section is empty.

Functions

func Fit

func Fit(m *dns.Msg, size int, tcp bool) (*dns.Msg, bool)

Fit will make m fit the size. If a message is larger than size then entire additional section is dropped. If it is still to large and the transport is udp we return a truncated message. If the transport is tcp we are going to drop RR from the answer section until it fits. When this is case the returned bool is true.

Types

type Backend

type Backend interface {
	Records(name, isp string, exact bool) ([]msg.Service, error)
	ReverseRecord(name string) (*msg.Service, error)
}

type FirstBackend

type FirstBackend []Backend

func (FirstBackend) Records

func (g FirstBackend) Records(name, isp string, exact bool) (records []msg.Service, err error)

func (FirstBackend) ReverseRecord

func (g FirstBackend) ReverseRecord(name string) (record *msg.Service, err error)

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(backend Backend, store *store.Store, config *config.Config) *Server

func (*Server) AddressRecords

func (self *Server) AddressRecords(q dns.Question, name, isp string, previousRecords []dns.RR, bufsize uint16, dnssec, both bool) (records []dns.RR, err error)

func (*Server) CNAMERecords

func (self *Server) CNAMERecords(q dns.Question, name, isp string) (records []dns.RR, err error)

func (*Server) Lookup

func (self *Server) Lookup(n string, t, bufsize uint16, dnssec bool) (*dns.Msg, error)

Lookup looks up name,type using the recursive nameserver defines in the server's config. If none defined it returns an error.

func (*Server) MXRecords

func (self *Server) MXRecords(q dns.Question, name, isp string, bufsize uint16, dnssec bool) (records []dns.RR, extra []dns.RR, err error)

func (*Server) NSRecords

func (self *Server) NSRecords(q dns.Question, name, isp string) (records []dns.RR, extra []dns.RR, err error)

func (*Server) NameError

func (self *Server) NameError(m, req *dns.Msg, name string)

func (*Server) NewSOA

func (self *Server) NewSOA(name string) dns.RR

SOA returns a SOA record for this SkyDNS instance.

func (*Server) PTRRecords

func (self *Server) PTRRecords(q dns.Question) (records []dns.RR, err error)

func (*Server) RoundRobin

func (self *Server) RoundRobin(rrs []dns.RR)

func (*Server) SRVRecords

func (self *Server) SRVRecords(q dns.Question, name, isp string, bufsize uint16, dnssec bool) (records []dns.RR, extra []dns.RR, err error)

func (*Server) ServeDNS

func (self *Server) ServeDNS(w dns.ResponseWriter, req *dns.Msg)

func (*Server) ServeDNSForward

func (self *Server) ServeDNSForward(w dns.ResponseWriter, req *dns.Msg) *dns.Msg

ServeDNSForward forwards a request to a nameservers and returns the response.

func (*Server) ServeDNSReverse

func (self *Server) ServeDNSReverse(w dns.ResponseWriter, req *dns.Msg) *dns.Msg

ServeDNSReverse is the handler for DNS requests for the reverse zone. If nothing is found locally the request is forwarded to the forwarder for resolution.

func (*Server) ServerFailure

func (self *Server) ServerFailure(m, req *dns.Msg)

func (*Server) Start

func (self *Server) Start() error

func (*Server) TXTRecords

func (self *Server) TXTRecords(q dns.Question, name, isp string) (records []dns.RR, err error)

Jump to

Keyboard shortcuts

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