tcpdump mailing list archives

Re: capturing on both interfaces simultaneously


From: abhinav narain <abhinavnarain10 () gmail com>
Date: Sun, 11 Dec 2011 14:17:20 -0500

RETURN VALUES
    Select() returns the number of ready descriptors that are contained in
    the descriptor sets, or -1 if an error occurred.  If the time limit
    expires, select() returns 0.  If select() returns with an error,
includ-
    ing one due to an interrupted call, the descriptor sets will be unmodi-
    fied and the global variable errno will be set to indicate the error.

so it's one of those APIs.

What you should do is to, if select() returns -1 *and* errno is EINTR,
just ignore the error and continue looping.

Ya, I did that in the morning ... it works now.

Also, it keeps printing ": Resource temporarily unavailable"
though I don't have any error statement to be printed.

What is "it"?  Your program?  Or just *some* program?

 Its the return statement of perror.
I removed it.

It works fine now.
But how do I know, how much packets is my program dropping?
using pcap_stats ?
I already have 15% RAM being eaten by the program, so I can't actually
increase the buffer size to save packets in between select switches.

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


Current thread: