[157646] in North American Network Operators' Group
Re: IPv6 Netowrk Device Numbering BP
daemon@ATHENA.MIT.EDU (Chip Marshall)
Thu Nov 1 13:43:56 2012
Date: Thu, 1 Nov 2012 13:43:14 -0400
From: Chip Marshall <chip@2bithacker.net>
To: Owen DeLong <owen@delong.com>
In-Reply-To: <B054B0DE-9D2F-4AD1-BE75-2DE89CA0A1B8@delong.com>
Cc: nanog@nanog.org
Reply-To: chip@2bithacker.net
Errors-To: nanog-bounces+nanog.discuss=bloom-picayune.mit.edu@nanog.org
--cWoXeonUoKmBZSoM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On 01-Nov-2012, Owen DeLong <owen@delong.com> sent:
> The only exceptions to this parsing would be if someone handed
> you a textual representation of an IPv4 mapped address
> (::ffff:192.0.2.50), which essentially represents the partial
> decimal format Masataka is requesting.
I might be missing something here, but isn't that format already
valid for any IPv6 address, not just the special v4-in-v6
representation?
>>> import socket
>>> p =3D '2001:abcd::192.16.10.10'
>>> n =3D socket.inet_pton(socket.AF_INET6, p)
>>> socket.inet_ntop(socket.AF_INET6, n)
'2001:abcd::c010:a0a'
Or is the issue just the ntop part not giving you back the
decimalized string?
--=20
Chip Marshall <chip@2bithacker.net>
http://weblog.2bithacker.net/ KB1QYW PGP key ID 43C4819E
v4sw5PUhw4/5ln5pr5FOPck4ma4u6FLOw5Xm5l5Ui2e4t4/5ARWb7HKOen6a2Xs5IMr2g6CM
--cWoXeonUoKmBZSoM
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (Darwin)
iEYEARECAAYFAlCStLEACgkQnTUxIUPEgZ7UugCfRFAwOO7K1f1DBTXHfOS8UxwO
mV8AnjFTEAG6jTkvGaIvDuf/1C3Qm574
=mbsP
-----END PGP SIGNATURE-----
--cWoXeonUoKmBZSoM--