org.opennms.netmgt.capsd.snmp
Class IfTable

java.lang.Object
  extended by org.opennms.netmgt.snmp.CollectionTracker
      extended by org.opennms.netmgt.snmp.AggregateTracker
          extended by org.opennms.netmgt.capsd.snmp.SnmpTable
              extended by org.opennms.netmgt.capsd.snmp.IfTable
All Implemented Interfaces:
org.opennms.netmgt.snmp.Collectable

public final class IfTable
extends SnmpTable

The IfTable uses a SnmpSession to collect the entries in the remote agent's interface table. It implements the SnmpHandler to receive notifications and handle errors associated with the data collection. Data is collected using a series of GETNEXT PDU request to walk multiple parts of the interface table at once. The number of SNMP packets should not exceed the number of interface + 1, assuming no lost packets or error conditions occur.

Addition by Jon Whetzel

IfTable has an extra class variable for the SNMP version setting. If this is set for SNMPv2, then a GETBULK command will be used for retrieving the necessary data. Otherwise, the method will resort to its previous implementation with GETNEXT commands.

Author:
Sowmya , Weave , OpenNMS
See Also:
RFC1213

Field Summary
 
Fields inherited from class org.opennms.netmgt.snmp.CollectionTracker
GEN_ERR, NO_ERR, NO_SUCH_NAME_ERR, TOO_BIG_ERR
 
Constructor Summary
IfTable(java.net.InetAddress address)
           Constructs an IfTable object that is used to collect the interface elements from the remote agent.
 
Method Summary
protected  SnmpTableEntry createTableEntry(org.opennms.netmgt.snmp.SnmpObjId base, org.opennms.netmgt.snmp.SnmpInstId inst, java.lang.Object val)
           
 int getAdminStatus(int ifIndex)
           
 java.lang.String getIfDescr(int ifIndex)
           
 java.lang.Long getIfSpeed(int ifIndex)
           
 int getIfType(int ifIndex)
           
 int getOperStatus(int ifIndex)
           
 java.lang.String getPhysAddr(int ifIndex)
           
protected  org.apache.log4j.Category log()
           
 
Methods inherited from class org.opennms.netmgt.capsd.snmp.SnmpTable
getEntries, reportGenErr, reportNoSuchNameErr, storeResult
 
Methods inherited from class org.opennms.netmgt.snmp.AggregateTracker
buildNextPdu, isFinished, setFailed, setTimedOut
 
Methods inherited from class org.opennms.netmgt.snmp.CollectionTracker
failed, getCollectionTracker, getParent, reportTooBigErr, setParent, timedOut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IfTable

public IfTable(java.net.InetAddress address)

Constructs an IfTable object that is used to collect the interface elements from the remote agent. Once all the interfaces are collected, or there is an error in the collection the signaler object is notified to inform other threads.

Parameters:
address - TODO
See Also:
IfTableEntry
Method Detail

createTableEntry

protected SnmpTableEntry createTableEntry(org.opennms.netmgt.snmp.SnmpObjId base,
                                          org.opennms.netmgt.snmp.SnmpInstId inst,
                                          java.lang.Object val)
Specified by:
createTableEntry in class SnmpTable

log

protected final org.apache.log4j.Category log()

getOperStatus

public int getOperStatus(int ifIndex)

getAdminStatus

public int getAdminStatus(int ifIndex)

getIfType

public int getIfType(int ifIndex)

getIfDescr

public java.lang.String getIfDescr(int ifIndex)

getIfSpeed

public java.lang.Long getIfSpeed(int ifIndex)

getPhysAddr

public java.lang.String getPhysAddr(int ifIndex)


Copyright © 2007. All Rights Reserved.