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.
Object constructor. Valid arguments:
hostname: The initial router hostname.
Set the hostname.
Returns the hostname.
Defines the vendor.
Returns the vendor.
Defines the model name.
Returns the model name.
Defines the operating system name and version.
Returns the operating system name and version.
Defines the configuration version.
Returns the configuration version.
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.
Returns the IPDevice::RouterBase::ISIS instance. If that ISIS instance does not yet exist, a new one will be created/returned.
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.
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.
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>
To install IPDevice::IPv4, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IPDevice::IPv4
CPAN shell
perl -MCPAN -e shell install IPDevice::IPv4
For more information on module installation, please visit the detailed CPAN module installation guide.