tcpdump mailing list archives

Re: User-space bridge on Solaris?


From: Ben Greear <greearb () candelatech com>
Date: Sat, 20 Sep 2008 08:42:43 -0700

Guy Harris wrote:

On Sep 19, 2008, at 8:16 PM, Ben Greear wrote:

I noticed that pcap_setdirection doesn't appear to work on Solaris.

Anyone know if it would be possible to get this functionality implemented?

Libpcap runs atop DLPI in Solaris. In my experience with at least one version of Solaris, if you don't enable promiscuous mode, only packets received by the host, not packets sent by the host, are delivered. The downside is that, if you just want to capture traffic to and from your machine, you can't do that by just turning promiscuous mode off (and, at least on older versions of Solaris, you have to be root to turn promiscuous mode on, even if you have permission to open the DLPI device). The upside is that, if your application doesn't need promiscuous mode, and your application doesn't want to see outgoing packets, you get that for free by not requesting promiscuous mode.
To be a bridge, you have to receive all traffic, so disabling PROMISC isn't really an option as far as I can tell.

I implemented a work-around where I keep a list of transmitted pkts and then walk it on receive and
discard any received that are in the tx-list.

But, that causes a lot of extra work, and in certain degenerate cases could cause improper ignoring of a received packet. I got it running at around 100Mbps with only sporadic drops, but can easily push several times that with Linux on the same hardware (using the very easy to use
raw-packet socket API, not pcap).

Another thing: I tried setting the time-out to 1ms in pcap_open_live, and it seems the fd never became active for read as far as select was concerned until I set the system clock to 1ms
(echo set hires_ticks=1 >> /etc/system)

Thanks,
Ben


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


--
Ben Greear <greearb () candelatech com> Candela Technologies Inc http://www.candelatech.com


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


Current thread: