Hi,

      1) I have a table with index specified in the form of strings. I have
two columns in the table whose elements are also strings. In the MIB file I
have defined the syntax of the index as String SIZE(1..32).

       2) I used mib2c.iterate.conf for generating the "C" file from the
MIB.

       3) I created some rows with string indexes. Later when i request for
a GET operation with the same string as index, the requested oid becomes
table_oid.colum_no.strlen(index).ascii_equivalent_of_index.
                       The length of  the requested oid is = length of
table_oid + 1(for column_no) + 1(for strlen(index)) + strlen(index).
        In netsnmp_table_iterator_helper_handler() funtion of
table_iterator.c  build_oid_noalloc() routine constructs the oid of the
requested object in the format
table_oid.colum_no.32.ascii_equivalent_of_index.
                         Here the built oid length is = length of table_oid
+ 1(for column_no) + 1(for max_size of index string which is 32) +
32(max_size of index string) .

        4) Since the requested oid and the built oid differs and also their
length, it doesnot do netsnmp_iterator_remember(). So when my table handler
is invoked netsnmp_extract_iterator_context() returns a null value and hence
my code crashes.

        5) If I represent the index in MIB without specifying SIZE(1..32)
and then make a GET request for the object it says "Index out Of Range". So
how can i get rid of these errors and get my code running properly.
--
R.Karthikeyan

"Vision without action is a Daydream. Action without vision is a Nightmare"
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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