|
/Users/cpanrun/depot/main/contrib-patched/perl/CPAN/src/IPDevice/blib/lib/IPDevice/RouterBase.pm |
new([%args])set_hostname($hostname)get_hostname()set_vendor($vendor)get_vendor()set_model($model)get_model()set_os($os)get_os()set_cfgversion($version)get_cfgversion()card($cardnumber)isis()bgp($localas)prefixlist($name)print_data()
IPDevice::RouterBase
use IPDevice::RouterBase;
my $router = new IPDevice::RouterBase;
$router->set_hostname('hostname');
my $card = $router->card(0);
$card->module(1);
This module provides a base class, providing routines for storing informations regarding an IP router.
new([%args])Object constructor. Valid arguments:
hostname: The initial router hostname.
set_hostname($hostname)Set the hostname.
get_hostname()Returns the hostname.
set_vendor($vendor)Defines the vendor.
get_vendor()Returns the vendor.
set_model($model)Defines the model name.
get_model()Returns the model name.
set_os($os)Defines the operating system name and version.
get_os()Returns the operating system name and version.
set_cfgversion($version)Defines the configuration version.
get_cfgversion()Returns the configuration version.
card($cardnumber)Returns the IPDevice::RouterBase::Card with the given number. If it does not exist, it will be created. If no card number is given, a virtual card will be returned anyway. You can, for example, add modules/interfaces that do not have a pysical card there.
isis()Returns the IPDevice::RouterBase::ISIS instance. If that ISIS instance does not yet exist, a new one will be created/returned.
bgp($localas)Returns the IPDevice::RouterBase::BGP instance with the given local as number. If that BGP instance does not yet exist, a new one will be created/returned.
prefixlist($name)Returns the IPDevice::RouterBase::Prefixlist with the given name. If the IPDevice::RouterBase::Prefixlist does not exist yet, it will be created and returned.
Add a new static route to the router. Returns the newly created IPDevice::RouterBase::StaticRoute.
Returns the IPDevice::RouterBase::StaticRoute with the given ip and mask.
Returns the IPDevice::RouterBase::IPHost with the given hostname/port. If it does not exist yet, a new one will be created.
Walks through all hostname <-> IP mappings calling the function $func. Args passed to $func are:
$card: The IPDevice::RouterBase::IPHost. %data: The given data, just piped through.
If $func returns FALSE, the hostname <-> IP mapping list evaluation will be stopped.
Walks through all BGP instances calling the function $func. Args passed to $func are:
$card: The IPDevice::RouterBase::BGP. %data: The given data, just piped through.
If $func returns FALSE, the BGP instance list evaluation will be stopped.
Walks through all prefixlists calling the function $func. Args passed to $func are:
$pfxlist: The IPDevice::RouterBase::Prefixlist. %data: The given data, just piped through.
If $func returns FALSE, the list evaluation will be stopped.
Walks through all cards calling the function $func. Args passed to $func are:
$card: The IPDevice::RouterBase::Card. %data: The given data, just piped through.
If $func returns FALSE, the card list evaluation will be stopped.
Walks through all modules calling the function $func. Args passed to $func are:
$module: The IPDevice::RouterBase::Module. %data: The given data, just piped through.
If $func returns FALSE, the module list evaluation will be stopped.
Walks through all interfaces calling the function $func. Args passed to $func are:
$interface: The IPDevice::RouterBase::Interface. %data: The given data, just piped through.
If $func returns FALSE, the interface list evaluation will be stopped.
Walks through all IPDevice::RouterBase::LogicalInterface calling the function $func. Args passed to $func are:
$interface: The IPDevice::RouterBase::LogicalInterface. %data: The given data, just piped through.
If $func returns FALSE, list evaluation will be stopped.
print_data()Prints all data regarding the router to STDOUT (e.g. for debugging).
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.
Samuel Abels <spam debain org>
|
/Users/cpanrun/depot/main/contrib-patched/perl/CPAN/src/IPDevice/blib/lib/IPDevice/RouterBase.pm |