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

NAME

IPDevice::RouterBase::Interface

SYNOPSIS

 use IPDevice::RouterBase::Interface;
 my $interface = new IPDevice::RouterBase::Interface(name => '0/1/2');
 $interface->set_ip('192.168.0.1', '255.255.255.252');
 $interface->set_encapsulation('ppp');
 
 my($ip, $mask) = $interface->get_ip();

DESCRIPTION

This module provides routines for storing informations regarding an IP router interface. If you have a logical interface, use the IPDevice::RouterBase::LogicalInterface implementation instead.

CONSTRUCTOR AND METHODS

new([%args])

Object constructor. Valid arguments:

name: Store the interface name in the initial object.

set_encapsulation($encapsulation)

Save the interface encapsulation.

get_encapsulation()

Returns the interface encapsulation.

set_duplex($duplex)

Safe the interface duplex status. Valid values for $duplex are 'half' or 'full'. Any other value will be translated to 'unknown'.

get_duplex()

Returns the interface duplex status ('half', 'full', 'unknown' or undef).

set_dsubandwidth($dsubandwidth)

Safe the interface's configured dsu-bandwidth.

get_dsubandwidth()

Returns the interface's configured dsu-bandwidth.

set_crc($crc)

Safe the interface crc length. $crc must be an integer value.

get_crc()

Returns the interface crc length as an integer value.

unit()

Returns the IPDevice::RouterBase::LogicalInterface with the given number. If it does not exist yet, it will be created.

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.

Prints all data regarding the interface 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>