[107131] in North American Network Operators' Group

home help back first fref pref prev next nref lref last post

Re: interger to I P address

daemon@ATHENA.MIT.EDU (Jeroen Massar)
Wed Aug 27 07:20:22 2008

Date: Wed, 27 Aug 2008 13:20:13 +0200
From: Jeroen Massar <jeroen@unfix.org>
To: Simon Lockhart <simon@slimey.org>
In-Reply-To: <20080827111304.GL16377@virtual.bogons.net>
Cc: nanog@nanog.org
Errors-To: nanog-bounces@nanog.org

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig8D0E2971818AF97D2B6131D9
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Simon Lockhart wrote:
> On Wed Aug 27, 2008 at 07:11:41AM -0400, kcc wrote:
>> ls it possible t convert the interger to ip
>=20
> Yes.

If you are using 128-bit integers, which according to some will also
change some day, thus one should be using "struct addrinfo" and:

getaddrinfo()
getnameinfo()

as those are the girlfriends of programmers.

Note that one should effectively avoid inet_pton/inet_ntop as they still
require the programmer to know about address families, the get*info()
ones ignore all those details.

Also see Itojun's (RIP :( ) excellent document at:
 http://www.kame.net/newsletter/19980604/

and of course Eva's document at:
 http://gsyc.escet.urjc.es/~eva/IPv6-web/ipv6.html

Greets,
 Jeroen


--------------enig8D0E2971818AF97D2B6131D9
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)

iD8DBQFItThtKaooUjM+fCMRAtaJAJ4qd5A5KpZP8AdA6iEkxxjyoQ9aBwCgqYa7
WdTTkMyovZ5gJ0WPJlt4XsM=
=AGfZ
-----END PGP SIGNATURE-----

--------------enig8D0E2971818AF97D2B6131D9--


home help back first fref pref prev next nref lref last post