Documentation ¶
Index ¶
- Constants
- func Fit(m *dns.Msg, size int, tcp bool) (*dns.Msg, bool)
- type Backend
- type FirstBackend
- type Server
- func (self *Server) AddressRecords(q dns.Question, name, isp string, previousRecords []dns.RR, bufsize uint16, ...) (records []dns.RR, err error)
- func (self *Server) CNAMERecords(q dns.Question, name, isp string) (records []dns.RR, err error)
- func (self *Server) Lookup(n string, t, bufsize uint16, dnssec bool) (*dns.Msg, error)
- func (self *Server) MXRecords(q dns.Question, name, isp string, bufsize uint16, dnssec bool) (records []dns.RR, extra []dns.RR, err error)
- func (self *Server) NSRecords(q dns.Question, name, isp string) (records []dns.RR, extra []dns.RR, err error)
- func (self *Server) NameError(m, req *dns.Msg, name string)
- func (self *Server) NewSOA(name string) dns.RR
- func (self *Server) PTRRecords(q dns.Question) (records []dns.RR, err error)
- func (self *Server) RoundRobin(rrs []dns.RR)
- func (self *Server) SRVRecords(q dns.Question, name, isp string, bufsize uint16, dnssec bool) (records []dns.RR, extra []dns.RR, err error)
- func (self *Server) ServeDNS(w dns.ResponseWriter, req *dns.Msg)
- func (self *Server) ServeDNSForward(w dns.ResponseWriter, req *dns.Msg) *dns.Msg
- func (self *Server) ServeDNSReverse(w dns.ResponseWriter, req *dns.Msg) *dns.Msg
- func (self *Server) ServerFailure(m, req *dns.Msg)
- func (self *Server) Start() error
- func (self *Server) TXTRecords(q dns.Question, name, isp string) (records []dns.RR, err error)
Constants ¶
const Version = "2.5.2c"
Variables ¶
This section is empty.
Functions ¶
func Fit ¶
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 FirstBackend ¶
type FirstBackend []Backend
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 (*Server) AddressRecords ¶
func (*Server) CNAMERecords ¶
func (*Server) Lookup ¶
Lookup looks up name,type using the recursive nameserver defines in the server's config. If none defined it returns an error.
func (*Server) PTRRecords ¶
func (*Server) RoundRobin ¶
func (*Server) SRVRecords ¶
func (*Server) ServeDNSForward ¶
ServeDNSForward forwards a request to a nameservers and returns the response.
func (*Server) ServeDNSReverse ¶
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.