summaryrefslogtreecommitdiff
path: root/src/inet_pton
diff options
context:
space:
mode:
Diffstat (limited to 'src/inet_pton')
-rwxr-xr-xsrc/inet_pton4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/inet_pton b/src/inet_pton
new file mode 100755
index 0000000..f41f8ad
--- /dev/null
+++ b/src/inet_pton
@@ -0,0 +1,4 @@
1#!/usr/bin/perl
2use Socket qw(inet_pton AF_INET6);
3@ARGV == 1 || die "usage: $0 <ipv6 address>\n";
4print STDOUT (inet_pton (AF_INET6, $ARGV[0]) || die "inet_pton: $!\n");