Peter,
ftp://ftp.ripe.net/tools/Net-IP-1.0.tar.gz is a perl module by the RIPE
NCC for manipulating IPv4 and IPv6 addresses.
For instance:
#!/usr/bin/perl
use Net::IP;
my $ip = new Net::IP('3ffe:0400:0100:f101:0000:0000:0000:0001') or die
(Net::IP::Error());
print ("IP : ".$ip->ip()."\n");
print ("Sho : ".$ip->short()."\n");
gives:
IP : 3ffe:0400:0100:f101:0000:0000:0000:0001
Sho : 3ffe:400:100:f101::1
On Thu, 22 Feb 2001, Peter Bieringer wrote:
> I'm looking for a small utility (C, Perl) which converts IPv6 address
> strings like:
>
> Input like: 3ffe:0400:0100:f101:0000:0000:0000:0001
> Output (short format): 3ffe:400:100:f101::1
>
> Reason: I want to extend my current not always working duplicate address
> detection on adding IPv6 addresses in my set of script files. Easiest way
> is to compare any legal input converted with a tool against the "ifconfig"
> output.
>
> Perhaps someone has already written one or has time to do this. I'm sure
> there is a libary which contains already such a function (I think
> net-tools/ifconfig use such one).
--
[EMAIL PROTECTED], BELNET
---------------------------------------------------------------------
The IPv6 Users Mailing List
Unsubscribe by sending "unsubscribe users" to [EMAIL PROTECTED]