Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jan 2005 05:25:26 +0000
From:      Bruce M Simpson <bms@spc.org>
To:        Ivan Voras <ivoras@fer.hr>
Cc:        Robert Watson <rwatson@freebsd.org>
Subject:   Re: Raw sockets problem?
Message-ID:  <20050110052526.GB709@empiric.icir.org>
In-Reply-To: <41E06011.4050501@fer.hr>
References:  <Pine.NEB.3.96L.1050108172415.43829E-100000@fledge.watson.org> <41E06011.4050501@fer.hr>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050110052526.GB709>