These two functions are infinite loops,
and the program freezes, once called in the same thread.
gtk_main();
...
pcap_loop(adhandle, 0, packet_handler, NULL);
When I press the Start button, I want pcapto start , and if I click the Stop button, pcap stop .
How to create a child thread and run pcap_loop(adhandle, 0, packet_handler, NULL);instead?
source
share