X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Flinks.pl;h=a66ee19469cd70404adabb9698b9207a97fc0c1a;hb=503168fd0f513720c544c62a593b8d9cb2bb778d;hp=419de1896ddd6c391f1b8333876e16dc09acbab9;hpb=4dad3e88c864c41e6ac5a609fb5e5f656eae2937;p=spider.git diff --git a/cmd/links.pl b/cmd/links.pl index 419de189..a66ee194 100644 --- a/cmd/links.pl +++ b/cmd/links.pl @@ -16,7 +16,7 @@ my @out; my $nowt = time; push @out, " Ave Obs Ping Next Filters"; -push @out, " Callsign Type Started RTT Count Int. Ping Iso? In Out PC92?"; +push @out, " Callsign Type Started RTT Count Int. Ping Iso? In Out PC92? Address"; foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all_nodes ) { my $call = $dxchan->call(); @@ -51,7 +51,15 @@ foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all_nodes ) { $sort = "DXNT" if $dxchan->is_dxnet; $sort = "AR-C" if $dxchan->is_arcluster; $sort = "AK1A" if $dxchan->is_ak1a; - push @out, sprintf "%10s $sort $t$ping $obscount %5d %5d $iso $fin $fout $pc92", $call, $pingint, $lastt; + my $ipaddr; + + if ($dxchan->conn->peerhost) { + my $addr = $dxchan->conn->peerhost; + $ipaddr = $addr if is_ipaddr($addr); + $ipaddr = 'local' if $addr =~ /^127\./ || $addr =~ /^::[0-9a-f]+$/; + } + + push @out, sprintf "%10s $sort $t$ping $obscount %5d %5d $iso $fin $fout $pc92 $ipaddr", $call, $pingint, $lastt; } return (1, @out)