icmp

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Echo = 0x08
View Source
const EchoReply = 0x00
View Source
const HdrLen = 8 // byte

Variables

View Source
var ReplyQueue chan *Reply

Functions

func Receive

func Receive(payload []byte, dst [mw.V4AddrLen]byte, src [mw.V4AddrLen]byte, dev mw.IDevice) psErr.E

func Send

func Send(typ uint8, code uint8, content uint32, payload []byte, src mw.IP, dst mw.IP) psErr.E

func SplitContent added in v0.4.0

func SplitContent(content uint32) (id uint16, seq uint16)

func Start

func Start(wg *sync.WaitGroup) psErr.E

func Stop

func Stop()

Types

type Hdr

type Hdr struct {
	Type     uint8
	Code     uint8
	Checksum uint16
	Content  uint32
}

func ReadHeader added in v0.4.0

func ReadHeader(buf *bytes.Buffer) (hdr *Hdr, err error)

type Reply added in v0.4.0

type Reply struct {
	ID  uint16
	Seq uint16
}

Jump to

Keyboard shortcuts

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