diff options
author | hubertf <hubertf> | 2001-03-04 15:59:22 +0000 |
---|---|---|
committer | hubertf <hubertf> | 2001-03-04 15:59:22 +0000 |
commit | d6cb5c5cf18e21e32e0847addedd212e22a650a5 (patch) | |
tree | 1159997d78a537e7c1ffacef1040cd96a5275ce3 /net | |
parent | e481893f82b040fe0485bbca65af947aa503a2ad (diff) | |
download | pkgsrc-d6cb5c5cf18e21e32e0847addedd212e22a650a5.tar.gz |
Add ipv6calc-0.10:
ipv6calc is a small utility in C to manipulate IPv6 addresses. The intentions
were to convert a given IPv6 address into compressed format, convert a given
IPv6 address into the same format like shown in Linux' /proc/net/if_inet6 and
(because it was not difficulty) migrate ip6_int into. Now only one utiltity is
needed to do a lot (perhaps the features grow on demand in the future).
This utility will be used in the future to extend features on
network-functions-ipv6.
Examples:
ipv6calc --addr2ip6_int ipv6addr[/prefixlength]
Converts given IPv6 address to a dot separated reverse nibble format for use with DNS
e.g. 3ffe:400:100:f101::1
-> 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.1.f.0.0.1.0.0.0.4.0.e.f.f.3.ip6.int
e.g. 3ffe:400:100:f101::1/64 -> 1.0.1.f.0.0.1.0.0.0.4.0.e.f.f.3.ip6.int
ipv6calc --addr2compaddr ipv6addr[/prefixlength]
Converts given IPv6 address to a compressed one
e.g. 3ffe:0400:0100:f101:0000:0000:0000:0001 -> 3ffe:400:100:f101::1
ipv6calc --addr2uncompaddr ipv6addr[/prefixlength]
Converts given IPv6 address to an uncompressed one
e.g. 3ffe:400:100:f101::1 -> 3ffe:400:100:f101:0:0:0:1
ipv6calc --addr2fulluncompaddr ipv6addr[/prefixlength]
Converts given IPv6 address to a full uncompressed one
e.g. 3ffe:400:100:f101::1 -> 3ffe:0400:0100:f101:0000:0000:0000:0001
ipv6calc --addr2if_inet6 ipv6addr[/prefixlength]
Converts given IPv6 address to similar format shown in /proc/net/if_inet6:
addr scope [prefixlength]
e.g. 3ffe:400:100:f101::1 -> 3ffe04000100f1010000000000000001 00
e.g. 3ffe:400:100:f101::1/64 -> 3ffe04000100f1010000000000000001 00 40
ipv6calc --if_inet62addr 32hexcharsIPv6addr [2hexcharsPrefixlength]
Converts given if_inet6 formatted IPv6 address to normal one
e.g. 3ffe04000100f1010000000000000001 -> 3ffe:400:100::1
e.g. 3ffe04000100f1010000000000000001 40 -> 3ffe:400:100::1/64
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6calc/Makefile | 20 | ||||
-rw-r--r-- | net/ipv6calc/files/md5 | 3 | ||||
-rw-r--r-- | net/ipv6calc/files/patch-sum | 3 | ||||
-rw-r--r-- | net/ipv6calc/patches/patch-aa | 17 | ||||
-rw-r--r-- | net/ipv6calc/pkg/DESCR | 8 | ||||
-rw-r--r-- | net/ipv6calc/pkg/PLIST | 2 |
6 files changed, 53 insertions, 0 deletions
diff --git a/net/ipv6calc/Makefile b/net/ipv6calc/Makefile new file mode 100644 index 00000000000..2faef38a5fc --- /dev/null +++ b/net/ipv6calc/Makefile @@ -0,0 +1,20 @@ +# $NetBSD: Makefile,v 1.1.1.1 2001/03/04 15:59:22 hubertf Exp $ +# + +DISTNAME= ipv6calc-0.10 +CATEGORIES= net +MASTER_SITES= ftp://ftp.bieringer.de/pub/linux/IPv6/ipv6calc/ + +MAINTAINER= hubertf@netbsd.org +HOMEPAGE= http://www.bieringer.de/linux/IPv6/tools/index.html#ipv6calc +COMMENT= Manipulates IPv6 adresses + +USE_GMAKE= yes +ALL_TARGET= ipv6calc + +MAKE_ENV+= CC="${CC} -D_NETINET_IN_H" + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/ipv6calc ${PREFIX}/bin + +.include "../../mk/bsd.pkg.mk" diff --git a/net/ipv6calc/files/md5 b/net/ipv6calc/files/md5 new file mode 100644 index 00000000000..98ce48062cb --- /dev/null +++ b/net/ipv6calc/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 2001/03/04 15:59:22 hubertf Exp $ + +MD5 (ipv6calc-0.10.tar.gz) = fc95f3e3697cc8289db2bef290cc3af1 diff --git a/net/ipv6calc/files/patch-sum b/net/ipv6calc/files/patch-sum new file mode 100644 index 00000000000..bbfe1bb8265 --- /dev/null +++ b/net/ipv6calc/files/patch-sum @@ -0,0 +1,3 @@ +$NetBSD: patch-sum,v 1.1.1.1 2001/03/04 15:59:22 hubertf Exp $ + +MD5 (patch-aa) = 8d097b13d20b3619f91076429bf236aa diff --git a/net/ipv6calc/patches/patch-aa b/net/ipv6calc/patches/patch-aa new file mode 100644 index 00000000000..802c7d871d9 --- /dev/null +++ b/net/ipv6calc/patches/patch-aa @@ -0,0 +1,17 @@ +$NetBSD: patch-aa,v 1.1.1.1 2001/03/04 15:59:22 hubertf Exp $ + +--- libipv6calc.c.orig Sun Mar 4 03:28:04 2001 ++++ libipv6calc.c +@@ -27,6 +27,12 @@ + #ifndef _NETINET_IN_H + # include <linux/ipv6.h> + #endif ++#if defined(__NetBSD__) ++ /* work around incompatibilities between Linux (USAGI?) and KAME */ ++#define s6_addr32 __u6_addr.__u6_addr32 ++#define in6_u __u6_addr ++#define u6_addr32 __u6_addr32 ++#endif + #include "include/modifiedfromkernel/include/net/ipv6-split.h" + #include "include/modifiedfromkernel/net/ipv6/addrconf-split.c" + #include "ipv6calc.h" diff --git a/net/ipv6calc/pkg/DESCR b/net/ipv6calc/pkg/DESCR new file mode 100644 index 00000000000..35bbad7fbb5 --- /dev/null +++ b/net/ipv6calc/pkg/DESCR @@ -0,0 +1,8 @@ +ipv6calc is a small utility in C to manipulate IPv6 addresses. The intentions +were to convert a given IPv6 address into compressed format, convert a given +IPv6 address into the same format like shown in Linux' /proc/net/if_inet6 and +(because it was not difficulty) migrate ip6_int into. Now only one utiltity is +needed to do a lot (perhaps the features grow on demand in the future). + +This utility will be used in the future to extend features on +network-functions-ipv6. diff --git a/net/ipv6calc/pkg/PLIST b/net/ipv6calc/pkg/PLIST new file mode 100644 index 00000000000..0b84c31ecbb --- /dev/null +++ b/net/ipv6calc/pkg/PLIST @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2001/03/04 15:59:22 hubertf Exp $ +bin/ipv6calc |