make the aranea protocol stuff master!
unless ($self->{outbound}) {
my $thing = Thingy::Rt->new_cf;
$thing->broadcast;
unless ($self->{outbound}) {
my $thing = Thingy::Rt->new_cf;
$thing->broadcast;
+ $self->lastcf($main::systime);
}
# run a script send the output to the debug file
}
# run a script send the output to the debug file
lastmsgpoll => '0,Last Msg Poll,atime',
inscript => '9,In a script,yesno',
inqueue => '9,Input Queue,parray',
lastmsgpoll => '0,Last Msg Poll,atime',
inscript => '9,In a script,yesno',
inqueue => '9,Input Queue,parray',
+ lastcf => '1,Last CF Update,atime',
);
use vars qw($VERSION $BRANCH);
);
use vars qw($VERSION $BRANCH);
# input filter if required
return unless $self->in_filter_route($parent);
}
# input filter if required
return unless $self->in_filter_route($parent);
}
+
+ # is he under the control of the new protocol?
+ if ($parent && $parent->np) {
+ dbg("PCPROT: $ncall aranea node, ignored") if isdbg('chanerr');
+ return;
+ }
- for ($i = 2; $i < $#_; $i++) {
- my ($call, $conf, $here) = $_[$i] =~ /^(\S+) (\S) (\d)/o;
- next unless $call && $conf && defined $here && is_callsign($call);
- next if $call eq $main::mycall;
-
- eph_del_regex("^PC17\\^$call\\^$ncall");
-
+ for ($i = 2; $i < $#_; $i++) {
+ my ($call, $conf, $here) = $_[$i] =~ /^(\S+) (\S) (\d)/o;
+ next unless $call && $conf && defined $here && is_callsign($call);
+ next if $call eq $main::mycall;
+
+ eph_del_regex("^PC17\\^$call\\^$ncall");
+
# reject this if we think it is a node already
my $r = Route::Node::get($call);
my $u = DXUser->get_current($call) unless $r;
# reject this if we think it is a node already
my $r = Route::Node::get($call);
my $u = DXUser->get_current($call) unless $r;
$r = Route::User::get($call);
my $flags = Route::here($here)|Route::conf($conf);
$r = Route::User::get($call);
my $flags = Route::here($here)|Route::conf($conf);
if ($r) {
my $au = $r->addparent($parent);
if ($r->flags != $flags) {
$r->flags($flags);
$au = $r;
if ($r) {
my $au = $r->addparent($parent);
if ($r->flags != $flags) {
$r->flags($flags);
$au = $r;
push @rout, $parent->add_user($call, $flags);
}
push @rout, $parent->add_user($call, $flags);
}
# add this station to the user database, if required
$call =~ s/-\d+$//o; # remove ssid for users
my $user = DXUser->get_current($call);
# add this station to the user database, if required
$call =~ s/-\d+$//o; # remove ssid for users
my $user = DXUser->get_current($call);
+ # is he under the control of the new protocol?
+ if ($parent && $parent->np) {
+ dbg("PCPROT: $ncall aranea node, ignored") if isdbg('chanerr');
+ return;
+ }
+
# input filter if required and then remove user if present
if ($parent) {
# return unless $self->in_filter_route($parent);
# input filter if required and then remove user if present
if ($parent) {
# return unless $self->in_filter_route($parent);
my $r = Route::Node::get($call);
my $flags = Route::here($here)|Route::conf($conf);
my $r = Route::Node::get($call);
my $flags = Route::here($here)|Route::conf($conf);
+ # is he under the control of the new protocol?
+ if ($r->np) {
+ dbg("PCPROT: $call aranea node, ignored") if isdbg('chanerr');
+ next;
+ }
# modify the routing table if it is in it, otherwise store it in the pc19list for now
if ($r) {
my $ar;
# modify the routing table if it is in it, otherwise store it in the pc19list for now
if ($r) {
my $ar;
my $thing = Thingy::Rt->new(user=>$self->{call});
my $nref = Route::Node::get($self->{call});
$thing->broadcast if $thing->copy_pc16_data($nref);
my $thing = Thingy::Rt->new(user=>$self->{call});
my $nref = Route::Node::get($self->{call});
$thing->broadcast if $thing->copy_pc16_data($nref);
+ $self->lastcf($main::systime);
}
# delete a cluster from the list
}
# delete a cluster from the list
# input filter it
return unless $self->in_filter_route($node);
# input filter it
return unless $self->in_filter_route($node);
+
+ # is he under the control of the new protocol?
+ if ($node->np) {
+ dbg("PCPROT: $call aranea node, ignored") if isdbg('chanerr');
+ return;
+ }
# routing objects
push @rout, $node->del($parent);
# routing objects
push @rout, $node->del($parent);
my $thing = Thingy::Rt->new(user=>$self->{call});
my $nref = Route::Node::get($self->{call});
$thing->broadcast if $thing->copy_pc16_data($nref);
my $thing = Thingy::Rt->new(user=>$self->{call});
my $nref = Route::Node::get($self->{call});
$thing->broadcast if $thing->copy_pc16_data($nref);
+ $self->lastcf($main::systime);
use Thingy::RouteFilter;
use Spot;
use Thingy::RouteFilter;
use Spot;
+use vars qw(@ISA $update_interval);
@ISA = qw(Thingy Thingy::RouteFilter);
@ISA = qw(Thingy Thingy::RouteFilter);
+$update_interval = 30 * 60; # the interval between 'cf' updates for an interface
+
sub gen_Aranea
{
my $thing = shift;
sub gen_Aranea
{
my $thing = shift;
unless ($thing->{Aranea}) {
my $ref;
if ($ref = $thing->{anodes}) {
unless ($thing->{Aranea}) {
my $ref;
if ($ref = $thing->{anodes}) {
}
$thing->{Aranea} = Aranea::genmsg($thing, [qw(s a n u)]);
}
}
$thing->{Aranea} = Aranea::genmsg($thing, [qw(s a n u)]);
}
return $thing->{Aranea};
}
return $thing->{Aranea};
}