Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-users: [Wireshark-users] How to exit pcap_loop?

From: Goran Štrok <goran.strok@xxxxxxxxx>
Date: Thu, 26 Apr 2007 10:55:37 +0200
Title: How to exit pcap_loop?

I want to end pcap_loop when push any (or specific) button on keyboard. How is this possible? Any suggestion? I use:
pcap_loop(handle, -1, got_packet, (unsigned char *)file4);


and want to capture packets until one of button is pushed. Maybe any other function?

Thanks