Documentation ¶
Index ¶
- Variables
- func ApplyBpfFilter(filter []bpf.Instruction, fd int) (err error)
- func GetBpfFilter(port int) []bpf.Instruction
- func GetFakeDns() ([]byte, error)
- func GetFakeDnstap(dnsquery []byte) *dnstap.Dnstap
- func Htons(v uint16) int
- func RemoveBpfFilter(fd int) (err error)
- type DnsProcessor
- func (d *DnsProcessor) GetChannel() chan dnsutils.DnsMessage
- func (d *DnsProcessor) GetChannelList() []chan dnsutils.DnsMessage
- func (c *DnsProcessor) LogError(msg string, v ...interface{})
- func (c *DnsProcessor) LogInfo(msg string, v ...interface{})
- func (d *DnsProcessor) ReadConfig()
- func (d *DnsProcessor) Run(sendTo []chan dnsutils.DnsMessage)
- func (d *DnsProcessor) Stop()
- type DnsSniffer
- func (c *DnsSniffer) Channel() chan dnsutils.DnsMessage
- func (c *DnsSniffer) Listen() error
- func (c *DnsSniffer) LogError(msg string, v ...interface{})
- func (c *DnsSniffer) LogInfo(msg string, v ...interface{})
- func (c *DnsSniffer) Loggers() []chan dnsutils.DnsMessage
- func (c *DnsSniffer) ReadConfig()
- func (c *DnsSniffer) Run()
- func (c *DnsSniffer) Stop()
- type Dnstap
- func (c *Dnstap) Channel() chan dnsutils.DnsMessage
- func (c *Dnstap) HandleConn(conn net.Conn)
- func (c *Dnstap) Listen() error
- func (c *Dnstap) LogError(msg string, v ...interface{})
- func (c *Dnstap) LogInfo(msg string, v ...interface{})
- func (c *Dnstap) Loggers() []chan dnsutils.DnsMessage
- func (c *Dnstap) ReadConfig()
- func (c *Dnstap) Run()
- func (c *Dnstap) Stop()
- type DnstapProcessor
- func (d *DnstapProcessor) GetChannel() chan []byte
- func (c *DnstapProcessor) LogError(msg string, v ...interface{})
- func (c *DnstapProcessor) LogInfo(msg string, v ...interface{})
- func (d *DnstapProcessor) ReadConfig()
- func (d *DnstapProcessor) Run(sendTo []chan dnsutils.DnsMessage)
- func (d *DnstapProcessor) Stop()
- type PdnsProcessor
- func (d *PdnsProcessor) GetChannel() chan []byte
- func (c *PdnsProcessor) LogError(msg string, v ...interface{})
- func (c *PdnsProcessor) LogInfo(msg string, v ...interface{})
- func (c *PdnsProcessor) ReadConfig()
- func (d *PdnsProcessor) Run(sendTo []chan dnsutils.DnsMessage)
- func (d *PdnsProcessor) Stop()
- type ProtobufPowerDNS
- func (c *ProtobufPowerDNS) Channel() chan dnsutils.DnsMessage
- func (c *ProtobufPowerDNS) HandleConn(conn net.Conn)
- func (c *ProtobufPowerDNS) Listen() error
- func (c *ProtobufPowerDNS) LogError(msg string, v ...interface{})
- func (c *ProtobufPowerDNS) LogInfo(msg string, v ...interface{})
- func (c *ProtobufPowerDNS) Loggers() []chan dnsutils.DnsMessage
- func (c *ProtobufPowerDNS) ReadConfig()
- func (c *ProtobufPowerDNS) Run()
- func (c *ProtobufPowerDNS) Stop()
- type Tail
- func (c *Tail) Channel() chan dnsutils.DnsMessage
- func (c *Tail) Follow() error
- func (c *Tail) LogError(msg string, v ...interface{})
- func (c *Tail) LogInfo(msg string, v ...interface{})
- func (c *Tail) Loggers() []chan dnsutils.DnsMessage
- func (c *Tail) ReadConfig()
- func (c *Tail) Run()
- func (c *Tail) Stop()
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 GetFakeDnstap ¶ added in v0.21.0
func GetFakeDnstap(dnsquery []byte) *dnstap.Dnstap
func RemoveBpfFilter ¶
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 (*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 (*Dnstap) Channel ¶ added in v0.3.0
func (c *Dnstap) Channel() chan dnsutils.DnsMessage
func (*Dnstap) HandleConn ¶ added in v0.3.0
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()
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 (*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 (*Tail) Channel ¶ added in v0.5.0
func (c *Tail) Channel() chan dnsutils.DnsMessage
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()
Click to show internal directories.
Click to hide internal directories.