On 2 January 2013 18:59, Reza Salehi <[email protected]> wrote:
> The only problem I have is myTableHandler gets call multiple times while
> it is iterating during the GET or SET.
Can you be a bit more explicit about exactly what is happening?
For a single GET request, you should see:
- one call of the 'get_first' hook routine
- multiple calls of the 'get_next' hook routine
(as many times as there are rows in the table
- followed by one call of myTableHandler
For a single SET request, I believe you should see something
similar, except with four calls to the myTableHandler.
How does that compare with what you actually see?
(I suggest you try with a single "snmpget" command
rather than walking the whole table - as that should
give a clearer view of what is happening)
> Is there anyway to define a call back function during table registration to
> gets call once either before starting iteration the table or after
> finishing it?
If you mean before/after walking the whole table, then no.
The agent doesn't know that the table is being walked - it simply
receives a sequence of GetNext requests, which is processes
individually.
If you mean before/after the sequence of calls to the iterator
hooks that will run through the table, then that should be easy
('get_first' is called at the start, and the handler will be called
at the end).
But it's not clear to me exactly what you are trying to do here,
or what the underlying problem actually is.
Dave
------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users