SNMP-Info

 view release on metacpan or  search on metacpan

lib/SNMP/Info/Layer2/Baystack.pm  view on Meta::CPAN


    my $i_index      = $baystack->i_index($partial) || {};
    my $index_factor = $baystack->index_factor();
    my $slot_offset  = $baystack->slot_offset();

    my %if;
    foreach my $iid ( keys %$i_index ) {
        my $index = $i_index->{$iid};
        next unless defined $index;

        # Ignore cascade ports
        next if $index > $index_factor * 8;

        my $port = ( $index % $index_factor );
        my $slot = ( int( $index / $index_factor ) ) + $slot_offset;

        my $slotport = "$slot.$port";
        $if{$iid} = $slotport;
    }
    return \%if;
}



( run in 1.057 second using v1.01-cache-2.11-cpan-49f99fa48dc )