Thanks a lot for the reply. But I have a doubt : how to generate
template code for  this "basic table helper", if not using mib2c ?
What is the command to generate this code framework for my mibnode ?

-rupa.

On 5/12/08, Magnus Fromreide <[EMAIL PROTECTED]> wrote:
> On mån, 2008-05-12 at 09:36 +0530, Rupa P V wrote:
>> I am trying to find the correct mib2c conf file for implemeting the
>> low level snmp routines for my database. These are my requirements:
>>
>> 1) Given the index/indices in the OID extracted from the SNMP Varbind,
>> I can directly access the node which has the required info. I don't
>> want to go through a getfirst-getnext cycle to find the correct row
>> for an SNMP GET request. My database is maintained as a hash table and
>> so I can access my data by hashing on my indices.
>>
>> 2)My data base is not sorted, so for SNMP GetNexts , I dont mind
>> getfirst-getnext cycles being called.
>
> This is problematic.
>
> For GET and SET you should be able to use the basic table helper (not an
> mib2c template, I mean the helper!)
>
> The problem is with GETNEXT, you are given an index value and are then
> expected to return either the first entry with key > index or the first
> entry with key >= index, now given that your data are stored in a hash
> table you need to somehow store the information of where to find the
> next item. Thus the optins I can see are
>
>       * Keep an ordered index over the existing keys, either in a
>         separate table or as part of the objects of the first table.
>         (cost: memory, complexity)
>         A variation of this is to change the dataase to an ordered data
>         structure (cost: depends on the data structure, complexity)
>
>       * Make exhaustive search of the index set. (cost: performance)
>
> /MF
>
>> I tried mfd (unsorted external also) and iterator options , but
>> iterator iterates through the getfirst-getnext cycles for a single
>> SNMP GET itself. If mfd is used, then there is memory required for
>> cache.
>>
>> Is there a method which meets these requirements without iteration and
>> cache ? I am using netsnmp 5.4.1.
>> Plz let me know if anyone knows the answer.
>
>
>

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to