Xiang Samuel Zhou writes: > ----- Original Message ----- > From: James Carlson <James.D.Carlson at Sun.COM> > > How does it open DLPI devices? > It first use "open" system call to open something like /dev/bge, then send > strbuf containing DL_ATTACH_REQ to the opened STREAMS. It uses dlpi device to > get the mac address.
If I'm reading that correctly, it doesn't even support DLPI Style 1. I'm hoping that's wrong, based on the description below, because it'd be a show-stopper of a bug. > > If it doesn't use libdlpi, does it have support for Solaris "vanity > > naming," which requires looking in /dev/net/ for the device first? > It doesn't looking in /dev/net/, but it seems works ok on renamed link, e.g. > the command "iftop -i e1kg1" shows the traffic on e1kg1 where e1kg1 is the > renamed name of e1000g1. For capture packets, it uses pcap_open_live to open > the interface. It seems libpcap support vanity naming. OK. As long as you're not either delivering your own copy or statically linking it in, you should be fine. Solaris already comes with libpcap, and it (in turn) uses libdlpi and supports vanity naming. > > If it doesn't do that, could a fix be contributed back upstream? It's > > usually about two lines of code. > Make sense. I will deliever the patch in a couple of days. None should be needed if you're not dealing with the /dev entries directly, and are instead going through the normal system libpcap. -- James Carlson, Solaris Networking <james.d.carlson at sun.com> Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677