X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProtout.pm;h=cacf60e0c756a67612452ab192bb07c50be157c6;hb=7ccae7dc99f806c3a0b128a0cf26cf8e489048fb;hp=a2b69a67a9f4dfbba796dfaa5c17e7dde67aa184;hpb=89643eba546b3cda9ba83a527919fad79651b858;p=spider.git diff --git a/perl/DXProtout.pm b/perl/DXProtout.pm index a2b69a67..cacf60e0 100644 --- a/perl/DXProtout.pm +++ b/perl/DXProtout.pm @@ -360,6 +360,37 @@ sub pc85 return "PC85^$tonode^$fromnode^$call^$msg^~"; } +# spider route broadcast +sub pc90 +{ + my $node = shift; + my $sort = shift; + my @out; + my $dxchan; + my $n = @_; + + while (@_) { + my $str = sprintf "PC90^%s^%X^%s%d", $node->call, $main::systime, $sort, $n-1 ; + for (; @_ && length $str < 200;) { + my $ref = shift; + next if $ref == $main::me; + my $call = $ref->call; + my $flag = 0; + $flag += 1 if $ref->here; + $flag += 2 if $ref->conf; + if ($ref->is_node) { + my $ping = int($ref->pingave * 10); + $str .= "^N$flag$call,$ping"; + } else { + $str .= "^U$flag$call"; + } + } + $str .= sprintf "^%s^", get_hops(90); + push @out, $str; + } + return @out; +} + 1; __END__