Date: Wed, 10 Oct 2001 23:40:39 +0900 From: Kim Kyung-hwan <redjade@ada.snu.ac.kr> To: freebsd-net@freebsd.org Subject: Getting link level addr using SIOCGIFADDR Message-ID: <20011010234039.A2120@ada.snu.ac.kr>
next in thread | raw e-mail | index | archive | help
Hello, In most case of printing (ethernet) link level address, program does a SIOCGIFCONF ioctl, gets a ifconf structure(the whole interface list), finds the very interface and prints the address. What I want to is to use SIOCGIFADDR so that program finds the address. My program does 1) get a socket (AF_INET) 2) make appropriate ifreq structure; copy interface name and set sa_family to AF_LINK 3) SIOCGIFADDR ioctl But returned ifreq structure doesn't have sockaddr_dl structure. It is impossible to get link level address using SIOCGIFADDR? Regards, Kyunghwan KIM To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011010234039.A2120>