Re: who's calling *Table_get_first[next]_data_point()?

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On Thu, 2006-02-02 at 16:59 -0800, Li Juen Hwang wrote:

>    I thought *Table_get_first[next]_data_point() are called only
> during initialization of tables.

No.  Whatever gave you that idea?

The Table_get_{first,next}_data_point routines will be called
for *every* individual SNMP request.  Their purpose is to help
the main iterator helper decide which row is required for that
request.

If you invoke a "one-shot" command (such as snmpget, snmpgetnext
or snmpset), then the 'get_first' routine will be called once
(and 'get_next' will be called as many times as you have rows
in the table).

If you invoke a "multiple-request" command (such as snmpwalk or
snmptable), then 'get_first' will be called once for each request
                                                 ^^^^^^^^^^^^^^^^
(and similarly for the 'get_next' loop).



>    However, when i ran "snmptable -v 2c -c private localhost  table1", i 
> found
>    table1_get_first[next]_data_point() were called repeatedly after 
> table1_handler() finished each column *and* every element of the table.

Your terminology is a little confusing, but that's essentially correct,
yes.  See above.


>    Not only that, after *Table_handler() finished table1, the agent (or 
> snmptable?) kept calling *_get_first_data_point() for table2.

"Kept"?
I would certainly expect snmptable to invoke one more request than
is strictly necessary.  It doesn't actually know when the last row
of the table has been returned, and only realises this was the last
row when it asks for the next one.



>    My biggest question is how to implement the functions generated
> by mib2c with mib2c.iterate_access.conf?

Which functions?   The get_{first,next} hooks, or something else?
How is the data for your table represented?

Dave


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.