Hi Owen,
|ioctl(sock, SIOCGIFADDR, &ifr)|
Shouldn't that do the trick? I don't know if Python can do that or not, but if it can't, that's pretty weak.
As far as I was able to find out this only gives back the local MAC address which is of no use here. To be independent of external call I at least for Linux managed to access neighbor cache via netlink socket as the "ip" command itself does. Thus no external call is necessary anymore. Regards Henri -- Henri Wahl IT Department Leibniz-Institut für Festkörper- u. Werkstoffforschung Dresden tel. (03 51) 46 59 - 797 email: h.wahl@ifw-dresden.de http://www.ifw-dresden.de http://nagstamon.ifw-dresden.de http://dhcpy6d.ifw-dresden.de IFW Dresden e.V., Helmholtzstraße 20, D-01069 Dresden VR Dresden Nr. 1369 Vorstand: Prof. Dr. Ludwig Schultz, Dr. h.c. Dipl.-Finw. Rolf Pfrengle