How do I create a new thread to make pcap_loop() and gtk_main() compatible?
- by httpinterpret
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);
How do I create a child thread and run pcap_loop(adhandle, 0, packet_handler, NULL); instead?