Generating a wake-on-lan "magic" packet on Linux?

Generating a wake-on-lan "magic" packet on Linux?

Post by Ivan » Mon, 20 Sep 1999 04:00:00

Hey guys, I got a question...

I have a small LAN, one box connected through a cable modem, that's
always on.  I have another box that has a WOL (wake on lan) motherboard
and a WOL-able NIC (3Com905) that's properly hooked to the WOL header on
the motherboard.

I would like to be able to start my second box by sending a signal from
the first box over the ether wire.  However, I need software capable of
generating such a "magic" packet.  HP, Intel and some others make such
programs, but they're for Windows only.  I would like to know whether
there's any Linux program that's able to generate this packet and wake
my PC.  If there isn't such a thing yet for Linux, here's what 3Com's
site says about this "magic" packet:

Q:  What is a magic packet?

A:  A magic packet is a valid Ethernet packet that contains a
    synchronization stream immediately followed by 16 repetitions of
    the destination MAC address.  The synchronize stream is a 6 byte
    field of F's.  This magic packet is not protocol specific.  It can
    be IP, IPX, etc as long as it contains the sync stream and the 16
    repetitions.  This magic packet can be routed in order to wake up
    a remote PC.  Since it is a valid Ethernet address, the RWU NIC can
    accept broadcast or multicast packets as long as the NIC's MAC
    address follows the above format.

So, is there a program I can use?  Since they mention above that the
packet can be routed, that essentially means the two machines need not
be on the same network, right?


In Linux We Trust!


1. "wake many" vs "wake one" in listen/accept

I'm trying to figure out the right way to use the "wake one" semantics
for listen/accept in 2.4.  In Apache 1.3.19 I find these comments:

/* On some architectures it's safe to do unserialized accept()s in the single
 * Listen case.  But it's never safe to do it in the case where there's
 * multiple Listen statements.  Define SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 * when it's safe in the single Listen case.

Is there a problem with using "wake one" when a process has more than
one socket being listened (with non-blocking accept), or is this
something that's just a problem inside Apache?

I'm planning to implement a daemon which could benefit from "wake one"
but I want to be sure I don't "plan in" something that ends up making
this not work right.

| Phil Howard - KA9WGN |   Dallas   | |


2. PC Disk under Unix

3. WOL Wake-ON-LAN: sending Magic Packets

4. edit /etc/dfs/dfstab for jumpstart

5. wake-on-lan and magic packet

6. I get Kernel Aiee in schedule(void).....

7. System suspend and "wake-on-LAN"?

8. Did anyone compile imlib in solaris?

9. netstat -s output: "packets pruned" and "packets collapsed"

10. GETSERVBYNAME()????????????????????"""""""""""""

11. """"""""My SoundBlast 16 pnp isn't up yet""""""""""""

12. magic ping / wake-on-lan

13. wake on lan magic packet