Hi Dave,

Thanks for the quick response.
Does this mean that if the manager send a getnext request with index 10 it will 
call the get_first_data_point and than in the worst case 9 times 
get_next_data_point.
If that is the case, is there a more efficient way that will retrieve the next 
row in one iteration?

Thank you.


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf 
Of Dave Shield
Sent: Tuesday, March 22, 2011 12:52 PM
To: Naama Bar Menachem
Cc: Net-SNMP users
Subject: Re: Ordered table kept outside the agent

On 22 March 2011 10:43, Naama Bar Menachem
<[email protected]> wrote:
> I have table events ordered by the time they occurred.
>
> GetNextEvent(utc) will return the next event occurred after the given utc.
> I thought about using the iterator helper with NETSNMP_ITERATOR_FLAG_SORTED 
> set.

Yes - that should work.
It's still not particularly efficient, but it would work


> I’m trying to find how implement  get_first_dat_point
> and get_next_data_point to call my GetNextEventFunction.

get_first_data_point  should retrieve the first entry in the table
(?  GetNextEvent(NULL) ? )
and return this 'utc' pointer as both data_context and loop_context.

get_next_data_point should take the loop_context parameter,
and pass this to GetNextEvent,  to retrieve the next entry in the
table.

This essentially replaces the linked list in the example template
output.

   The only other thing to do is set the index value(s) from the
entry returned by GetNextEvent

Dave

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
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

Reply via email to