>  So I am now using:
>  REGISTER_MIB(...)
>  To handle get,get next, and set. This works ok.
>  Is this the recommended approach instead of using the helpers?
>>No.
>>The REGISTER_MIB approach is the old-style code.
>>We are moving away from this towards helper-based MIB modules.

I have a question regarding the above statement.
>From what I can tell the new helper-based modules such as the
mib2c.table_data.conf require that the rows of a table be created prior
to the handler being invoked by a get/getnext/set request. The original
REGISTER_MIB was different in that one could determine the rows of a
table upon the get/getnext/set request. 
Since you are moving away from the REGISTER_MIB approach - what
helper-based module could I use that would provide the same type of
feature. Specifically what helper-based module allows for the handling
of dynamically changing rows in a table, where the event of a
get/getnext/set request is what triggers the subagent to read the
current database?
Thanks
 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Shield
Sent: Sunday, May 04, 2008 4:58 PM
To: Joan Landry
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: tablesnmpwalk on table not working via subagent - need help
please

Sorry for the delay in getting back to you on this.


2008/4/25 Joan Landry <[EMAIL PROTECTED]>:
> I am using net-snmp-5-4-1.
>  I looked at the generic helper code. In the file  
> net-snmp-5.4.1/agent/helpers/table_generic.c
>
>  All the functions are empty. I attached the file. So I am not sure 
> how  this helper will work.

This helper will not work.
It is not suitable for implementing a MIB.

As I explained to Mike, the purpose of this file is to act as a design
template when crafting a new table helper.   It's aimed at internal
Net-SNMP coding, not end-programmers like yourself.

Forget about this helper - it's a complete red herring.


>  My goal is very simple.
>  I want to code a subagent to register for a mib table and be able to

> handle the get, getnext, set for the rows and columns in the table  
> because the data is in the subagent not the master agent. I was able 
> to  use the following for the get and the set but not for the getnext.


Most of the table helpers will automatically convert GETNEXT requests
into the appropriate GET request internally,  so the MIB-specific table
handler would never actually see a GETNEXT request.


>  Meaning I can do a get on all the rows and the columns in the table,

> which would possibly indicate that I created the table ok and added 
> the  rows correctly. For some reason though the getnext does not work
>  correctly:


>  One of the errors I get is that instead of getting the next row of 
> the  current column - I get the next column. Also, a walk never exits 
> the  loop of getnext.

It's a bit difficult to guess what might be happening here.
Could you please post the code files that you are working with.
I'll try to have a proper look at this, and see if I can spot what is
going wrong.


>  So I am now using:
>  REGISTER_MIB(...)
>  To handle get,get next, and set. This works ok.
>  Is this the recommended approach instead of using the helpers?

No.
The REGISTER_MIB approach is the old-style code.
We are moving away from this towards helper-based MIB modules.

Let us have a look at your current code, and we'll take it from there.

Dave

-------------------------------------------------------------------------
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-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to