msg

package
v0.0.0-...-e1c1521 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package msg helps to build a dnstap Message.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(m *lib.Message) (data []byte, err error)

Types

type Data

type Data struct {
	Type        tap.Message_Type
	Packed      []byte
	SocketProto tap.SocketProtocol
	SocketFam   tap.SocketFamily
	Address     []byte
	Port        uint32
	TimeSec     uint64
}

Data helps to build a dnstap Message. It can be transformed into the actual Message using this package.

func (*Data) Epoch

func (d *Data) Epoch()

func (*Data) FromRequest

func (d *Data) FromRequest(r request.Request) error

func (*Data) Pack

func (d *Data) Pack(m *dns.Msg) error

func (*Data) ToClientQuery

func (d *Data) ToClientQuery() *tap.Message

Transform the data into a client query message.

func (*Data) ToClientResponse

func (d *Data) ToClientResponse() *tap.Message

Transform the data into a client response message.

Jump to

Keyboard shortcuts

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