collectors

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DnstapMessage = map[string]string{
		"AUTH_QUERY":         "AQ",
		"AUTH_RESPONSE":      "AR",
		"RESOLVER_QUERY":     "RQ",
		"RESOLVER_RESPONSE":  "RR",
		"CLIENT_QUERY":       "CQ",
		"CLIENT_RESPONSE":    "CR",
		"FORWARDER_QUERY":    "FQ",
		"FORWARDER_RESPONSE": "FR",
		"STUB_QUERY":         "SQ",
		"STUB_RESPONSE":      "SR",
		"TOOL_QUERY":         "TQ",
		"TOOL_RESPONSE":      "TR",
		"UPDATE_QUERY":       "UQ",
		"UPDATE_RESPONSE":    "UR",
	}
	DnsQr = map[string]string{
		"QUERY": "Q",
		"REPLY": "R",
	}
)
View Source
var (
	PdnsQr = map[string]string{
		"DNSQueryType":    "Q",
		"DNSResponseType": "R",
	}
)

Functions

func ApplyBpfFilter

func ApplyBpfFilter(filter []bpf.Instruction, fd int) (err error)

func GetBpfFilter

func GetBpfFilter(port int) []bpf.Instruction

func GetFakeDns added in v0.21.0

func GetFakeDns() ([]byte, error)

func GetFakeDnstap added in v0.21.0

func GetFakeDnstap(dnsquery []byte) *dnstap.Dnstap

func Htons

func Htons(v uint16) int

Convert a uint16 to host byte order (big endian)

func RemoveBpfFilter

func RemoveBpfFilter(fd int) (err error)

Types

type DnsProcessor added in v0.21.0

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

func NewDnsProcessor added in v0.21.0

func NewDnsProcessor(config *dnsutils.Config, logger *logger.Logger, name string) DnsProcessor

func (*DnsProcessor) GetChannel added in v0.21.0

func (d *DnsProcessor) GetChannel() chan dnsutils.DnsMessage

func (*DnsProcessor) GetChannelList added in v0.21.0

func (d *DnsProcessor) GetChannelList() []chan dnsutils.DnsMessage

func (*DnsProcessor) LogError added in v0.21.0

func (c *DnsProcessor) LogError(msg string, v ...interface{})

func (*DnsProcessor) LogInfo added in v0.21.0

func (c *DnsProcessor) LogInfo(msg string, v ...interface{})

func (*DnsProcessor) ReadConfig added in v0.21.0

func (d *DnsProcessor) ReadConfig()

func (*DnsProcessor) Run added in v0.21.0

func (d *DnsProcessor) Run(sendTo []chan dnsutils.DnsMessage)

func (*DnsProcessor) Stop added in v0.21.0

func (d *DnsProcessor) Stop()

type DnsSniffer

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

func NewDnsSniffer

func NewDnsSniffer(loggers []dnsutils.Worker, config *dnsutils.Config, logger *logger.Logger, name string) *DnsSniffer

func (*DnsSniffer) Channel

func (c *DnsSniffer) Channel() chan dnsutils.DnsMessage

func (*DnsSniffer) Listen added in v0.3.0

func (c *DnsSniffer) Listen() error

func (*DnsSniffer) LogError

func (c *DnsSniffer) LogError(msg string, v ...interface{})

func (*DnsSniffer) LogInfo

func (c *DnsSniffer) LogInfo(msg string, v ...interface{})

func (*DnsSniffer) Loggers added in v0.3.0

func (c *DnsSniffer) Loggers() []chan dnsutils.DnsMessage

func (*DnsSniffer) ReadConfig

func (c *DnsSniffer) ReadConfig()

func (*DnsSniffer) Run

func (c *DnsSniffer) Run()

func (*DnsSniffer) Stop

func (c *DnsSniffer) Stop()

type Dnstap added in v0.3.0

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

func NewDnstap added in v0.3.0

func NewDnstap(loggers []dnsutils.Worker, config *dnsutils.Config, logger *logger.Logger, name string) *Dnstap

func (*Dnstap) Channel added in v0.3.0

func (c *Dnstap) Channel() chan dnsutils.DnsMessage

func (*Dnstap) HandleConn added in v0.3.0

func (c *Dnstap) HandleConn(conn net.Conn)

func (*Dnstap) Listen added in v0.3.0

func (c *Dnstap) Listen() error

func (*Dnstap) LogError added in v0.3.0

func (c *Dnstap) LogError(msg string, v ...interface{})

func (*Dnstap) LogInfo added in v0.3.0

func (c *Dnstap) LogInfo(msg string, v ...interface{})

func (*Dnstap) Loggers added in v0.3.0

func (c *Dnstap) Loggers() []chan dnsutils.DnsMessage

func (*Dnstap) ReadConfig added in v0.3.0

