If there's a capture in progress, should Wireshark attempt to prevent the 
system from sleeping when it's deemed "idle"?

1) The arrival of a packet on an adapter being captured on won't necessarily 
wake the system up.

2) At least on Windows with Npcap and probably WinPcap, the networking stack 
plumbing required to make capturing work gets dismantled on a sleep/wakeup, so 
the capture is forced to stop:

        https://github.com/nmap/nmap/issues/1650

(The APIs to do this are OS-dependent.)

Clearly we shouldn't (and perhaps *can't*) prevent the system from sleeping if 
1) you clamshell a laptop or 2) the system's on battery power and the battery's 
running low.  If you're doing a long-running capture, 1) don't clamshell your 
machine in the middle and 2) leave it plugged in.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Reply via email to