AMPR-Rip44
view release on metacpan or search on metacpan
# The amount of 1's in the beginning is the prefix length.
return length($1);
}
# delete a route from the kernel's table
sub route_delete($)
{
my($rkey) = @_;
# This is ugly and slow - we fork /sbin/ip twice for every route change.
# Should talk to the netlink device instead, but this is easier to
# do right now, and good enough for this little routing table.
my($out, $cmd);
$cmd = "LANG=C $routebin route del $rkey";
$out = `$cmd 2>&1`;
if ($?) {
if ($verbose > 1 || $out !~ /No such process/) {
warn "route del failed: '$cmd': $out\n";
}
}
lib/AMPR/Rip44.pm view on Meta::CPAN
=head1 AUTHOR
Heikki Hannikainen, OH7LZB, C<< <hessu at hes.iki.fi> >>
=head1 BUGS
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
( run in 3.604 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )