C/C++ Wake on LAN program
Results 1 to 3 of 3

Thread: C/C++ Wake on LAN program

  1. #1
    Junior Member
    Join Date
    Aug 2004
    Posts
    25

    Question C/C++ Wake on LAN program

    I work for a secondary school in the U.K. and we have currently just implemented a "wake on LAN" program and a similar program to close down the computers of a night. Although the problem is that the programs are products of two different companies and therefore their integration with one another is severally lacking.

    Therefore I am considering creating my own program to handle both the booting up and shutting down of the computers. Initially in C and then latter with a GUI in C++.

    Therefore I was hoping that someone would be able to provide me with the vital sections of code that send the boot up packet and shut down packet.

    Thank you in advance.

    L8R,

    TTAYO

  2. #2
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    I don't think there are any boot up or shutdown packets. You're going to need a program listening on the machines you want to bootup or shut down that will do so when they come across a certain predefined packet to tell them to. Also, it will need to either have authentication, or only run during a certain time frame when the computers are to be shut down or booted up. I say that like I know exactly what it needs to do. Well I don't, and I don't know how to program it either. Just throwing out ideas. Good luck.

  3. #3
    Junior Member
    Join Date
    Jan 2006
    Posts
    5
    There is a boot-up packet, but there is no shut-down packet (as far as I know). The boot-up packet is actually a specially crafted ethernet frame that can be sent via almost any protocol (TCP, IPX, UDP, etc..).

    Programmatically I believe you can use any type of network/sockets library to construct the special bootup frame/packet and just send it to the computer you want to turn on. To turn off the computer, you will probably have to use syscall's for whatever operating system you are interfacing with.

    A good reference that I just google'd is the Wake on LAN mini HOWTO.

    It explains how Wake On LAN works and has program examples for both Windows and Linux in various languages (PERL, Visual Basic, C, even vb-script!). I think that should get you started.

    Good luck!

    -biosx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides