libresolve

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package libresolve implements a recursive and stub resolver for RAINS.

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type ResolutionMode

type ResolutionMode int
const (
	Recursive ResolutionMode = iota
	Forward
)

type Resolver

type Resolver struct {
	RootNameServers   []net.Addr
	Forwarders        []net.Addr
	Mode              ResolutionMode
	InsecureTLS       bool
	DialTimeout       time.Duration
	FailFast          bool
	Delegations       *safeHashMap.Map
	Connections       cache.Connection
	MaxCacheValidity  util.MaxCacheValidity
	MaxRecursiveCount int
	// contains filtered or unexported fields
}

Resolver provides methods to resolve names in RAINS.

func New

func New(rootNS, forwarders []net.Addr, rootKeyPath string, mode ResolutionMode, addr net.Addr,
	maxConn int, maxCacheValidity util.MaxCacheValidity, maxRecursiveCount int) (*Resolver, error)

New creates a resolver with the given parameters and default settings

func (*Resolver) ClientLookup

func (r *Resolver) ClientLookup(query *query.Name) (*message.Message, error)

ClientLookup forwards the query to the specified forwarders or performs a recursive lookup starting at the specified root servers. It returns the received information.

func (*Resolver) ServerLookup

func (r *Resolver) ServerLookup(query *query.Name, addr net.Addr, token token.Token)

ServerLookup forwards the query to the specified forwarders or performs a recursive lookup starting at the specified root servers. It sends the received information to conInfo.

Jump to

Keyboard shortcuts

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