NAME
IPDevice::RouterBase::Card
SYNOPSIS
use IPDevice::RouterBase::Card;
my $card = new IPDevice::RouterBase::Card;
$card->module(1)->interface(2)->set_encapsulation('ppp');
DESCRIPTION
This module provides routines for storing informations regarding an IP router card.
CONSTRUCTOR AND METHODS
new([%args])
Object constructor. Valid arguments:
name: Store the card name in the initial object.
set_number($number)
Defines the card number. When created via any class from the IPDevice::RouterBase namespace, this is automatically set.
get_number()
Returns the card number.
set_description($description)
Defines the card description.
get_description()
Returns the card description.
set_speed($speed)
Defines the card's interface speed.
get_speed()
Returns the card's speed.
set_memory_size($memorysize)
Defines the card's memory size.
get_memory_size()
Returns the card's memory size.
set_linememory_size($memorysize)
Defines the card's line-memory size.
get_linememory_size()
Returns the card's line-memory size.
set_serialnumber($serialumber)
Defines the card's serial number.
get_serialnumber()
Returns the card's serial number.
set_partnumber($partnumber)
Defines the card vendor's part number.
get_partnumber()
Returns the card vendor's part number.
set_type($type)
Defines the card type.
get_type()
Returns the card type.
set_processor($processor)
Defines the processor type.
get_processor()
Returns the processor type.
set_slave($speed)
Defines whether the card is slave.
get_slave()
Returns whether the card is slave.
set_slot_size($slotnumber, $size)
Defines the slot size of the slot with the given number.
get_slot_size($slotnumber)
Returns the slot size for the slot with the given number.
set_slot_content($slotnumber, $content)
Defines a string describing the slot content for the slot with the given number.
get_slot_content($slotnumber)
Returns a string describing the slot content for the slot with the given number.
set_bootimage($bootimage)
Defines the active boot image.
get_bootimage()
Returns the active boot image.
module($modulenumber)
Returns the module with the given number. If it doesn't exist, it will be created. If no module number is given, a virtual module will be returned. You can, for example, add interfaces that do not have a pysical module there.
interface($interfacenumber)
Returns the interface with the given number. If it doesn't exist, it will be created. Returns undef only on an error.
foreach_module($func, %data)
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, list evaluation will be stopped.
foreach_interface($func, %data)
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, list evaluation will be stopped.
foreach_unit($func, %data)
Walks through all IPDevice::RouterBase::LogicalInterface calling the function $func. Args passed to $func are:
$unit: 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 card to STDOUT (e.g. for debugging).
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>