Documentation ¶
Index ¶
Constants ¶
View Source
const (
UDPBufferSize = 512 // For UDP packet size
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type QueueItem ¶
type QueueItem struct { Msg dns.Msg Connection Connection }
type TCPConnection ¶
func (*TCPConnection) SendResponse ¶
func (tc *TCPConnection) SendResponse(msg *dns.Msg) error
type TCPTransport ¶
func (*TCPTransport) Close ¶
func (t *TCPTransport) Close() error
func (*TCPTransport) Listen ¶
func (t *TCPTransport) Listen() error
type Transports ¶
Transports now uses a map for dynamic transport management.
func New ¶
func New(cfg *config.Transport) *Transports
Initializes Transports with enabled transports from configuration.
func (*Transports) Listen ¶
func (t *Transports) Listen() error
Listen on all initialized transports.
func (*Transports) Start ¶
func (t *Transports) Start()
type UDPConnection ¶
type UDPConnection struct { Addr net.Addr Conn net.PacketConn }
func (*UDPConnection) SendResponse ¶
func (uc *UDPConnection) SendResponse(msg *dns.Msg) error
type UDPTransport ¶
type UDPTransport struct { Conn net.PacketConn Queue chan QueueItem }
func (*UDPTransport) Close ¶
func (ut *UDPTransport) Close() error
func (*UDPTransport) Listen ¶
func (ut *UDPTransport) Listen() error
Bind reads from the connection and enqueues received DNS queries.
Click to show internal directories.
Click to hide internal directories.