From owner-freebsd-net Wed Oct 10 7:40:51 2001 Delivered-To: freebsd-net@freebsd.org Received: from ada.snu.ac.kr (ada.snu.ac.kr [147.46.106.49]) by hub.freebsd.org (Postfix) with ESMTP id 690CF37B409 for ; Wed, 10 Oct 2001 07:40:42 -0700 (PDT) Received: (from redjade@localhost) by ada.snu.ac.kr (8.11.6/8.11.3) id f9AEedv02197 for freebsd-net@freebsd.org; Wed, 10 Oct 2001 23:40:39 +0900 (KST) (envelope-from redjade) Date: Wed, 10 Oct 2001 23:40:39 +0900 From: Kim Kyung-hwan To: freebsd-net@freebsd.org Subject: Getting link level addr using SIOCGIFADDR Message-ID: <20011010234039.A2120@ada.snu.ac.kr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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