packet

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type A

type A struct {
	Name string `json:"name"`
	Type string `json:"type"`
	A    string `json:"a"`
}

type AAAA

type AAAA struct {
	Name string `json:"name"`
	Type string `json:"type"`
	AAAA string `json:"aaaa"`
}

type Packet

type Packet struct {
	From      string        `json:"from"`
	ID        uint16        `json:"id"`
	Questions []*Question   `json:"questions,omitempty"`
	Answers   []interface{} `json:"answers,omitempty"`
}

func Parse

func Parse(packet []byte, from net.Addr) (*Packet, error)

Parse one packet

type Question

type Question struct {
	Name  string `json:"name"`
	Type  string `json:"type"`
	Class string `json:"class"`
}

type SRV

type SRV struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Priority uint16 `json:"priority"`
	Weight   uint16 `json:"weight"`
	Port     uint16 `json:"port"`
	Target   string `json:"target"`
}

Jump to

Keyboard shortcuts

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