3 # This module is part of the new protocal mode for a dx cluster
5 # This module handles the Routing message between nodes
7 # Copyright (c) 2003 Dirk Koopman G1TLH
16 use vars qw(@ISA $VERSION $BRANCH);
19 $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
20 $BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
21 $main::build += $VERSION;
22 $main::branch += $BRANCH;
26 my ($self, $to, $from, $msgid, $line) = @_;
28 my @f = split /\^/, $line;
35 my @out = ('R', $self->call, "DXSpider", ($main::version + 53) * 100, $main::build);
36 if (my $pass = $self->user->passphrase) {
37 my $inp = Verify->new;
38 push @out, $inp->challenge, $inp->response($pass, $self->call, $main::mycall);
40 return $self->frame(@out);
56 for (; @_ && length $str <= 230;) {
58 my $call = $ref->call;
61 $flag += 1 if $ref->here;
62 $flag += 2 if $ref->conf;
64 my $ping = int($ref->pingave * 10);
65 $str .= "^N$flag$call,$ping";
66 my $v = $ref->build || $ref->version;
67 $str .= ",$v" if defined $v;
69 $str .= "^U$flag$call";
72 push @out, $str if $str;
76 @out = map { sprintf "PC90^%s^%X^%s%d%s^%s^", $node->call, $main::systime, $sort, --$n, $_, $h } @out;