response

package
Version: v0.0.0-...-7f72c11 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2017 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Class

type Class int

Class holds sets of Types

const (
	// All is a meta class encompassing all the classes.
	All Class = iota
	// Success is a class for a successful response.
	Success
	// Denial is a class for denying existence (NXDOMAIN, or a nodata: type does not exist)
	Denial
	// Error is a class for errors, right now defined as not Success and not Denial
	Error
)

func ClassFromString

func ClassFromString(s string) (Class, error)

ClassFromString returns the class from the string s. If not class matches the All class and an error are returned

func Classify

func Classify(m *dns.Msg) (Class, *dns.OPT)

Classify classifies a dns message: it returns its Class.

func (Class) String

func (c Class) String() string

type Type

type Type int

Type is the type of the message

const (
	// NoError indicates a positive reply
	NoError Type = iota
	// NameError is a NXDOMAIN in header, SOA in auth.
	NameError
	// NoData indicates name found, but not the type: NOERROR in header, SOA in auth.
	NoData
	// Delegation is a msg with a pointer to another nameserver: NOERROR in header, NS in auth, optionally fluff in additional (not checked).
	Delegation
	// Meta indicates a meta message, NOTIFY, or a transfer:  qType is IXFR or AXFR.
	Meta
	// Update is an dynamic update message.
	Update
	// OtherError indicates any other error: don't cache these.
	OtherError
)

func TypeFromString

func TypeFromString(s string) (Type, error)

TypeFromString returns the type from the string s. If not type matches the OtherError type and an error are returned.

func Typify

func Typify(m *dns.Msg) (Type, *dns.OPT)

Typify classifies a message, it returns the Type.

func (Type) String

func (t Type) String() string

Jump to

Keyboard shortcuts

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