Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to recognize a WOL (Wake On Lan) request while the PC is running

I wonder if its possible to check if a WOL-request has been
received during the computer is already turned on. (pInvoke, c#?)

If the computer receives a magic paket and boots, Windows writes an corresponding event-log entry to the System-Log.

The way i'm looking for is not to listen to my UDP-Traffic by my own - if its possible i want to know how to receive a kind of system event (IRQ?) or something.. And thats all when receiving PC is already turned on.

like image 352
Cadburry Avatar asked Jun 18 '15 20:06

Cadburry


People also ask

How do I know if Wake-on-LAN is working?

In Network View, right-click the agent that has Wake On Lan Monitor running on it, and select Wake Up > Wake Up On LAN. This will broadcast the Magic Packet across the network, which has Agent information to identify that the Magic Packet is only intended to be acknowledged by the designated Agent.

Does Wake-on-LAN work with a shut down computer?

With Wake on LAN (WOL), you can power up machines even from the Power Off state (S5). In addition to local Magic Packet broadcasts, Auto Shutdown Manager also supports Directed Broadcasts and WOL Proxies, which allow the use of Wake on LAN across different IP segments, VLANs, and the Internet.


1 Answers

I agree with Duston that WOL is a Layer 2 combined with hardware thing. On a normal working PC, there is little chance that the NIC hardware will pass this on to the drivers, as it is exactly the task of this hardware to only disturb your CPU if really needed. You best chance to see a magic packet on a working PC would be : install and run sniffer (packet analyzer) software. That will force a supportive NIC into a special mode that transfers every packet to the CPU. If you can now see the magic packet in the output, next step would be to configure the sniffer to alert you in case it sees a magic packet. Done. All this will be quite CPU-intensive. You could write software that performs all this, but that would essentially be rewriting the complete sniffer with fixed query instead of a configurable one.

like image 168
OldFrank Avatar answered Sep 28 '22 00:09

OldFrank