On Mon, 27 Mar 2006 17:18:57 +0100 Graeme wrote:
GW> I am using net-snmp (on Suse 8.2) and I need to write a
GW> sub-agent to implement a table. I'm new to snmp so as a starting point
GW> I tried following the tutorial on the web for the mib2c mfd (for the
GW> ifTable).
GW> However when I generated the code using mib2c (mib2c -c mib2c.mfd.conf
GW> ifTable) the code generated is different to that in the tutorial.

Hi Graeme,

Sorry for the delayed response. The code is different, because many fixes and
improvements were made for 5.3.

GW> One of the main differences seems to be the initialisation of the data:
GW> The code on the web has a function called: 'ifTable_cache_load' which
GW> gets called from the interface code.
GW> The code I have generated has an equivalent function called
GW> ifTable_container_load but this does not seem to get called from
GW> anywhere (I put a debug message in the function just to check) and
GW> therefore the data does not get loaded.

It should be called when you query the table. Note that the generated code
generates lots of debug messages that can be helpful to tracing the flow of
the program. Try running the agent with '-f -Lo
-Dtoken,internal:token,verbose:token', where token is the prefix of your table.

Also, stop by the IRC channel for more expedient support.

NOTE: messages sent directly to me, instead of the lists, will be deleted
unless they are requests for paid consulting services.

Robert Story; NET-SNMP Junkie

You are lost in a twisty maze of little standards, all different.

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Net-snmp-coders mailing list