func (c *Dnstap) ReadConfig()

func (*Dnstap) Run added in v0.3.0

func (c *Dnstap) Run()

func (*Dnstap) Stop added in v0.3.0

func (c *Dnstap) Stop()

type DnstapProcessor added in v0.21.0

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

func NewDnstapProcessor added in v0.21.0

func NewDnstapProcessor(config *dnsutils.Config, logger *logger.Logger, name string) DnstapProcessor

func (*DnstapProcessor) GetChannel added in v0.21.0

func (d *DnstapProcessor) GetChannel() chan []byte

func (*DnstapProcessor) LogError added in v0.21.0

func (c *DnstapProcessor) LogError(msg string, v ...interface{})

func (*DnstapProcessor) LogInfo added in v0.21.0

func (c *DnstapProcessor) LogInfo(msg string, v ...interface{})

func (*DnstapProcessor) ReadConfig added in v0.21.0

func (d *DnstapProcessor) ReadConfig()

func (*DnstapProcessor) Run added in v0.21.0

func (d *DnstapProcessor) Run(sendTo []chan dnsutils.DnsMessage)

func (*DnstapProcessor) Stop added in v0.21.0

func (d *DnstapProcessor) Stop()

type PdnsProcessor added in v0.21.0

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

func NewPdnsProcessor added in v0.21.0

func NewPdnsProcessor(config *dnsutils.Config, logger *logger.Logger, name string) PdnsProcessor

func (*PdnsProcessor) GetChannel added in v0.21.0

func (d *PdnsProcessor) GetChannel() chan []byte

func (*PdnsProcessor) LogError added in v0.21.0

func (c *PdnsProcessor) LogError(msg string, v ...interface{})

func (*PdnsProcessor) LogInfo added in v0.21.0

func (c *PdnsProcessor) LogInfo(msg string, v ...interface{})

func (*PdnsProcessor) ReadConfig added in v0.21.0

func (c *PdnsProcessor) ReadConfig()

func (*PdnsProcessor) Run added in v0.21.0

func (d *PdnsProcessor) Run(sendTo []chan dnsutils.DnsMessage)

func (*PdnsProcessor) Stop added in v0.21.0

func (d *PdnsProcessor) Stop()

type ProtobufPowerDNS added in v0.17.0

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

func NewProtobufPowerDNS added in v0.17.0

func NewProtobufPowerDNS(loggers []dnsutils.Worker, config *dnsutils.Config, logger *logger.Logger, name string) *ProtobufPowerDNS

func (*ProtobufPowerDNS) Channel added in v0.17.0

func (c *ProtobufPowerDNS) Channel() chan dnsutils.DnsMessage

func (*ProtobufPowerDNS) HandleConn added in v0.17.0

func (c *ProtobufPowerDNS) HandleConn(conn net.Conn)

func (*ProtobufPowerDNS) Listen added in v0.17.0

func (c *ProtobufPowerDNS) Listen() error

func (*ProtobufPowerDNS) LogError added in v0.17.0

func (c *ProtobufPowerDNS) LogError(msg string, v ...interface{})

func (*ProtobufPowerDNS) LogInfo added in v0.17.0

func (c *ProtobufPowerDNS) LogInfo(msg string, v ...interface{})

func (*ProtobufPowerDNS) Loggers added in v0.17.0

func (c *ProtobufPowerDNS) Loggers() []chan dnsutils.DnsMessage

func (*ProtobufPowerDNS) ReadConfig added in v0.17.0

func (c *ProtobufPowerDNS) ReadConfig()

func (*ProtobufPowerDNS) Run added in v0.17.0

func (c *ProtobufPowerDNS) Run()

func (*ProtobufPowerDNS) Stop added in v0.17.0

func (c *ProtobufPowerDNS) Stop()

type Tail added in v0.5.0

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

func NewTail added in v0.5.0

func NewTail(loggers []dnsutils.Worker, config *dnsutils.Config, logger *logger.Logger, name string) *Tail

func (*Tail) Channel added in v0.5.0

func (c *Tail) Channel() chan dnsutils.DnsMessage

func (*Tail) Follow added in v0.5.0

func (c *Tail) Follow() error

func (*Tail) LogError added in v0.5.0

func (c *Tail) LogError(msg string, v ...interface{})

func (*Tail) LogInfo added in v0.5.0

func (c *Tail) LogInfo(msg string, v ...interface{})

func (*Tail) Loggers added in v0.5.0

func (c *Tail) Loggers() []chan dnsutils.DnsMessage

func (*Tail) ReadConfig added in v0.5.0

func (c *Tail) ReadConfig()

func (*Tail) Run added in v0.5.0

func (c *Tail) Run()

func (*Tail) Stop added in v0.5.0

func (c *Tail) Stop()

Jump to

Keyboard shortcuts

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