Michael Hunter writes: > On Thu, 27 Oct 2005 09:25:47 -0700 (PDT) > Shao Wu <[EMAIL PROTECTED]> wrote: > > > I would like to retrieve the MAC address for a given NIC by using the > > SIOCGENADDR ioctl, but keep getting errno 2 (ENOENT). Do I miss something > > or this ioctl is broken? My next question is, how can I retrieve the MAC > > address of different kinds of NIC cards? > > > [...] > > I mentioned below that this is bug 4720634. It actually looks to me like > SIOCGIFHWADDR is more widely supported although all I have to base that on > is a quick google survey. If somebody wants to pick up this RFE I'm willing > to work with you on the (internal) process part of this. I've cc'd the > approachability discussion list as this is in the class of developer > approachability problems.
The ugly part of that ioctl is that you have to have the interface plumbed for IP in order for it to work, at least with our current architecture. My understanding is that on other systems, no such "plumbing" step is needed, so the functionality would be a bit less usable than it is elsewhere. In other words, you couldn't just ask for the Ethernet address of any interface. You'd have to limit yourself to just the ones that IP happens to know about. But if nobody cares about the distinction, and they're willing to see the ioctl fail for unplumbed (but installed) interfaces, then I guess implementing it would be ok. -- James Carlson, KISS Network <[EMAIL PROTECTED]> Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677 _______________________________________________ opensolaris-discuss mailing list [email protected]
