Documentation ¶
Index ¶
- Constants
- func JoinGroup(p *ipv4.PacketConn, msg *syscall.NetlinkMessage, group net.Addr) error
- func LeaveGroup(p *ipv4.PacketConn, msg *syscall.NetlinkMessage, group net.Addr) error
- func MonitorNetwork(p *ipv4.PacketConn, group net.Addr) error
- func NewClient(addr string) (*net.UDPAddr, *ipv4.PacketConn, error)
- func NewConn(addr string) (*net.UDPAddr, *ipv4.PacketConn, error)
- func NewServer(addr string) (*net.UDPAddr, *ipv4.PacketConn, error)
- func Pack(msg *Message) ([]byte, error)
- func PackName(w io.Writer, name []byte) error
- func PackString(w io.Writer, str string) error
- func PackStruct(r io.Writer, data interface{}) error
- func SendRecursiveRequest(msg *Message, q *Question) uint16
- func Serve(p *ipv4.PacketConn, maddr *net.UDPAddr, localname string, silent, forward bool)
- func UnpackName(r io.Reader) ([]byte, error)
- func UnpackNameAt(r io.ReaderAt, off int64) ([]byte, error)
- func UnpackString(r io.Reader) (string, error)
- func UnpackStruct(r io.Reader, data interface{}) error
- func Write(p *ipv4.PacketConn, addr *net.UDPAddr, msg *Message) error
- type A
- type AAAA
- type CNAME
- type Class
- type Flags
- type HINFO
- type Header
- type Message
- type OPT
- type PTR
- type Question
- type RData
- type Record
- type SRV
- type TXT
- type Type
Constants ¶
View Source
const ( FlagQR Flags = 32768 FlagAA = 1024 FlagTC = 512 FlagRD = 256 FlagRA = 128 FlagAD = 32 FlagCD = 16 RCodeNoError = 0 RCodeFormErr = 1 RCodeServFail = 2 RCodeNXDomain = 3 RCodeNotImpl = 4 RCodeRefused = 5 )
View Source
const ( TypeNone Type = 0 TypeA = 1 TypeCNAME = 5 TypePTR = 12 TypeHINFO = 13 TypeTXT = 16 TypeAAAA = 28 TypeSRV = 33 TypeOPT = 41 TypeAny = 255 )
View Source
const ( ClassInet Class = 1 ClassNone = 254 ClassAny = 255 ClassUnicast = 1 << 15 )
Variables ¶
This section is empty.
Functions ¶
func JoinGroup ¶
func JoinGroup(p *ipv4.PacketConn, msg *syscall.NetlinkMessage, group net.Addr) error
func LeaveGroup ¶
func LeaveGroup(p *ipv4.PacketConn, msg *syscall.NetlinkMessage, group net.Addr) error
func MonitorNetwork ¶
func MonitorNetwork(p *ipv4.PacketConn, group net.Addr) error
func PackStruct ¶
func SendRecursiveRequest ¶
func UnpackStruct ¶
Types ¶
type Message ¶
type Message struct { Header Header Question []*Question Answer []*Record Authority []*Record Additional []*Record }
func SendRequest ¶
type Record ¶
Click to show internal directories.
Click to hide internal directories.