From owner-freebsd-questions Mon Feb 25 11: 5:41 2002 Delivered-To: freebsd-questions@freebsd.org Received: from web.cs.ndsu.nodak.edu (web.cs.ndsu.NoDak.edu [134.129.125.7]) by hub.freebsd.org (Postfix) with ESMTP id C304137B402 for ; Mon, 25 Feb 2002 11:05:34 -0800 (PST) Received: (from tinguely@localhost) by web.cs.ndsu.nodak.edu (8.11.4/8.11.4) id g1PJ5WM78832; Mon, 25 Feb 2002 13:05:32 -0600 (CST) (envelope-from tinguely) Date: Mon, 25 Feb 2002 13:05:32 -0600 (CST) From: mark tinguely Message-Id: <200202251905.g1PJ5WM78832@web.cs.ndsu.nodak.edu> To: anuranjan@yahoo.com, questions@FreeBSD.ORG Subject: Re: IOCTL problem in a n/w driver In-Reply-To: <20020222221211.24724.qmail@web12501.mail.yahoo.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > In this I can set the LLADDR and MTU and can read the > correct MTU using the "ifconfig" command. But > interesting this is that In the output of the ifconfig > I see: > > xx0: ...... MTU 1500 > ether 00:00:00:00:00:00 I assume that you set the MAC address to the arpcom.ac_enaddr for the device. bcopy(macvar, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); ^^^^^ from ROM The MAC address is stored in 2 places. The driver and ifconfig -lla set up the variable ac_enaddr and ether_ifattach copies it into the correct sockaddr_dl location. the SIOCGIFADDR ioctl returns the value stored in the ac_enaddr. --mark tinguely. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message