From e2a48d8701f91b8e24fbe9e99e91eb72a87bb749 Mon Sep 17 00:00:00 2001 From: horchi Date: Sun, 5 Mar 2017 16:39:28 +0100 Subject: git init --- lib/wol.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 lib/wol.h (limited to 'lib/wol.h') 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); -- cgit v1.2.3