tcpdump mailing list archives
Re: setting rcvbuf
From: Guy Harris <guy () alum mit edu>
Date: Tue, 15 Jun 2004 15:01:13 -0700
On Jun 15, 2004, at 2:49 PM, John Heffner wrote:
I've found that on my linux machines, setting the rcvbuf on the packet socket bigger helps to reduce drops at high rates.I implemented the following, though I'm not sure how this works on BSD andother UNIXes.
It *doesn't* work on BSD, unfortunately - you can't set the buffer size after binding a network interface to a BPF device, and, as that's done at open time, you can't set the buffer size on an open pcap_t.
The ultimate fix is probably to have a new open routine that takes the buffer size as an argument (but don't implement that - there's a bunch of other stuff for which we need a new open API, and we don't want to introduce one new API and then keep introducing new ones; I'm thinking of an API that takes an attribute/value list of open parameters, so we can add new parameters as needed without having to introduce a whole new API).
A short-term fix would be to implement "pcap_setbuff()" routines for all platforms - but have, on platforms where you can't set it, either no-op routines or routines that return an error - and, when we have the new open routine, deprecate "pcap_setbuff()" in favor of the new open routine.
- This is the tcpdump-workers list. Visit https://lists.sandelman.ca/ to unsubscribe.
Current thread:
- setting rcvbuf John Heffner (Jun 15)
- Re: setting rcvbuf Guy Harris (Jun 15)
- Re: setting rcvbuf John Heffner (Jun 16)
- Re: setting rcvbuf Guy Harris (Jun 15)