Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckBcastAddr ¶
func CheckMACAddr ¶
func InterfaceToIp ¶
Extract the IPv4 address from a specified interface
func WriteToLog ¶
Write a message to the syslog daemon if a connection was established
Types ¶
type MACAddress ¶
type MACAddress [6]byte
MAC address byte array
func ParseMAC ¶
func ParseMAC(macAddr string) (*MACAddress, error)
Convert a MAC address string from the configuration file to the MACAddress data structure
type WolPacket ¶
type WolPacket struct {
// contains filtered or unexported fields
}
Byte sequence for WOL, global variable for handler and main
func BuildWolPacket ¶
func BuildWolPacket(macAddr MACAddress) *WolPacket
Construct the raw WOL packet
type WololoConfig ¶
type WololoConfig struct { ListenAddr string `json:"listenAddr"` ListenPort string `json:"listenPort"` UdpBcastAddr string `json:"udpBcastAddr"` Iface string `json:"iface"` MacAddrStr string `json:"macAddr"` MacAddr MACAddress }
Configuration information for the application
func ReadConfig ¶
func ReadConfig(path string) (*WololoConfig, error)
Read the configuration file and extract all relevant information to fill a WololoConfig structure
Click to show internal directories.
Click to hide internal directories.