summaryrefslogtreecommitdiff
path: root/lib/wol.h
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2017-03-05 16:39:28 +0100
committerhorchi <vdr@jwendel.de>2017-03-05 16:39:28 +0100
commite2a48d8701f91b8e24fbe9e99e91eb72a87bb749 (patch)
tree726f70554b4ca985a09ef6e30a7fdc8df089993c /lib/wol.h
downloadvdr-epg-daemon-e2a48d8701f91b8e24fbe9e99e91eb72a87bb749.tar.gz
vdr-epg-daemon-e2a48d8701f91b8e24fbe9e99e91eb72a87bb749.tar.bz2
git init1.1.103
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);