title: Two pcap_compile() on one device at same time?
body: <p>I have two threads and each one has packet capture from the same deviсe at the same time but the program crashes when the second thread reaches the <code>pcap_compile()</code> function. Also each thread has their own variables and don't use global. It seems that they get the same handle of the device, therefore the program crashes. Why do I need two threads? Because I want to seperate packets on the sent and on the recived by specified <code>pcap</code> filter. So how do I solve this? Or is it better to use one thread and sort manually the sent and the received packets by using the address from <code>tcp</code> header?</p>