packet

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BabelMagic            = 42
	BabelVersion          = 2
	BabelPacketHeaderSize = 4
)

Variables

This section is empty.

Functions

func Validate

func Validate(b []byte) ([]byte, error)

Types

type Conn

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

func Listen

func Listen(group string, port uint16, ifaces ...string) (Conn, error)

func ListenPort

func ListenPort(port uint16) (Conn, error)

func (Conn) Close

func (c Conn) Close() error

func (Conn) JoinGroup

func (c Conn) JoinGroup(ifname string, addr string) error

func (Conn) ReadFrom

func (c Conn) ReadFrom(b []byte) (body []byte, src netip.Addr, ifindex int, err error)

Jump to

Keyboard shortcuts

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