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:
- Re: capturing on both interfaces simultaneously, (continued)
- Re: capturing on both interfaces simultaneously abhinav narain (Dec 10)
- Re: capturing on both interfaces simultaneously abhinav narain (Dec 10)
- Re: capturing on both interfaces simultaneously Cedric Cellier (Dec 10)
- Re: capturing on both interfaces simultaneously Guy Harris (Dec 11)
- Re: capturing on both interfaces simultaneously abhinav narain (Dec 11)
- Re: capturing on both interfaces simultaneously rixed (Dec 11)
- Re: capturing on both interfaces simultaneously abhinav narain (Dec 11)
- Re: capturing on both interfaces simultaneously rixed (Dec 11)
- Re: capturing on both interfaces simultaneously abhinav narain (Dec 11)
- Re: capturing on both interfaces simultaneously Guy Harris (Dec 11)
- Re: capturing on both interfaces simultaneously abhinav narain (Dec 11)
- Re: capturing on both interfaces simultaneously Guy Harris (Dec 11)
- Re: capturing on both interfaces simultaneously abhinav narain (Dec 11)
- Re: capturing on both interfaces simultaneously Guy Harris (Dec 11)
- Re: capturing on both interfaces simultaneously abhinav narain (Dec 11)
- Re: capturing on both interfaces simultaneously Gianluca Varenni (Dec 11)
- Re: capturing on both interfaces simultaneously abhinav narain (Dec 12)
- Re: capturing on both interfaces simultaneously Guy Harris (Dec 12)
- Re: capturing on both interfaces simultaneously abhinav narain (Dec 12)
- Re: capturing on both interfaces simultaneously Guy Harris (Dec 12)
- Re: capturing on both interfaces simultaneously dragorn (Dec 12)