Interface - Provides information regarding an interface (standard or logical)
use DBI; use Interface;
my $dbh = DBI->connect(...); my $subinterface = new Interface( id=>$interfaceID, dbHandle=>$dbh );
or
my $subinterface = new Interface( machine=>$machineID, name=>$ifDescr, alias=>$alias, speed=>$speed, ifIndex=>$ifIndex, IPaddress=>$ipAddress
$subinterface->SNMP( oid=>'ifInOctets' );
$subinterface->SNMP( oid=>'ifInOctets', timestamp=>1 );
print $subinterface->machine
print $subinterface->name
print $subinterface->alias
print $subinterface->description
print $subinterface->speed
print $subinterface->ifIndex
print $subinterface->IPaddress
print $subinterface->isLoopback
print $subinterface->hasConnector
print $subinterface->isSubinterface
Interface provides easy access to the interface data. This is a child class of Node.
new() - create or load a new interface
id - interface ID dbHandle - database handle
machine - machine that owns this interface name - common name for this interface alias - description regarding the connection of this interface description - netmon-administrator-defined description (not available on interface) speed - maximum speed for this interface ifIndex - snmp interface index (ifIndex) IPaddress - I.P. address assigned loopback - determine whether this is a loopback interface or not connector - determine whether this has a connector or not (it is a sub-interface if it doesn't have)
SNMP() - get latest SNMP data oid - short name for the MIB object ID's timestamp - determine whether the timestamp is request or not
id() - returns the interface id
name() - returns the interface name
description() - returns interface description
machine() - returns the machine id in which this interface belongs
alias() - returns the interface alias
speed() - returns the connection speed
ifIndex() - returns the interface number with respect to the router
IPaddress() - returns the IP address of the interface
isLoopback() - returns whether this interface is a loopback
hasConnector() - returns whether this interface has a physical connector or not
isSubinterface() - returns whether this interface is a subinterface, is the opposite of hasConnector()
Interface is supported as part of the core Pawikan distribution. Please send bug report to <netapps@pregi.net> or use the bugzilla.
Edwin Viñas <edwinv@asti.dost.gov.ph>
Jerremeo Raynier Gabás <ren@asti.dost.gov.ph>
René Mendoza <renem@asti.dost.gov.ph>
Rey Vincent Babilonia <rvincent@asti.dost.gov.ph>
Paul Afroilan <paula@asti.dost.gov.ph>
Copyright (c) 2004 Philippine Research, Education and Government Information Network. All rights reserved. This program is part of the Pawikan distribution; you can redistribute it and/or modify it under the same terms as Pawikan itself.