From owner-freebsd-net Mon Feb 10 8:42:28 2003 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5BEB437B436 for ; Mon, 10 Feb 2003 08:42:26 -0800 (PST) Received: from creme-brulee.marcuscom.com (rdu57-17-158.nc.rr.com [66.57.17.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3116F43F3F for ; Mon, 10 Feb 2003 08:42:25 -0800 (PST) (envelope-from marcus@marcuscom.com) Received: from [192.168.1.4] (shumai.marcuscom.com [192.168.1.4]) by creme-brulee.marcuscom.com (8.12.6/8.12.6) with ESMTP id h1AGg2RA024996; Mon, 10 Feb 2003 11:42:02 -0500 (EST) (envelope-from marcus@marcuscom.com) Subject: Re: Programmatically obtaining interface hardware addrs From: Joe Marcus Clarke To: Martin Stiemerling Cc: freebsd-net@FreeBSD.ORG In-Reply-To: <3E4772CF.9020201@ccrle.nec.de> References: <1044760845.66333.35.camel@shumai.marcuscom.com> <3E4772CF.9020201@ccrle.nec.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-6J5WwVU7W/Wdmf6PGpv6" Organization: MarcusCom, Inc. Message-Id: <1044895337.58944.8.camel@shumai.marcuscom.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 10 Feb 2003 11:42:17 -0500 X-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,IN_REP_TO,MIME_LONG_LINE_QP,NOSPAM_INC,PGP_SIGNATURE_2, QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01 version=2.44 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 --=-6J5WwVU7W/Wdmf6PGpv6 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 2003-02-10 at 04:37, Martin Stiemerling wrote: > See man getifaddrs: >=20 > http://www.freebsd.org/cgi/man.cgi?query=3Dgetifaddrs&sektion=3D3&apropos= =3D0&manpath=3DFreeBSD+4.7-RELEASE >=20 > You can obtain l2 addresses with this system call. Thanks, I had my head buried so deep in ioctls and sysctls, I didn't consider anything else. Joe >=20 > Martin >=20 > Joe Marcus Clarke wrote: >=20 > >What's the best (or easiest) way to programmatically obtain interfaces' > >hardware addresses (that is, without forking ifconfig ;-))? I'm looking > >at how ifconfig does it, and wondering if there's an easier way. It > >seems Linux has a nice SIOCGIFHWADDR ioctl to do this. Thanks. > > > >Joe > > > > =20 > > >=20 --=20 PGP Key : http://www.marcuscom.com/pgp.asc --=-6J5WwVU7W/Wdmf6PGpv6 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQA+R9Zpb2iPiv4Uz4cRAsdtAJ4tiJng/NSOdxQbSZrfGvBPh7xWDwCfZNVk PnkEYkonhEMS/yom/XFtLbc= =CN83 -----END PGP SIGNATURE----- --=-6J5WwVU7W/Wdmf6PGpv6-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message