Class HostEntry
java.lang.Object
|
+----HostEntry
- public class HostEntry
- extends Object
This class implements the structure and code to deal with individual hosts.
- Version:
- $Revision: 1.19 $, $Date: 2000/10/31 20:32:03 $
- Author:
- Joseph Thomas
-
addrList
- list of addresses which represent this node
-
altDescr
- sysDescr string to be used if we're masking information
-
arp_ipaddrs
- one to one list with arpservers containing their IP address (if known)
-
arp_nsapaddrs
- one to one list with arpservers containing their NSAP address
-
arpservers
- list containing known ATMARPServers
-
bus_servers
- list containing known BUS servers (LANE)
-
communityName
- SNMP communityName which accesses this node
-
dc
- Pointer to parent DataCollector
-
descrTable
- one to one list with addrList with the names that describe each interface
-
endStatus
- flag indicating how far we got in this query cycle
-
intfs
- list of network interfaces on this node
-
ipForwarding
- flag indicating if this node supports ip forwarding (ie.
-
lecs_servers
- list containing known LECS servers (LANE)
-
les_servers
- list containing known LES servers (LANE)
-
net
- pointer to the ATMNetwork which this node is a member of
-
netmask
- list of netmasks with a one to one association to the addrList
-
nodeAddress
- address by which we refer to this node
-
nodeType
- this node's type
-
nsapAddrs
- list of NSAP addresses that are assigned to this node
-
snmp
- SNMP context used to send SNMP request to this node
-
switchesOnly
- Are we only looking at switches
-
sysDescr
- SNMP sysDescr returned by this node
-
time
- timestamp for when this node was last accessed
-
unique_host
- index for creating a unique IP address for nodes which
don't respond to ip.* mibs
-
vinfo
- pointer to VendorInfo instantiation
-
HostEntry(String)
- Class constructor.
-
HostEntry(String, String)
- Class constructor.
-
addARPServer(String, int)
- Add an arpserver address entry
-
addBUS(String)
- Add a bus_server entry
-
addLECS(String)
- Add a lecs_server entry
-
addLES(String)
- Add a les_server entry
-
addNSAPMap(String, String)
- Add an IP to NSAP mapping
-
findCommunityName(DataCollector, CollectorAnalyzer, int)
- Try to determine if any of the possible community name (passwords)
we know will work to access this host.
-
getAddress()
- Return the NodeAddress
-
getAltDescr()
- Return the altDescr value
Used when masking node addresses
-
getContext()
- Return the SNMP Context
-
getDescription()
- Return the sysDescr value
-
getnodeType()
- Return nodeType
-
getPassword()
- Return the community name
-
getSnmpContext()
- Return the SNMP context for this node
-
getTime()
- Returns the time this object was created.
-
query(DataCollector, CollectorAnalyzer, int)
- Perform all the work necessary to query this host.
-
queryInterfaces(DataCollector, CollectorAnalyzer, int)
- Determine the set of IP interfaces this host contains.
-
setnodeType(int)
- Set nodeType
-
toString()
- toString() method -- print something useful about this object.
nodeAddress
private NodeAddress nodeAddress
- address by which we refer to this node
communityName
private String communityName
- SNMP communityName which accesses this node
sysDescr
private String sysDescr
- SNMP sysDescr returned by this node
altDescr
private String altDescr
- sysDescr string to be used if we're masking information
ipForwarding
private int ipForwarding
- flag indicating if this node supports ip forwarding (ie. its a gateway)
vinfo
private VendorInfo vinfo
- pointer to VendorInfo instantiation
intfs
private Vector intfs
- list of network interfaces on this node
nsapAddrs
private Vector nsapAddrs
- list of NSAP addresses that are assigned to this node
nodeType
private int nodeType
- this node's type
- See Also:
- ATMNode
endStatus
private int endStatus
- flag indicating how far we got in this query cycle
time
private long time
- timestamp for when this node was last accessed
net
private ATMNetwork net
- pointer to the ATMNetwork which this node is a member of
snmp
private SnmpContext snmp
- SNMP context used to send SNMP request to this node
addrList
private Vector addrList
- list of addresses which represent this node
netmask
private Vector netmask
- list of netmasks with a one to one association to the addrList
descrTable
private Vector descrTable
- one to one list with addrList with the names that describe each interface
arpservers
private static Vector arpservers
- list containing known ATMARPServers
arp_ipaddrs
private static Vector arp_ipaddrs
- one to one list with arpservers containing their IP address (if known)
arp_nsapaddrs
private static Vector arp_nsapaddrs
- one to one list with arpservers containing their NSAP address
bus_servers
private static Vector bus_servers
- list containing known BUS servers (LANE)
lecs_servers
private static Vector lecs_servers
- list containing known LECS servers (LANE)
les_servers
private static Vector les_servers
- list containing known LES servers (LANE)
unique_host
private static int unique_host
- index for creating a unique IP address for nodes which
don't respond to ip.* mibs
switchesOnly
private boolean switchesOnly
- Are we only looking at switches
dc
private DataCollector dc
- Pointer to parent DataCollector
HostEntry
public HostEntry(String host,
String password)
- Class constructor.
- Parameters:
- host - String name of this host
- password - SNMP community string of this host
HostEntry
public HostEntry(String host)
- Class constructor.
- Parameters:
- host - String name of this host
query
public void query(DataCollector dc,
CollectorAnalyzer ca,
int threadNum)
- Perform all the work necessary to query this host.
- Parameters:
- dc - pointer to parent DataCollector object.
- ca - pointer to parent CollectorAnalyzer object.
- Throws: InterruptedException
- Thrown by findCommunityName()
findCommunityName
private void findCommunityName(DataCollector dc,
CollectorAnalyzer ca,
int threadNum)
- Try to determine if any of the possible community name (passwords)
we know will work to access this host.
- Parameters:
- dc - pointer to parent DataCollector object.
- ca - pointer to parent CollectorAnalyzer object.
- threadNum - an index which identifies which thread called us
- Throws: InterruptedException
- Will eventually be thrown by SNMP
queryInterfaces
public void queryInterfaces(DataCollector dc,
CollectorAnalyzer ca,
int threadNum)
- Determine the set of IP interfaces this host contains.
- Parameters:
- dc - DataCollector for this run
- ca - CollectorAnalyzer for this run
- threadNum - an index to which thread called us
- Throws: Exception
- Will eventually be thrown by SNMP code
getDescription
public String getDescription()
- Return the sysDescr value
- Returns:
- the sysDescr.0 value for this node
getAltDescr
public String getAltDescr()
- Return the altDescr value
Used when masking node addresses
- Returns:
- the altDescr value for this node
getPassword
public String getPassword()
- Return the community name
- Returns:
- the community name which accesses this node
getContext
public SnmpContext getContext()
- Return the SNMP Context
- Returns:
- the SNMP context for this node
getAddress
public NodeAddress getAddress()
- Return the NodeAddress
- Returns:
- the nodeAddress for this node
getnodeType
public int getnodeType()
- Return nodeType
- Returns:
- the nodeType for this node
setnodeType
public void setnodeType(int type)
- Set nodeType
- Parameters:
- type - New node type
addARPServer
public void addARPServer(String addr,
int idx)
- Add an arpserver address entry
- Parameters:
- addr - NSAP address of an ATMARPServer this node
knows about
- idx - The interface index which this NSAP is
server for
addNSAPMap
public void addNSAPMap(String ipaddr,
String nsap)
- Add an IP to NSAP mapping
- Parameters:
- ipaddr - The IP address we know
- nsap - The NSAP address associated with the IP
addBUS
public void addBUS(String bus)
- Add a bus_server entry
- Parameters:
- bus - The NSAP address which is a BUS
addLECS
public void addLECS(String lecs)
- Add a lecs_server entry
- Parameters:
- lecs - The NSAP address which is a LECS
addLES
public void addLES(String les)
- Add a les_server entry
- Parameters:
- les - The NSAP address which is a LES
getTime
public long getTime()
- Returns the time this object was created.
- Returns:
- the time (in milliseconds) when the data was created.
getSnmpContext
public SnmpContext getSnmpContext()
- Return the SNMP context for this node
- Returns:
- the SNMP context for this node
toString
public String toString()
- toString() method -- print something useful about this object.
- Overrides:
- toString in class Object