Re: Retrieving table from external data (row identification?)
"Dave Shield" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
2008/7/3 Victor Palacio <[email protected]>: > > I'm trying to use table iterator from code skeleton generated with > mib2c.iterate.conf. > > When I use snmptable on the agent, get_first_data_point function is > executed every time one column is consulted, so I suppose I must load > data for consulted row in data context. > > The problem is... How can I identify which row (index) is consulted You don't - that's the job of the iterator helper. You provide the get_{first,next}_data_point functions, which walk through the table in whatever order is most convenient. The iterator helper will identify the row(s) which are required for the current request. It then calls your handler routine, passing the data structure for that row, as suppied via the 'data_context' parameter of the two get_{first,next} routines. Dave ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ 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