summaryrefslogtreecommitdiff
path: root/lib/wol.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wol.h')
-rw-r--r--lib/wol.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/wol.h b/lib/wol.h
new file mode 100644
index 0000000..05dd4cb
--- /dev/null
+++ b/lib/wol.h
@@ -0,0 +1,31 @@
+/*
+ * wol.h:
+ *
+ * See the README file for copyright information and how to reach the author.
+ *
+ */
+
+enum wolMisc
+{
+ sizeWolPacket = 17*6,
+ sizeMacStr = 64,
+ sizeAddr = 16,
+
+ macAddrTupel = 6,
+ wolPort = 9
+};
+
+struct cMacAddr
+{
+ unsigned char macAddr[macAddrTupel];
+ char macAddrStr[sizeMacStr];
+};
+
+struct cWolHeader
+{
+ char remoteAddr[sizeAddr+TB];
+ cMacAddr macAddr;
+};
+
+int sendWol(const char* mac, const char* device = 0);
+int packMacAddr(const char* mac, cMacAddr* packedMac);