AMPR-Rip44
view release on metacpan or search on metacpan
sub process_rip_auth_entry($)
{
my($entry) = @_;
my $e_af = unpack('n', substr($entry, 0, 2));
if ($e_af != 0xFFFF) {
warn "RIPv2 first message does not contain auth password: ignoring\n" if ($verbose);
return 0;
}
my $e_type = unpack('n', substr($entry, 2, 2));
if ($e_type != RIP_AUTH_PASSWD) {
warn "ignoring unsupported rip auth type $e_type\n" if ($verbose);
return 0;
}
my $e_passwd = substr($entry, 4, 16);
$e_passwd =~ s/\0*$//; # it's null-padded in the end
if (!defined $rip_passwd) {
warn "RIPv2 packet contains password $e_passwd but we require none\n" if ($verbose);
return 0;
}
t/perlcriticrc view on Meta::CPAN
[-ValuesAndExpressions::ProhibitConstantPragma]
[-Subroutines::RequireArgUnpacking]
[-Subroutines::ProhibitSubroutinePrototypes]
( run in 1.426 second using v1.01-cache-2.11-cpan-df04353d9ac )