AMPR-Rip44
view release on metacpan or search on metacpan
AMPR-Rip44
This is a custom RIPv2 daemon which is only useful if you're participating
in the amateur radio 44/8 Amprnet gateways tunnel network. It updates
ipip tunnel mesh routes based on RIP updates coming from a master server.
rip44d does not even transmit RIP packets by itself.
INSTALLATION
To install this module, run the following commands:
perl Makefile.PL
make
make test
make install
SUPPORT AND DOCUMENTATION
After installing, you can find documentation for this module with the
perldoc command.
perldoc AMPR::Rip44
You can also look for information at:
More information can be found in the ampr-gateways wiki:
The Rip44d page on the ampr-gateways.org wiki
http://wiki.ampr-gateways.org/index.php?title=Rip44d
{
my($fh) = @_;
print $fh "Usage:\n"
. " $me [-v] [-d] [-i <tunnelif>] [-a <localaddrs>] [-p <password>]\n"
. "Options:\n"
. " -v increase verbosity slightly to print error messages on stderr\n"
. " -d increase verbosity greatly (debug mode)\n"
. " -i <tunnelinterface>\n"
. " use the specified tunnel interface, defaults to tunl0\n"
. " -a <comma-separated-ip-list>\n"
. " ignore routes pointing to these (local) gateways\n"
. " (list contains system's local IP addresses by default)\n"
. " -p <password>\n"
. " use RIPv2 password 'authentication', defaults to none\n"
;
}
sub VERSION_MESSAGE()
{
my($fh) = @_;
# packet's length must be divisible by the length of an entry
if ((length($msg) - RIP_HDR_LEN) % RIP_ENTRY_LEN != 0) {
warn "$me: ignored invalid length packet from $addr_s: " . length($msg) . "\n";
return -1;
}
# validate RIP packet header
my $hdr = substr($msg, 0, 4);
my $entries = substr($msg, 4);
my($rip_command, $rip_version, $zero1, $zero2) = unpack('C*', $hdr);
if ($rip_command != RIP_CMD_RESPONSE) {
warn "$me: ignored non-response RIP packet from $addr_s\n";
return -1;
}
if ($rip_version != 2) {
warn "$me: ignored RIP version $rip_version packet from $addr_s (only accept v2)\n";
return -1;
}
if ($zero1 != 0 || $zero2 != 0) {
warn "$me: ignored RIP packet from $addr_s: zero bytes are not zero in header\n";
return -1;
$routes += $n;
}
return $routes;
}
#
####### main #############################################
#
# command line parsing
my %opts;
getopts('i:p:a:vd', \%opts);
if (defined $opts{'i'}) {
$tunnel_if = $opts{'i'};
}
if (defined $opts{'p'}) {
$rip_passwd = $opts{'p'};
}
if ($opts{'v'} && !$verbose) {
lib/AMPR/Rip44.pm view on Meta::CPAN
Please report any bugs or feature requests to C<bug-ampr-rip44 at rt.cpan.org>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=AMPR-Rip44>. I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
perldoc AMPR::Rip44
You can also look for information at:
=over 4
=item * RT: CPAN's request tracker
( run in 1.531 second using v1.01-cache-2.11-cpan-0d23b851a93 )