dnsmonitor

package
v1.6.27 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ResolverInfo = resolver.ResolverInfo{
	Name: "SystemResolver",
	Type: resolver.ServerTypeMonitor,
}

Functions

This section is empty.

Types

type DNSMonitor

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

func New

func New(instance instance) (*DNSMonitor, error)

func (*DNSMonitor) Flush

func (dl *DNSMonitor) Flush() error

Flush flushes the buffer forcing all events to be processed.

func (*DNSMonitor) Manager

func (dl *DNSMonitor) Manager() *mgr.Manager

Manager returns the module manager.

func (*DNSMonitor) Start

func (dl *DNSMonitor) Start() error

Start starts the module.

func (*DNSMonitor) Stop

func (dl *DNSMonitor) Stop() error

Stop stops the module.

type ETWSession

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

func NewSession

func NewSession(etwInterface integration.ETWFunctions, callback func(domain string, result string)) (*ETWSession, error)

NewSession creates new ETW event listener and initilizes it. This is a low level interface, make sure to call DestorySession when you are done using it.

func (*ETWSession) DestroySession

func (l *ETWSession) DestroySession() error

DestroySession closes the session and frees the allocated memory. Listener cannot be used after this function is called.

func (*ETWSession) FlushTrace

func (l *ETWSession) FlushTrace() error

FlushTrace flushes the trace buffer.

func (*ETWSession) IsRunning

func (l *ETWSession) IsRunning() bool

IsRunning returns true if DestroySession has NOT been called.

func (*ETWSession) StartTrace

func (l *ETWSession) StartTrace() error

StartTrace starts the tracing session of dns events. This is a blocking call. It will not return until the trace is stopped.

func (*ETWSession) StopTrace

func (l *ETWSession) StopTrace() error

StopTrace stopes the trace. This will cause StartTrace to return.

type Listener

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

Jump to

Keyboard shortcuts

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