Hi,
I'm currently building a program that listens to an interface using the
pcap_dispatch() function. While I listen for packets, I also have to check the
stdin port for traffic. Every second I go into a service routine doing various
things.
My problem is, that I cannot seem to use a select() on the pcap filedescriptor
(pcap_fileno()). It simply won't return. I can do an endless loop, but then I it
takes up 100% CPU time. I can an usleep() in the loop but when traffic is high, I
lose packets.
Is there a way to either use a select() which would solve everything, or is there
another way to keep the program from taking 100% CPU time?
Regards,
Ren Hoek
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe