On Tue, 11 Dec 2001, Daniel Bergqvist wrote: > Yes, run the command: > > ip addr > > See http://defiant.coinet.com/iproute2/ and > http://defiant.coinet.com/iproute2/ip-cref/ for more info. ip addr is for ip or ipv6. I was looking for link layer addresses. Maybe i should have mentioned that in the subject line before. Maybe 'ip link' is what i am looking for. I just glanced at the code. So does ioctl(s, SIOCGIFINDEX, &ifr) get the list of all interfaces ??? Let me rephrase my requirement. I should be able to get the link-layer address of an interface by specifying the interface name ie. eth0, eth1 etc. (mac address for ethernet) And this interface might not have an ip address when i do this. Thanks & Regards, Amit - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html