Documentation
¶
Overview ¶
Package wol sends bounded Wake-on-LAN packets using verified LAN relationships.
Index ¶
- Constants
- func Broadcast(ctx context.Context, source model.WakeInterface, port int, data []byte) error
- func CanSend(source, target model.Node) bool
- func Interfaces() ([]model.WakeInterface, error)
- func LocalTarget(ctx context.Context, target model.Node, nodes []model.Node) (model.Node, error)
- func SameSubnet(a, b model.WakeInterface) bool
- func Send(ctx context.Context, source string, target model.Node) (int, error)
- func Validate(interfaces []model.WakeInterface) error
Constants ¶
const MaxInterfaces = 32
Variables ¶
This section is empty.
Functions ¶
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 ¶
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 ¶
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.