libguac 1.6.0
 
Loading...
Searching...
No Matches
wol.h File Reference

Header that provides functions and structures related to Wake-on-LAN support in libguac. More...

Go to the source code of this file.

Functions

int guac_wol_wake (const char *mac_addr, const char *broadcast_addr, const unsigned short udp_port)
 Send the wake-up packet to the specified destination, returning zero if the wake was sent successfully, or non-zero if an error occurs sending the wake packet.
 
int guac_wol_wake_and_wait (const char *mac_addr, const char *broadcast_addr, const unsigned short udp_port, int wait_time, int retries, const char *hostname, const char *port, const int timeout)
 Send the wake-up packet to the specified destination, returning zero if the wake was sent successfully, or non-zero if an error occurs sending the wake packet.
 

Detailed Description

Header that provides functions and structures related to Wake-on-LAN support in libguac.

Function Documentation

◆ guac_wol_wake()

int guac_wol_wake ( const char * mac_addr,
const char * broadcast_addr,
const unsigned short udp_port )

Send the wake-up packet to the specified destination, returning zero if the wake was sent successfully, or non-zero if an error occurs sending the wake packet.

Note that the return value does not specify whether the system actually wakes up successfully, only whether or not the packet is transmitted.

Parameters
mac_addrThe MAC address to place in the magic Wake-on-LAN packet.
broadcast_addrThe broadcast address to which to send the magic Wake-on-LAN packet.
udp_portThe UDP port to use when sending the WoL packet.
Returns
Zero if the packet is successfully sent to the destination; non-zero if the packet cannot be sent.

◆ guac_wol_wake_and_wait()

int guac_wol_wake_and_wait ( const char * mac_addr,
const char * broadcast_addr,
const unsigned short udp_port,
int wait_time,
int retries,
const char * hostname,
const char * port,
const int timeout )

Send the wake-up packet to the specified destination, returning zero if the wake was sent successfully, or non-zero if an error occurs sending the wake packet.

Note that the return value does not specify whether the system actually wakes up successfully, only whether or not the packet is transmitted.

Parameters
mac_addrThe MAC address to place in the magic Wake-on-LAN packet.
broadcast_addrThe broadcast address to which to send the magic Wake-on-LAN packet.
udp_portThe UDP port to use when sending the WoL packet.
wait_timeThe number of seconds to wait between connection attempts after the WOL packet has been sent.
retriesThe number of attempts to make to connect to the system before giving up on the connection.
hostnameThe hostname or IP address of the system that has been woken up and to to which the connection will be attempted.
portThe TCP port of the remote system on which the connection will be attempted after the system has been woken.
timeoutThe number of seconds to wait when attempting the connection to the remote system when checking to see if it is awake.
Returns
Zero if the packet is successfully sent to the destination; non-zero if the packet cannot be sent.