|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.snmp.CollectionTracker
org.opennms.netmgt.snmp.AggregateTracker
org.opennms.netmgt.capsd.snmp.SnmpTable
org.opennms.netmgt.capsd.snmp.IpAddrTable
public class IpAddrTable
IpAddrTable uses a SnmpSession to collect the ipAddrTable entries It implements the SnmpHandler to receive notifications when a reply is received/error occurs in the SnmpSession used to send requests /recieve replies.
| Field Summary |
|---|
| Fields inherited from class org.opennms.netmgt.snmp.CollectionTracker |
|---|
GEN_ERR, NO_ERR, NO_SUCH_NAME_ERR, TOO_BIG_ERR |
| Constructor Summary | |
|---|---|
IpAddrTable(java.net.InetAddress address)
Constructs an IpAddrTable object that is used to collect the address 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)
|
java.net.InetAddress[] |
getIfAddressAndMask(int ifIndex)
|
int |
getIfIndex(java.net.InetAddress address)
|
static int |
getIfIndex(java.util.List ipAddrEntries,
java.lang.String ipAddress)
This method is used to find the ifIndex of an interface given the interface's IP address. |
static java.net.InetAddress |
getIpAddress(java.util.List ipAddrEntries,
int ifIndex)
This method is used to find the corresponding IP Address for the indexed interface. |
static java.util.List |
getIpAddresses(java.util.List ipAddrEntries)
Returns all Internet addresses in the ipAddrEntry list. |
static java.util.List |
getIpAddresses(java.util.List ipAddrEntries,
int ifIndex)
Returns all Internet addresses at the corresponding index. |
static java.lang.String |
getNetmask(java.util.List ipAddrEntries,
int ifIndex)
This method is used to find the corresponding netmask for the indexed interface. |
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, setMaxRepititions, 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 |
|---|
public IpAddrTable(java.net.InetAddress address)
Constructs an IpAddrTable object that is used to collect the address elements from the remote agent. Once all the elements are collected, or there is an error in the collection the signaler object is notified to inform other threads.
address - TODOIpAddrTableEntry| Method Detail |
|---|
protected SnmpTableEntry createTableEntry(org.opennms.netmgt.snmp.SnmpObjId base,
org.opennms.netmgt.snmp.SnmpInstId inst,
java.lang.Object val)
createTableEntry in class SnmpTable
public static java.net.InetAddress getIpAddress(java.util.List ipAddrEntries,
int ifIndex)
This method is used to find the corresponding IP Address for the indexed interface. The list of IP Address entries are searched until the first IP Address is found for the interface. The IP Address is then returned as a string. If there is no interface corresponding to the index then a null is returned to the caller.
ipAddrEntries - List of IpAddrTableEntry objects to searchifIndex - The interface index to search for
public static java.util.List getIpAddresses(java.util.List ipAddrEntries,
int ifIndex)
ipAddrEntries - List of IpAddrTableEntry objects to searchifIndex - The index to search for.
public static java.util.List getIpAddresses(java.util.List ipAddrEntries)
ipAddrEntries - List of IpAddrTableEntry objects to search
public static int getIfIndex(java.util.List ipAddrEntries,
java.lang.String ipAddress)
This method is used to find the ifIndex of an interface given the interface's IP address. The list of ipAddrTable entries are searched until an interface is found which has a matching IP address. The ifIndex of that interface is then returned. If no match is found -1 is returned.
ipAddrEntries - List of IpAddrTableEntry objects to searchipAddress - The IP address to search for
public static java.lang.String getNetmask(java.util.List ipAddrEntries,
int ifIndex)
This method is used to find the corresponding netmask for the indexed interface. The list of IP Address table entries are searched until the first netmask address is found for the interface. The netmask is then returned as a string. If there is no interface corresponding to the index then a null is returned.
ipAddrEntries - List of IpAddrTableEntry objects to searchifIndex - The interface index to search for.
public java.net.InetAddress[] getIfAddressAndMask(int ifIndex)
public int getIfIndex(java.net.InetAddress address)
protected final org.apache.log4j.Category log()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||