summaryrefslogtreecommitdiffstats
path: root/src/wol.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wol.h')
-rw-r--r--src/wol.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/wol.h b/src/wol.h
new file mode 100644
index 0000000..c15cf3a
--- /dev/null
+++ b/src/wol.h
@@ -0,0 +1,20 @@
+#ifndef _OG_WOL_H_
+#define _OG_WOL_H_
+
+#define OG_WOL_SEQUENCE 6
+#define OG_WOL_MACADDR_LEN 6
+#define OG_WOL_REPEAT 16
+
+#include <stdbool.h>
+
+struct wol_msg {
+ char secuencia_FF[OG_WOL_SEQUENCE];
+ char macbin[OG_WOL_REPEAT][OG_WOL_MACADDR_LEN];
+};
+
+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);
+
+#endif