DosWOL v0.11 ============ DOSWOL.TXT - Copyright (c) 2004, Fred C. Macall Overview and System Requirements DosWOL is a small DOS Packet Driver based application or command for sending the AMD Wake On Lan Magic Packet. AMD's description of the Magic Packet may be found at: http://www.amd.com/us-en/ConnectivitySolutions/TechnicalResources/0,,50_2334_ 2481,00.html Given the ethernet (MAC) address of a PC to be awakened, DosWOL constructs a UDP packet containing the corresponding AMD Magic Packet sequence. This packet is given an IP destination of 255.255.255.255:65535 and an ethernet destination of FF:FF:FF:FF:FF:FF. These make it a broadcast packet. DosWOL supplies the ethernet address obtained from its Packet Driver and the IP address obtained via bootp, dhcp, or its configuration file in the packet's source address fields. In practice, an "extra" 14 octet prefix to the AMD Magic Packet sequence seems to be needed in the UDP data portion of the packet transmitted. This prefix may be seen to be an ethernet address of all ones, the ethernet address of the PC to be awakened, and the sequence 0x08 0x42. This prefix has been added to the packet sent by DosWOL v0.11. DosWOL is intended to run on 8088 based, or all later, IBM PC compatible PCs. It requires only DOS v3.x, or later, and a LAN interface equipped with a Packet Driver. How It Works DOSWOL.EXE starts off by checking for a six octet ethernet (MAC) address parameter given in the format: hh:hh:hh:hh:hh:hh Upon finding anything else, it displays its Usage message and terminates. For the record, this message reads: Usage: DOSWOL ethernetaddress Where: ethernetaddress is in hh:hh:hh:hh:hh:hh format. Given an ethernet address as expected, DOSWOL.EXE then looks for its configuration file, DOSWOL.CFG, in the directory from which it has been loaded and, if necessary, in the "current DOS directory". If DOSWOL.CFG is not found, DosWOL uses bootp, with default networking parameters, to obtain the source IP address to be sent. Otherwise, if DOSWOL.CFG is found, its my_ip= setting determines if bootp or dhcp will be used, or if a directly configured IP address will be sent. DOSWOL.CFG may provide a few other configuration values. However, these will only be relevant if my_ip=BOOTP or my_ip=DHCP has been specified. DosWOL then looks through the PC's interrupt vectors, from 0x60 to 0x7F, for the first one that provides a responsive Packet Driver. Finally, DosWOL makes a single transmission of the AMD Magic Packet it has developed, and terminates with a status report message. In this case, DosWOL sets the DOS "errorlevel" value to zero. If it isn't able to send its AMD Magic Packet for any reason, including those mentioned above, DosWOL sets the DOS errorlevel value to something non-zero. The DOS errorlevel value set by DosWOL is limited to indicating whether or not an AMD Magic Packet has been sent. When it is non-zero, its value can't be decoded to determine what kind of problem has been encountered. The error message(s) that will have been given have to be reviewed to make that determination. Also, when an errorlevel value of zero is given, it can't be assumed that the addressed PC has been successfully awakened. That's because DosWOL has no way to know if the addressed PC has actually received and responded to its Magic Packet. If your LAN is anything less than completely reliable, it may necessary to establish a routine follow-up procedure for determining when Magic Packet(s) need to be resent. Installation and Configuration 1. PKUNZIP DOSWOL11.ZIP into an empty directory. 2. Copy DOSWOL.EXE and DOSWOL.CFG into the directory where you keep your other DOS Packet Driver based programs. 3. Edit, or tailor, DOSWOL.CFG with an ASCII text editor that confines the non-text or format control information that it adds to nothing more than new line sequences. You must tailor DOSWOL.CFG for your own case, unless you want DOSWOL.EXE to be configured by means of bootp and the other configuration defaults. If that is what you want, you won't need DOSWOL.CFG at all. In many situations, it will be sufficient to set the my_ip= configuration specification to DHCP or to a specific IP address. However, it won't hurt to review all of DOSWOL.CFG's configuration parameters. There are lots of comments describing the values needed. Copyright Notices DOSWOL.EXE v0.11 and the libraries, materials, and tools used to make it contain the following Copyright notices: DOSWOL.EXE - Copyright (c) 2004, Fred C. Macall Copyright (c) 1994, University of Kansas, All Rights Reserved Written by and COPYRIGHT (c)1993 to Quentin Smart Copyright (c) 1990, 1991, 1992, 1993 Erick Engelke Borland C++ - Copyright 1991 Borland Intl. LZEXE.EXE Version 0.91 (c) 1989 Fabrice BELLARD Disclaimer This software is published in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. Fred C. Macall K8GIV 18 December 2004