tcpdump mailing list archives

Re: single packet capture time w/pcap vs. recvfrom()


From: Darren Reed <darrenr () reed wattle id au>
Date: Mon, 24 May 2004 22:59:33 +1000 (EST)

In some email I received from Brandon Stafford, sie wrote:
[ Charset windows-1252 unsupported, converting... ]
Hello,

    I'm writing a server that captures UDP packets and, after some
manipulation, sends the data out the serial port. Right now, I'm using
recvfrom(), but it takes 20 ms to execute for each packet captured. I
know that tcpdump can capture packets much faster than 20 ms/packet on
the same computer, so I know recvfrom() is running into trouble, probably
because of bad checksums on the packets.

What you're looking at is unlikely a recvfrom() problem but rather one of
scheduling the process - and similarly just as unlikely to disappear because
you use pcap vs a real socket.  To say that it is would imply that a process
could not deal with more than 50 UDP packets per second ... something I find
hard to believe of any modern computer.

Darren
-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.


Current thread: