"Peder Chr. Norgaard" <pcn@tbit.dk> said:
Peder> I would like the agent to access different remote
Peder> targets, based on the community string in the SNMP requests
Peder> that are serviced.
Peder> So my question No 2: How do I access the community
Peder> string in the commands bound by "snmp bind". And how do I
Peder> associate different instance trees with different communities?
You can get the session handle that triggered the binding using the %S
substitution. So you can get the community string using
set c [%S cget -community]
in the binding. The second part of question #2 is a bit more
interesting, as the current implementation does not support different
instance trees for different agent sessions. This is very likely to
change in a future version, as I am integrating the safe Tcl extension
(stcl-0.1) and this requires to make sure that different agents in one
scotty process do not share a global ressource like the instance tree.
Juergen