Reg : snmpget error "No such instance currently exists at this oid"

"Ambika Ramiya" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi all,

After modification of mib2c.table_data.conf as per the patch below this email,
I have used mib2c.table_data.conf file for ".c & .h" files generation from the MIB file.
I have configured net-snmp with these ".c & .h" files and installed successfully.
I have placed my Mib file wherever necessary. But if I execute snmpget for a table element
after snmpd is started, then I get the following error "No such instance currently available for this oid".

My guess is that the registration of handler using netsnmp_tdata_register may not be done
properly even though the return value from netsnmp_tdata_register indicates successful.  The "initialize_table_xxx" function gets called after starting snmpd. But the handler
function "xxxTable_handler" is not at all called for snmpget command. This has
been confirmed by our debug code that uses snmp_log function to generate logs in snmpd log file. 

Can any one give me a suggestion to fix this problem?

Thanking you in advance.

Regards, 
Ambika.

RCS file: /cvsroot/net-snmp/net-snmp/local/mib2c.table_data.conf,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- mib2c.table_data.conf	16 Sep 2005 11:48:12 -0000	1.11
+++ mib2c.table_data.conf	11 Jan 2006 15:17:52 -0000	1.12
@@ -5,7 +5,7 @@
 @open ${name}.h@
 /*
  * Note: this file originally auto-generated by mib2c using
- *  $Id: mib2c.table_data.conf,v 1.11 2005/09/16 11:48:12 dts12 Exp $
+ *  $Id: mib2c.table_data.conf,v 1.12 2006/01/11 15:17:52 dts12 Exp $
  */
 #ifndef $name.uc_H
 #define $name.uc_H
@@ -35,7 +35,7 @@
 @open ${name}.c@
 /*
  * Note: this file originally auto-generated by mib2c using
- *  $Id: mib2c.table_data.conf,v 1.11 2005/09/16 11:48:12 dts12 Exp $
+ *  $Id: mib2c.table_data.conf,v 1.12 2006/01/11 15:17:52 dts12 Exp $
  */
 
 #include <net-snmp/net-snmp-config.h>
@@ -77,7 +77,7 @@
 @end@
               );
 
-    table_data = netsnmp_tdata_create( "$i" );
+    table_data = netsnmp_tdata_create_table( "$i" );
     table_info = SNMP_MALLOC_TYPEDEF( netsnmp_table_registration_info );
     netsnmp_table_helper_add_indexes(table_info,
     @foreach $idx index@
@@ -88,7 +88,7 @@
     table_info->min_column = XXX;
     table_info->max_column = YYY;
     
-    netsnmp_register_tdata( reg, table_data, table_info );
+    netsnmp_tdata_register( reg, table_data, table_info );
 @if "$cache" ne "" @
     cache = netsnmp_cache_create($i.uc_TIMEOUT,
                                   ${i}_load, ${i}_free,
@@ -326,9 +326,9 @@
     case MODE_SET_RESERVE2:
 @if $i.creatable@
         for (request=requests; request; request=request->next) {
-            table_row  = netsnmp_tdata_extract_row( request);
-            table_data = netsnmp_tdata_extract(     request);
-            table_info = netsnmp_extract_table_info(request);
+            table_row  = netsnmp_tdata_extract_row(  request);
+            table_data = netsnmp_tdata_extract_table(request);
+            table_info = netsnmp_extract_table_info( request);
     
             switch (table_info->colnum) {
 @if $i.rowstatus@
@@ -396,7 +396,7 @@
             table_entry = (struct ${i}_entry *)
                               netsnmp_tdata_extract_entry(request);
             table_row   =     netsnmp_tdata_extract_row(  request);
-            table_data  =     netsnmp_tdata_extract(      request);
+            table_data  =     netsnmp_tdata_extract_table(request);
             table_info  =     netsnmp_extract_table_info( request);
     
             switch (table_info->colnum) {
@@ -495,7 +495,7 @@
             table_entry = (struct ${i}_entry *)
                               netsnmp_tdata_extract_entry(request);
             table_row   =     netsnmp_tdata_extract_row(  request);
-            table_data  =     netsnmp_tdata_extract(      request);
+            table_data  =     netsnmp_tdata_extract_table(request);
             table_info  =     netsnmp_extract_table_info( request);
     
             switch (table_info->colnum) {
@@ -572,7 +572,7 @@
                               netsnmp_tdata_extract_entry(request);
 @if $i.rowstatus@
             table_row   =     netsnmp_tdata_extract_row(  request);
-            table_data  =     netsnmp_tdata_extract(      request);
+            table_data  =     netsnmp_tdata_extract_table(request);
 @end@
             table_info  =     netsnmp_extract_table_info(    request);
     


-------------------------------------------------------------------------
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
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.