wol

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package wol sends bounded Wake-on-LAN packets using verified LAN relationships.

Index

Constants

View Source
const MaxInterfaces = 32

Variables

This section is empty.

Functions

func Broadcast

func Broadcast(ctx context.Context, source model.WakeInterface, port int, data []byte) error

Broadcast sends a bounded discovery proof from an eligible local interface.

func CanSend

func CanSend(source, target model.Node) bool

CanSend is a selection hint. Send revalidates against live local interfaces.

func Interfaces

func Interfaces() ([]model.WakeInterface, error)

Interfaces ignores loopback, point-to-point, non-broadcast and non-Ethernet adapters. Availability here does not imply that firmware or the NIC supports waking.

func LocalTarget

func LocalTarget(ctx context.Context, target model.Node, nodes []model.Node) (model.Node, error)

LocalTarget verifies standalone-host LAN membership using the OS neighbor table. Exact registered IP/MAC and local interface matches are required; matching private subnets alone never suffice. Derived edges stay local.

func SameSubnet

func SameSubnet(a, b model.WakeInterface) bool

SameSubnet selects discovery candidates only. It does not prove a shared LAN.

func Send

func Send(ctx context.Context, source string, target model.Node) (int, error)

Send transmits one UDP port 9 packet per distinct matching MAC/subnet. A successful UDP write does not acknowledge receipt or a machine waking.

func Validate

func Validate(interfaces []model.WakeInterface) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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