So far it has been quite successful, but I have come up with a few questions
and possible bugs (I do realise I am not running the latest scotty version
so apologies if fixed already).
a) successive mib load of the same mib, does not overwrite (only of relevance
if developing a mib).
b) snmp# configure does not report that a session is an agent session.
c) snmp# bind event label - by itself does not report bound command.
d) Is there a way to bind multiple agent sessions to one port?
For example I might want the traditional SNMPv1 agent with 2 communities
public and private operating off the same port. I would imagine this need
would be even greater with SNMPv2 (classic which I now understand is dead).
e) It took me a while (I looked at the source) to work out how octet strings
were to be represented - may be a bit of documentation on data representation
would be nice? (I realise there is only so much time for all this & would
prefer code).
f) May be I am completely misunderstanding how Tk event loops work, but I am
having major problems with tkwait variable which is executed as part of an
agents get binding. Maybe this is a Tk event loop problem.
The situation is that I have a pipe opened to a process. I send commands to the
process & proces the output. Because of the nature of the process, output
is not guaranteed. So I set up:
a) a fileevent handler on the file waiting for readable.
b) an after timeout handler.
Both these handlers set a global variable on execution.
My program having kicked off these handlers then does a tkwait variable
on the global variable. The idea being that either some output should
arrive or the timeout should happen.
However what does happen is that after a while of runing successfully, things
stop, or rather the tkwait seems to wait forever. An additional complication
that comes from the tkined side of things, is that code that interogates the
pipe is also run as an event handler. Could things get too deeply nested
or just forgotten?
There seems no way to find out what event handlers are active which would give
me a clearer picture of what is or is not happening.
I have got round this for the moment by ensuring the process operates
synchronously.
Thanks for any help with these problems and apologies if you have seen earlier
versions.
Peter Polkinghorne, Email: pjmp@gec-rl-hrc.co.uk
GEC Hirst Research Centre,
Elstree Way, Borehamwood, "World is crazier and more of it than we think,
Herts. WD6 1RX ENGLAND Incorrigibly plural" - Snow - Louis Macneice.