GUACAMOLE-513: Make packet size a constant.
This commit is contained in:
parent
45e46bd245
commit
0feda1fa2f
@ -40,5 +40,12 @@
|
||||
*/
|
||||
#define GUAC_WOL_DEFAULT_WAIT_TIME 60
|
||||
|
||||
/**
|
||||
* The size of the magic Wake-on-LAN packet to send to wake a remote host. This
|
||||
* consists of 6 bytes of 0xFF, and then the MAC address repeated 16 times.
|
||||
* https://en.wikipedia.org/wiki/Wake-on-LAN#Magic_packet
|
||||
*/
|
||||
#define GUAC_WOL_PACKET_SIZE 102
|
||||
|
||||
#endif /* GUAC_WOL_CONSTANTS_H */
|
||||
|
||||
|
@ -99,7 +99,7 @@ static ssize_t __guac_wol_send_packet(const char* broadcast_addr,
|
||||
|
||||
int guac_wol_wake(const char* mac_addr, const char* broadcast_addr) {
|
||||
|
||||
unsigned char wol_packet[102];
|
||||
unsigned char wol_packet[GUAC_WOL_PACKET_SIZE];
|
||||
unsigned int dest_mac[6];
|
||||
|
||||
/* Parse mac address and return with error if parsing fails. */
|
||||
|
Loading…
Reference in New Issue
Block a user