summaryrefslogtreecommitdiffstats
path: root/src/wol.h
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2021-12-22 16:38:29 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-12-22 17:30:04 +0100
commit216986e8481c81cd81a14138f5f7076c495bb2b4 (patch)
tree0bf932c58da291bc838d59ab466b1922efda4f2d /src/wol.h
parent6e709160050187f631d622566e19bec77888bd49 (diff)
#915 consolidate WoL sender function
This patch aims simplifies the WoL sender routine. A few related changes: - Replace goto err to continue if IP address is malformed - Use ret |= instead of ret &= to accumulate error code.
Diffstat (limited to 'src/wol.h')
-rw-r--r--src/wol.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/wol.h b/src/wol.h
index a245592..8a6c974 100644
--- a/src/wol.h
+++ b/src/wol.h
@@ -4,21 +4,20 @@
#define OG_WOL_SEQUENCE 6
#define OG_WOL_MACADDR_LEN 6
#define OG_WOL_REPEAT 16
+#define OG_WOL_PORT 9
#include "list.h"
#include <ev.h>
#include <stdbool.h>
struct wol_msg {
- char secuencia_FF[OG_WOL_SEQUENCE];
- char macbin[OG_WOL_REPEAT][OG_WOL_MACADDR_LEN];
+ char wol_sequence_ff[OG_WOL_SEQUENCE];
+ char mac_addr[OG_WOL_REPEAT][OG_WOL_MACADDR_LEN];
};
int wol_socket_open(void);
-bool wake_up_send(int sd, struct sockaddr_in *client,
- const struct wol_msg *msg, const struct in_addr *addr);
-bool wake_up_broadcast(int sd, struct sockaddr_in *client,
- const struct wol_msg *msg);
+int wake_up(int s, const struct in_addr *addr, const struct in_addr *netmask,
+ const char *mac, uint32_t wol_delivery_type);
struct og_client_wol {
struct list_head list;