The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

IPDevice::RouterBase::Prefixlist

SYNOPSIS

 use IPDevice::RouterBase::Prefixlist;
 my $pfxlist = new IPDevice::RouterBase::Prefixlist;
 $pfxlist->set_name('Prefixlist Name');
 $pfxlist->add_prefix('permit', '192.168.0.0/22', '20', '24');

DESCRIPTION

This module provides routines for storing informations regarding an IP prefix list.

CONSTRUCTOR AND METHODS

new([%args])

Object constructor. Valid arguments:

name: The prefixlist name.

set_name($name)

Set the prefixlist name.

get_name()

Returns the prefixlist name.

set_description($description)

Defines the card description.

get_description()

Returns the card description.

add_prefix($seq, $permitdeny, $prefix, $lessequal, $greaterequal)

Checks & adds the given IP prefix to the list. If the sequence number is not specified, the last sequence number + 5 will be used. Returns TRUE on success, otherwise FALSE.

get_prefix($prefix)

Returns the IPDevice::RouterBase::PrefixlistEntry object.

foreach_prefix($func, %data)

Walks through all prefixlist entries calling the function $func. Args passed to $func are:

$prefix: The IPDevice::RouterBase::PrefixlistEntry. %data: The given data, just piped through.

If $func returns FALSE, list evaluation will be stopped.

COPYRIGHT

Copyright (c) 2004 Samuel Abels. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Samuel Abels <spam debain org>