projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4dad3e8
)
add ip address to links command
author
Dirk Koopman
<djk@tobit.co.uk>
Sun, 21 Jul 2013 22:17:46 +0000
(23:17 +0100)
committer
Dirk Koopman
<djk@tobit.co.uk>
Sun, 21 Jul 2013 22:17:46 +0000
(23:17 +0100)
Changes
patch
|
blob
|
history
cmd/links.pl
patch
|
blob
|
history
diff --git
a/Changes
b/Changes
index 2e2993dbcd6c7df9b3bfc4408811928c00e9f13e..b49607e298e236f0eb29062a8956f45f269bc329 100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-3,6
+3,7
@@
2. Add latest CTY2307 prefix changes.
3. Other changes including (some) more prefix files, 4mm band data and
DXSql/Pg.pm
2. Add latest CTY2307 prefix changes.
3. Other changes including (some) more prefix files, 4mm band data and
DXSql/Pg.pm
+4. Add ip address in links.pl
31May12=======================================================================
1. Added CTY2210 prefix changes
29May12=======================================================================
31May12=======================================================================
1. Added CTY2210 prefix changes
29May12=======================================================================
diff --git
a/cmd/links.pl
b/cmd/links.pl
index 419de1896ddd6c391f1b8333876e16dc09acbab9..a66ee19469cd70404adabb9698b9207a97fc0c1a 100644
(file)
--- a/
cmd/links.pl
+++ b/
cmd/links.pl
@@
-16,7
+16,7
@@
my @out;
my $nowt = time;
push @out, " Ave Obs Ping Next Filters";
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();
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;
$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)
}
return (1, @out)