Peter J M Polkinghorne <Peter.Polkinghorne@gec-hrc.co.uk> said:
Peter> So far it has been quite successful, but I have come up with a
Peter> few questions and possible bugs (I do realise I am not running
Peter> the latest scotty version so apologies if fixed already).
First of all thanks for your input. You kept me busy for a while. :-)
Peter> a) successive mib load of the same mib, does not overwrite
Peter> (only of relevance if developing a mib).
This is true but I won't change this. The reason is that I would need
to make the structures more complex to do this efficient. For example,
all objects that use a common textual convention have a pointer to the
structure that describes the textual convention. Allowing to re-load a
MIB definition would require to update all these pointers. Doing this
is either slow or costs some more pointers. So I thinks its not worth
the effort.
Peter> b) snmp# configure does not report that a session is an agent
Peter> session.
Fixed in my sources.
Peter> c) snmp# bind event label - by itself does not report bound
Peter> command.
Fixed in my sources.
Peter> d) Is there a way to bind multiple agent sessions to one port?
Peter> For example I might want the traditional SNMPv1 agent with 2
Peter> communities public and private operating off the same port. I
Peter> would imagine this need would be even greater with SNMPv2
Peter> (classic which I now understand is dead).
Fixed in my sources. (Well, it works but you can still create some
strange configurations - details left as an exercise. :-)
Peter> e) It took me a while (I looked at the source) to work out how
Peter> octet strings were to be represented - may be a bit of
Peter> documentation on data representation would be nice? (I realise
Peter> there is only so much time for all this & would prefer code).
I added some words to the man page. You are also invited to send me
corrections of additions to the man page (even spelling corrections
etc. are very welcome).
Peter> f) May be I am completely misunderstanding how Tk event loops
Peter> work, but I am having major problems with tkwait variable
Peter> which is executed as part of an agents get binding. Maybe this
Peter> is a Tk event loop problem.
Peter> The situation is that I have a pipe opened to a process. I
Peter> send commands to the process & proces the output. Because of
Peter> the nature of the process, output is not guaranteed. So I set
Peter> up:
Peter> a) a fileevent handler on the file waiting for readable.
Peter> b) an after timeout handler.
Peter> Both these handlers set a global variable on execution.
Peter> My program having kicked off these handlers then does a tkwait
Peter> variable on the global variable. The idea being that either
Peter> some output should arrive or the timeout should happen.
Peter> However what does happen is that after a while of runing
Peter> successfully, things stop, or rather the tkwait seems to wait
Peter> forever. An additional complication that comes from the
Peter> tkined side of things, is that code that interogates the pipe
Peter> is also run as an event handler. Could things get too deeply
Peter> nested or just forgotten?
If there is a problem, I consider it a Tk problem. :-) Note, the
Tk4.1a1 event loop is definitely broken (but I assume you are using
Tk4.0). Perhaps you may want to try Tk4.1a2, which has a rewritten
event loop. If your system has strace(1) or something similar, try to
attach to the process to see what it does. Some Tk versions did a
select(0, NULL, NULL, NULL, NULL), but I thought we got it fixed...
Peter> There seems no way to find out what event handlers are active
Peter> which would give me a clearer picture of what is or is not
Peter> happening.
Right.
Juergen