Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages
Net::ACL::File(3) User Contributed Perl Documentation Net::ACL::File(3)

Net::ACL::File - Access-lists constructed from configuration file like syntax.

    use Net::ACL::File;
    Net::ACL::File->add_listtype('community-list', __PACKAGE__,'ip community-list');
    # Construction
    $config = "ip community-list 4 permit 65001:1\n";
    $list_hr = load Net::ACL::File($config);
    $list = renew Net::ACL(Type => 'community-list', Name => 4);
    $config = $list->asconfig;

This module extends the Net::ACL class with a load constructor that loads one or more objects from a Cisco-like configuration file using Cisco::Reconfig.

load() - Load one or more Net::ACL objects from a configuration string.
    $list_hr = load Net::ACL::File($config);
This special constructor parses a Cisco-like router configuration.
The constructor takes one argument which should either be a string or a Cisco::Reconfig object.
It returns a hash reference. The hash is indexed on list-types. Currently supporting the following:
Each list-type hash value contains a new hash reference indexed on list names or numbers.

The add_listtype() class method registers a new class of access-lists.
The first argument is the type-string of the new class. The second argument is the class to be registered. The class should be a sub-class of Net::BGP::File::Standard. Normally this should be "__PACKAGE__".
The third argument is used to match the lines in the configuration file using Cisco::Reconfig's get() method. If match argument is not defined, the type string will be used.
The forth argument is used to load the class with a "use" statement. This should only be needed if the class is located in a different package. Default is the class name from the second argument.

This function tries to generate a configuration matching the one the load constructer got. It can read from any access-list. The resulting configuration is returned as a string.
All ACL's which rules support the asconfig method may be used. To do so, use:
        $conf = Net::ACL::File->asconfig($acl);

Net::ACL, Cisco::Reconfig, Net::ACL::File::Standard

Martin Lorensen <>
2003-06-06 perl v5.28.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.