From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 10 05:25:25 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2DB0E16A4CF; Mon, 10 Jan 2005 05:25:25 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5BBC43D1D; Mon, 10 Jan 2005 05:25:24 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id B3FE7652FE; Mon, 10 Jan 2005 05:25:23 +0000 (GMT) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 57763-04-2; Mon, 10 Jan 2005 05:25:23 +0000 (GMT) Received: from empiric.dek.spc.org (unknown [213.210.24.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id AD752651EB; Mon, 10 Jan 2005 05:25:19 +0000 (GMT) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id A0C566530; Mon, 10 Jan 2005 05:25:26 +0000 (GMT) Date: Mon, 10 Jan 2005 05:25:26 +0000 From: Bruce M Simpson To: Ivan Voras Message-ID: <20050110052526.GB709@empiric.icir.org> References: <41E06011.4050501@fer.hr> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: <41E06011.4050501@fer.hr> cc: hackers@freebsd.org cc: Robert Watson Subject: Re: Raw sockets problem? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jan 2005 05:25:25 -0000 --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 08, 2005 at 11:34:57PM +0100, Ivan Voras wrote: > I use it in this code: >=20 > /* get interface name by index */ =2E.. Please consider using if_nameindex() or if_nametoindex(), which will retrie= ve the getifaddrs() list for you and considerably simplify the code fragment you've provided. These are specified by RFC 2553 and are used in many places within the XORP open source router. Regards, BMS --EeQfGwPcQSOJBaQU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Comment: '' iD8DBQFB4hHGueUpAYYNtTsRAgniAJ0YzZlrx6HG0g1nuxbv3Ycsdo5brgCfXFQZ zUj6J2TsFMoejdhrf+bGH0A= =hsBH -----END PGP SIGNATURE----- --EeQfGwPcQSOJBaQU--