[dsc] Patch for build on Solaris9 and multiple interfaces fix
wessels at measurement-factory.com
Fri Dec 14 21:41:02 UTC 2007
On Wed, 5 Dec 2007, Alexander Gall wrote:
> I have used the attached patch to build the DSC collector (version
> 200706121022) on Solaris 9. The header file fixes are trivial, but I
> discovered a bug that affects capturing on multiple interfaces. I
> think this also solves the issue "Multiple interfaces" reported on
> this list in November (I just joined the list and had a quick look in
> the archive).
> The problem is simply that FD_ISSET checks the original FD set rather
> than the one returned by select(). The fix is obvious (but one also
> needs to cover the case when select() returns after a timeout).
I've applied your #include changes for Solaris, thanks.
The current select() behavior is intentional. There is an oldish
known problem on some operating systems where they don't always set
the FD for reading. The suggested workaround is to always try
reading from the pcap whenever select returns. See
That message *is* five years old, so maybe this is no longer a
problem with current pcap implementations. If anyone knows for
sure then we could try doing it the "right" way. But I also believe
that the workaround doesn't create any significant performance
I also recently discovered and fixed a bug with multiple interfaces.
I found that if you have interfaces with differnt pcap datalink
types, then only the last one would be read. I found it by trying
to read from both loopback and a physical interface. Now DSC stores
the datalink handler function with each pcap.
More information about the dsc