RFC 5952 converter tool

Jens Link lists at quux.de
Sat Nov 30 12:38:44 CET 2013


Leo Vegoda <leo.vegoda at icann.org> writes:

> Hi,
>
> Can anyone recommend a library or other tool, preferably open source,
> that can take non-RFC 5952 formatted IPv6 addresses and convert them to
> a compliant format?

For python http://docs.python.org/dev/library/ipaddress should do the
trick:

#!/usr/bin/python
from ipaddr import *
ip = IPAddress('2001:06F8:110B:0000:f2de:f1ff:fec9:25ce')
print ip.compressed

Jens
-- 
----------------------------------------------------------------------------
| Foelderichstr. 40   | 13595 Berlin, Germany           | +49-151-18721264 |
| http://blog.quux.de | jabber: jenslink at jabber.quux.de | ---------------  | 
----------------------------------------------------------------------------



More information about the ipv6-ops mailing list