diff --git a/dns.go b/dns.go index 5ebd941d..6e69987c 100644 --- a/dns.go +++ b/dns.go @@ -103,17 +103,22 @@ func (e *Error) Error() string { } +// An RR represents a resource record. type RR interface { + // Header returns the header of an resource record. The header contains + // everything up to the rdata. Header() *RR_Header + // String returns the text representation of the resource record. String() string + // Len returns the length (in octects) of the uncompressed RR in wire format. Len() int } // Exchange is used in communicating with the resolver. type Exchange struct { - Request *Msg // The question sent. - Reply *Msg // The answer to the question that was sent. - Error error // If something went wrong, this contains the error. + Request *Msg // the question sent + Reply *Msg // the answer to the question that was sent + Error error // if something went wrong, this contains the error } // DNS resource records. diff --git a/server.go b/server.go index 04a63ade..0b4d5297 100644 --- a/server.go +++ b/server.go @@ -146,7 +146,7 @@ type Server struct { TsigSecret map[string]string // secret(s) for Tsig map[] } -// ListenAndServe starts a nameserver on the configured address. +// ListenAndServe starts a nameserver on the configured addressin *Server. func (srv *Server) ListenAndServe() error { addr := srv.Addr if addr == "" {