magicpacket

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotValidEUI48MacAddress = errors.New("not a valid EUI-48 MAC address")
	ErrMalformedMagicPacket    = errors.New("malformed magic packet")
)

Functions

func Listen

func Listen(ip string, port int) (*net.UDPAddr, string, error)

func Send

func Send(magicPacket MagicPacket, ip string, port int) error

Types

type MagicPacket

type MagicPacket [102]byte

func New

func New(mac string) (MagicPacket, error)

func (MagicPacket) Bytes added in v1.3.0

func (mp MagicPacket) Bytes() []byte

func (MagicPacket) Mac added in v1.3.0

func (mp MagicPacket) Mac() string

func (MagicPacket) Validate added in v1.3.0

func (mp MagicPacket) Validate() error

Jump to

Keyboard shortcuts

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