From owner-freebsd-hackers Wed Aug 1 0:51:22 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from mimer.webgiro.com (mailer2.webgiro.com [213.162.131.18]) by hub.freebsd.org (Postfix) with ESMTP id 942F037B403 for ; Wed, 1 Aug 2001 00:51:19 -0700 (PDT) (envelope-from abial@webgiro.com) Received: from webgiro.com (mailer2.webgiro.com [213.162.131.18]) by mimer.webgiro.com (Postfix) with ESMTP id 10AE768469; Wed, 1 Aug 2001 10:13:56 +0200 (CEST) Message-ID: <3B67B425.40D6FE0E@webgiro.com> Date: Wed, 01 Aug 2001 09:47:50 +0200 From: Andrzej Bialecki Organization: WebGiro AB X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Michael VanLoon Cc: 'Chris Faulhaber' , "'hackers@freebsd.org'" Subject: Re: Finding MAC address of interface - programming question References: <36F7B20351634E4FBFFE6C6A216B30D54C80@ecx1.edifecs.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Michael VanLoon wrote: > > > From: Chris Faulhaber [mailto:jedgar@fxp.org] > > Sent: Tuesday, July 31, 2001 3:56 PM > > > > On Tue, Jul 31, 2001 at 03:56:40PM -0700, Michael VanLoon wrote: > > > Please point me to a more appropriate forum if there is > > one. I'm kinda out > > > of my depth on this question. Pseudo code is fine. :-) > > > > > > What I'm looking for is how to enumerate the network > > interfaces and get the > > > Ethernet MAC address of one programmatically. Can anyone > > point me in the > > > right direction? > > > > > > > /usr/src/sbin/ifconfig > > Thanks, I've already been looking at that. :-) > > The problem is, ifconfig does a lot of other stuff, and it's very poorly > documented. > > I was hoping someone could give me some hints to speed my research. Such as > recommended places to look in the code, ioctl's used and/or sysctl's called. > > I'm happy to do most of the work myself, I'm just asking for some hints. :-) > Much appreciated. Take a look at /usr/src/release/picobsd/tinyware/ns. I went through the same hoops some time ago... :-) -- Andrzej // ---------------------------------------------------------------- // Andrzej Bialecki , Chief System Architect // WebGiro AB, Sweden (http://www.webgiro.com) // ---------------------------------------------------------------- // FreeBSD developer (http://www.freebsd.org) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message