responder

package
v0.7.10 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Responder

type Responder struct {
	// contains filtered or unexported fields
}

func NewDnsResponder

func NewDnsResponder(domain string, listenAddr string, privkey []byte) (*Responder, error)

func (*Responder) Close

func (r *Responder) Close() error

func (*Responder) RecvAndRespond

func (r *Responder) RecvAndRespond(getResponse func([]byte) ([]byte, error)) error

recvLoop repeatedly calls dnsConn.ReadFrom, extracts the packets contained in the incoming DNS queries, and puts them on ttConn's incoming queue. Whenever a query calls for a response, constructs a partial response and passes it to sendLoop over ch.

Jump to

Keyboard shortcuts

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