[Winpcap-users] CPU usage

Victor Ginzburg vginzburg at gmail.com
Fri May 2 20:00:23 GMT 2008


Hi All,

I have a problem with CPU usage with a relatively high traffic,
1500-2000 packets a second. I have an application in which I disabled
everything but pcap_next_ex while loop. If I set up a filter that
sniffs packets from one IP 192.168.1.1-255.255.255.255, the CPU usage
is very low, but if I open the network like 192.168.0.0-255.255.0.0,
the CPU usage grows to 6-7 percent while it sniffs the packets on an
average 2-3GHz machine.

The filter I compile looks like this:

tcp and ((((tcp[0:2]>=139 and tcp[0:2]<=139) or  (tcp[2:2]>=139 and
tcp[2:2]<=139)) and (  net 192.168.0.0 mask 255.255.0.0))).

Any ideas about how to lower the CPU usage?

Thanks,
-Victor


More information about the Winpcap-users mailing list