Perhaps this is due to the fact that everytime a scotty shell is
executed (as is the case with ip_discovery.tcl) it maintains a local
copy of the global variables, such as:
global ids nodes address name
that are used to maintain the discovered map info. If you save the
map, then run tkined later, for example, the vars have been lost and a
new (empty) copies created, this means the existing nodes (the ones
previously saved) are not known to the ip_discovery.tcl globals
above.
what could be done when ip_discovery.tcl is first loaded, it could
call a routine that reads everything in the existing map and recreate
the necessarry global vars, that will be used by subsequent
invocations of ip_discovery. Following is an _EXAMPLE_ of how this
could be done (i do a similar thing with the scripts i wrote).
WARNING, this code is not gaurenteed to work as is but should convey
the idea i hope :).
proc SyncMap {} {
global ids networks address name
catch {
unset ids
unset networks
unset address
unset name
}
foreach comp [ined retrieve] {
set type [ined type $comp]
if {[lsearch "NODE GROUP STRIPCHART BARCHART LINK NETWORK" $type] >= 0} {
set id [ined id $comp]
set name [ined name $comp]
set ip [lindex [ined address $comp] 0]
}
switch $type {
NODE {
if {[catch {dns ptr $ip} ns_name]} {
if {[catch {nslook $ip} ns_name]} {
set ns_name $ip
}
}
set ids($ip) $id
set nodes($id)
set address($id) $ip
set name($id) $ns_name
}
}
}
}
>
> Also what is a canvas?
>
A tk object. It's the main area of tkined that all the nodes, links
etc. get drawn on (the scrollable area).
--- rusty
eddy@isi.edu