Blame bin/tests/system/testsock6.pl
|
Packit Service |
ae04f2 |
#!/usr/bin/perl
|
|
Packit Service |
ae04f2 |
#
|
|
Packit Service |
ae04f2 |
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
|
Packit Service |
ae04f2 |
#
|
|
Packit Service |
ae04f2 |
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
Packit Service |
ae04f2 |
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
Packit Service |
ae04f2 |
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
Packit Service |
ae04f2 |
#
|
|
Packit Service |
ae04f2 |
# See the COPYRIGHT file distributed with this work for additional
|
|
Packit Service |
ae04f2 |
# information regarding copyright ownership.
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
require 5.001;
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
use IO::Socket::INET6;
|
|
Packit Service |
ae04f2 |
|
|
Packit Service |
ae04f2 |
foreach $addr (@ARGV) {
|
|
Packit Service |
ae04f2 |
my $sock;
|
|
Packit Service |
ae04f2 |
$sock = IO::Socket::INET6->new(LocalAddr => $addr,
|
|
Packit Service |
ae04f2 |
LocalPort => 0,
|
|
Packit Service |
ae04f2 |
Proto => tcp)
|
|
Packit Service |
ae04f2 |
or die "Can't bind : $@\n";
|
|
Packit Service |
ae04f2 |
close($sock);
|
|
Packit Service |
ae04f2 |
}
|