IPDevice::RouterBase::Interface
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();
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.
Object constructor. Valid arguments:
name: Store the interface name in the initial object.
Save the interface encapsulation.
Returns the interface encapsulation.
Safe the interface duplex status. Valid values for $duplex are 'half' or 'full'. Any other value will be translated to 'unknown'.
Returns the interface duplex status ('half', 'full', 'unknown' or undef).
Safe the interface's configured dsu-bandwidth.
Returns the interface's configured dsu-bandwidth.
Safe the interface crc length. $crc must be an integer value.
Returns the interface crc length as an integer value.
Returns the IPDevice::RouterBase::LogicalInterface with the given number. If it does not exist yet, it will be created.
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 (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.