summaryrefslogtreecommitdiff
path: root/lib/wol.h
blob: 05dd4cb5eed4bdcd70f97eb2adbe52548e9a6de9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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);