sdns: github.com/semihalev/sdns/response Index | Files

package response

import "github.com/semihalev/sdns/response"

Index

Package Files

typify.go

type Type Uses

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.
    OtherError
    // Expired if sigs expired: don't cache these
    Expired
    // NoCache indicates a no cache reply
    NoCache
)

func TypeFromString Uses

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 Uses

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

Typify classifies a message, it returns the Type.

func (Type) String Uses

func (t Type) String() string

Package response imports 3 packages (graph) and is imported by 2 packages. Updated 2020-08-10. Refresh now. Tools for package owners.