model

package
v3.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Answer

type Answer struct {
	Class string `json:"class, omitempty"`
	Data  string `json:"data, omitempty"`
	Name  string `json:"name, omitempty"`
	TTL   string `json:"ttl, omitempty"`
	Type  string `json:"type, omitempty"`

	Flags     string `json:"flags, omitempty"`
	Protocol  string `json:"protocol, omitempty"`
	Algorithm string `json:"algorithm, omitempty"`

	KeyTag     string `json:"key_tag, omitempty"`
	DigestType string `json:"digest_type, omitempty"`

	Preference uint16 `json:"preference, omitempty"`
	TypeBits   string `json:"type_bits, omitempty"`
	Hash       string `json:"hash, omitempty"`
	Iterations string `json:"iterations, omitempty"`
	Salt       string `json:"salt, omitempty"`

	TypeCovered string `json:"type_covered, omitempty"`
	Labels      string `json:"labels, omitempty"`
	OriginalTTL string `json:"original_ttl, omitempty"`

	Expiration string `json:"expiration, omitempty"`
	Inception  string `json:"inception, omitempty"`
	SignerName string `json:"signer_name, omitempty"`

	Rname   string `json:"rname, omitempty"`
	Serial  uint32 `json:"serial, omitempty"`
	Refresh uint32 `json:"refresh, omitempty"`
	Retry   uint32 `json:"retry, omitempty"`
	Expire  uint32 `json:"expire, omitempty"`
	Minimum uint32 `json:"minimum, omitempty"`

	Priority uint16 `json:"priority, omitempty"`
	Weight   uint16 `json:"weight, omitempty"`
	Port     uint16 `json:"port, omitempty"`
}

type DNS

type DNS struct {
	ID               uint16    `json:"id, omitempty"`
	OpCode           string    `json:"op_code, omitempty"`
	Flags            *Flags    `json:"flags, omitempty"`
	ResponseCode     string    `json:"response_code, omitempty"`
	Question         *Question `json:"question, omitempty"`
	Opt              *Opt      `json:"opt, omitempty"`
	AnswersCount     int       `json:"answers_count, omitempty"`
	AuthoritiesCount int       `json:"authorities_count, omitempty"`
	AdditionalsCount int       `json:"additionals_count, omitempty"`
	Answers          []*Answer `json:"answers, omitempty"`
	Authorities      []*Answer `json:"authorities, omitempty"`
	Additionals      []*Answer `json:"additionals, omitempty"`
}

type Flags

type Flags struct {
	AuthenticData      bool `json:"authentic_data, omitempty"`
	Authoritative      bool `json:"authoritative, omitempty"`
	CheckingDisabled   bool `json:"checking_disabled, omitempty"`
	RecursionAvailable bool `json:"recursion_available, omitempty"`
	RecursionDesired   bool `json:"recursion_desired, omitempty"`
	TruncatedResponse  bool `json:"truncated_response, omitempty"`
}

type MapStrWrapper

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

func (*MapStrWrapper) Encode

func (m *MapStrWrapper) Encode() ([]byte, error)

func (*MapStrWrapper) Length

func (m *MapStrWrapper) Length() int

type Opt

type Opt struct {
	Do       bool   `json:"do, omitempty"`
	ExtRcode string `json:"ext_rcode, omitempty"`
	UDPSize  uint16 `json:"udp_size, omitempty"`
	Version  string `json:"version, omitempty"`
	DAU      string `json:"dau, omitempty"`
	DHU      string `json:"dhu, omitempty"`
	LOCAL    string `json:"local, omitempty"`
	LLQ      string `json:"llq, omitempty"`
	N3U      string `json:"n3u, omitempty"`
	NSID     string `json:"nsid, omitempty"`
	SUBNET   string `json:"subnet, omitempty"`
	COOKIE   string `json:"cookie, omitempty"`
	UL       string `json:"ul, omitempty"`
}

type PacketWrapper

type PacketWrapper struct {
	Data        []byte
	CaptureInfo *gopacket.CaptureInfo
}

type Question

type Question struct {
	Class       string `json:"class, omitempty"`
	EtldPlusOne string `json:"etld_plus_one, omitempty"`
	Name        string `json:"name, omitempty"`
	Type        string `json:"type, omitempty"`
}

type Record

type Record struct {
	Timestamp    string           `json:"timestamp"`
	Type         string           `json:"type, omitempty"`
	Transport    string           `json:"transport, omitempty"`
	Status       string           `json:"status, omitempty"`
	Notes        string           `json:"notes, omitempty"`
	BytesIn      int              `json:"bytes_in, omitempty"`
	BytesOut     int              `json:"bytes_out, omitempty"`
	ResponseTime float64          `json:"response_time, omitempty"`
	Method       string           `json:"method, omitempty"`
	Query        string           `json:"query, omitempty"`
	Resource     string           `json:"resource, omitempty"`
	Src          *common.Endpoint `json:"src, omitempty"`
	Dst          *common.Endpoint `json:"dst, omitempty"`
	DNS          *DNS             `json:"dns, omitempty"`
}

type RecordEncoder

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

func (*RecordEncoder) Encode

func (re *RecordEncoder) Encode() ([]byte, error)

func (*RecordEncoder) Length

func (re *RecordEncoder) Length() int

Jump to

Keyboard shortcuts

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