summaryrefslogtreecommitdiffstats
path: root/src/wol.h
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2021-04-27 23:45:28 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-04-29 11:52:32 +0200
commit1f13855e412bba26064672b02dff78deecb795ab (patch)
tree7a44db095824ef03cedaa597485ca5d5c73969b6 /src/wol.h
parentc05f1345e76e26eadc798425d820665b9fb8a819 (diff)
#1043 add WOL_SENT state
WOL_SENT tells that WakeOnLan was sent to computer, after 60 seconds, if computer does not boot, this state is released.
Diffstat (limited to 'src/wol.h')
-rw-r--r--src/wol.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/wol.h b/src/wol.h
index 8682520..a245592 100644
--- a/src/wol.h
+++ b/src/wol.h
@@ -5,6 +5,8 @@
#define OG_WOL_MACADDR_LEN 6
#define OG_WOL_REPEAT 16
+#include "list.h"
+#include <ev.h>
#include <stdbool.h>
struct wol_msg {
@@ -18,4 +20,16 @@ bool wake_up_send(int sd, struct sockaddr_in *client,
bool wake_up_broadcast(int sd, struct sockaddr_in *client,
const struct wol_msg *msg);
+struct og_client_wol {
+ struct list_head list;
+ struct in_addr addr;
+ struct ev_timer timer;
+};
+
+struct og_client_wol *og_client_wol_create(const struct in_addr *addr);
+struct og_client_wol *og_client_wol_find(const struct in_addr *addr);
+void og_client_wol_refresh(struct og_client_wol *cli_wol);
+void og_client_wol_destroy(struct og_client_wol *cli_wol);
+const char *og_client_wol_status(const struct og_client_wol *wol);
+
#endif