mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
more detailed error reporting
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
|
|
||||||
# $Id: testsock.pl,v 1.4 2000/06/25 01:40:05 gson Exp $
|
# $Id: testsock.pl,v 1.5 2000/06/25 02:30:18 gson Exp $
|
||||||
|
|
||||||
# Test whether the interfaces on 10.53.0.* are up.
|
# Test whether the interfaces on 10.53.0.* are up.
|
||||||
|
|
||||||
@@ -28,9 +28,11 @@ my $port = 0;
|
|||||||
GetOptions("p=i" => \$port);
|
GetOptions("p=i" => \$port);
|
||||||
|
|
||||||
for ($id = 1 ; $id < 6 ; $id++) {
|
for ($id = 1 ; $id < 6 ; $id++) {
|
||||||
$sa = pack_sockaddr_in($port, pack("C4", 10, 53, 0, $id));
|
my $addr = pack("C4", 10, 53, 0, $id);
|
||||||
|
my $sa = pack_sockaddr_in($port, $addr);
|
||||||
socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname("tcp"))
|
socket(SOCK, PF_INET, SOCK_STREAM, getprotobyname("tcp"))
|
||||||
or die "$0: socket: $!\n";
|
or die "$0: socket: $!\n";
|
||||||
bind(SOCK, $sa)
|
bind(SOCK, $sa)
|
||||||
or die "$0: bind: $!\n";
|
or die sprintf("$0: bind(%s, %d): $!\n",
|
||||||
|
inet_ntoa($addr), $port);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user