These two functions are both infinite loops,
and the programe hangs once called in the same thread.
gtk_main();
...
pcap_loop(adhandle, 0, packet_handler, NULL);
When I click the "start" button,I want pcap
to start working;And if I press the "stop" button,pcap
stop.
How do I create a child thread and run pcap_loop(adhandle, 0, packet_handler, NULL);
instead?