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

Variable Index

 o addrList
list of addresses which represent this node
 o altDescr
sysDescr string to be used if we're masking information
 o arp_ipaddrs
one to one list with arpservers containing their IP address (if known)
 o arp_nsapaddrs
one to one list with arpservers containing their NSAP address
 o arpservers
list containing known ATMARPServers
 o bus_servers
list containing known BUS servers (LANE)
 o communityName
SNMP communityName which accesses this node
 o dc
Pointer to parent DataCollector
 o descrTable
one to one list with addrList with the names that describe each interface
 o endStatus
flag indicating how far we got in this query cycle
 o intfs
list of network interfaces on this node
 o ipForwarding
flag indicating if this node supports ip forwarding (ie.
 o lecs_servers
list containing known LECS servers (LANE)
 o les_servers
list containing known LES servers (LANE)
 o net
pointer to the ATMNetwork which this node is a member of
 o netmask
list of netmasks with a one to one association to the addrList
 o nodeAddress
address by which we refer to this node
 o nodeType
this node's type
 o nsapAddrs
list of NSAP addresses that are assigned to this node
 o snmp
SNMP context used to send SNMP request to this node
 o switchesOnly
Are we only looking at switches
 o sysDescr
SNMP sysDescr returned by this node
 o time
timestamp for when this node was last accessed
 o unique_host
index for creating a unique IP address for nodes which don't respond to ip.* mibs
 o vinfo
pointer to VendorInfo instantiation

Constructor Index

 o HostEntry(String)
Class constructor.
 o HostEntry(String, String)
Class constructor.

Method Index

 o addARPServer(String, int)
Add an arpserver address entry
 o addBUS(String)
Add a bus_server entry
 o addLECS(String)
Add a lecs_server entry
 o addLES(String)
Add a les_server entry
 o addNSAPMap(String, String)
Add an IP to NSAP mapping
 o findCommunityName(DataCollector, CollectorAnalyzer, int)
Try to determine if any of the possible community name (passwords) we know will work to access this host.
 o getAddress()
Return the NodeAddress
 o getAltDescr()
Return the altDescr value Used when masking node addresses
 o getContext()
Return the SNMP Context
 o getDescription()
Return the sysDescr value
 o getnodeType()
Return nodeType
 o getPassword()
Return the community name
 o getSnmpContext()
Return the SNMP context for this node
 o getTime()
Returns the time this object was created.
 o query(DataCollector, CollectorAnalyzer, int)
Perform all the work necessary to query this host.
 o queryInterfaces(DataCollector, CollectorAnalyzer, int)
Determine the set of IP interfaces this host contains.
 o setnodeType(int)
Set nodeType
 o toString()
toString() method -- print something useful about this object.

Variables

 o nodeAddress
 private NodeAddress nodeAddress
address by which we refer to this node

 o communityName
 private String communityName
SNMP communityName which accesses this node

 o sysDescr
 private String sysDescr
SNMP sysDescr returned by this node

 o altDescr
 private String altDescr
sysDescr string to be used if we're masking information

 o ipForwarding
 private int ipForwarding
flag indicating if this node supports ip forwarding (ie. its a gateway)

 o vinfo
 private VendorInfo vinfo
pointer to VendorInfo instantiation

 o intfs
 private Vector intfs
list of network interfaces on this node

 o nsapAddrs
 private Vector nsapAddrs
list of NSAP addresses that are assigned to this node

 o nodeType
 private int nodeType
this node's type

See Also:
ATMNode
 o endStatus
 private int endStatus
flag indicating how far we got in this query cycle

 o time
 private long time
timestamp for when this node was last accessed

 o net
 private ATMNetwork net
pointer to the ATMNetwork which this node is a member of

 o snmp
 private SnmpContext snmp
SNMP context used to send SNMP request to this node

 o addrList
 private Vector addrList
list of addresses which represent this node

 o netmask
 private Vector netmask
list of netmasks with a one to one association to the addrList

 o descrTable
 private Vector descrTable
one to one list with addrList with the names that describe each interface

 o arpservers
 private static Vector arpservers
list containing known ATMARPServers

 o arp_ipaddrs
 private static Vector arp_ipaddrs
one to one list with arpservers containing their IP address (if known)

 o arp_nsapaddrs
 private static Vector arp_nsapaddrs
one to one list with arpservers containing their NSAP address

 o bus_servers
 private static Vector bus_servers
list containing known BUS servers (LANE)

 o lecs_servers
 private static Vector lecs_servers
list containing known LECS servers (LANE)

 o les_servers
 private static Vector les_servers
list containing known LES servers (LANE)

 o unique_host
 private static int unique_host
index for creating a unique IP address for nodes which don't respond to ip.* mibs

 o switchesOnly
 private boolean switchesOnly
Are we only looking at switches

 o dc
 private DataCollector dc
Pointer to parent DataCollector

Constructors

 o HostEntry
 public HostEntry(String host,
                  String password)
Class constructor.

Parameters:
host - String name of this host
password - SNMP community string of this host
 o HostEntry
 public HostEntry(String host)
Class constructor.

Parameters:
host - String name of this host

Methods

 o 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()
 o 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
 o 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
 o getDescription
 public String getDescription()
Return the sysDescr value

Returns:
the sysDescr.0 value for this node
 o getAltDescr
 public String getAltDescr()
Return the altDescr value Used when masking node addresses

Returns:
the altDescr value for this node
 o getPassword
 public String getPassword()
Return the community name

Returns:
the community name which accesses this node
 o getContext
 public SnmpContext getContext()
Return the SNMP Context

Returns:
the SNMP context for this node
 o getAddress
 public NodeAddress getAddress()
Return the NodeAddress

Returns:
the nodeAddress for this node
 o getnodeType
 public int getnodeType()
Return nodeType

Returns:
the nodeType for this node
 o setnodeType
 public void setnodeType(int type)
Set nodeType

Parameters:
type - New node type
 o 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
 o 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
 o addBUS
 public void addBUS(String bus)
Add a bus_server entry

Parameters:
bus - The NSAP address which is a BUS
 o addLECS
 public void addLECS(String lecs)
Add a lecs_server entry

Parameters:
lecs - The NSAP address which is a LECS
 o addLES
 public void addLES(String les)
Add a les_server entry

Parameters:
les - The NSAP address which is a LES
 o getTime
 public long getTime()
Returns the time this object was created.

Returns:
the time (in milliseconds) when the data was created.
 o getSnmpContext
 public SnmpContext getSnmpContext()
Return the SNMP context for this node

Returns:
the SNMP context for this node
 o toString
 public String toString()
toString() method -- print something useful about this object.

Overrides:
toString in class Object