hi,

I am using table iterator for my MIBs. I generated code using mib2c. As we know we can find first and next index in first and next data_point function. I tried to extract this index from OID in table handler. Using following method i am able to do the same-->>>

C code
Method------------>>>>
int get_table_index(netsnmp_table_request_info *table_info, unsigned char id, int *index)
{
   if(!table_info)
   {
           return -1;
   }
   /**# \b IF Check table info carries indexes or not */
   if(table_info->indexes)
   {
       /**# \b IF Check table info carries valid OID or not */
       if(table_info->indexes->name)
       {
           printf("\nNAME LENGTH[%d]\n",table_info->indexes->name_length);
           if((id > 3) || (id >= table_info->indexes->name_length))
           {
               return -1;
           }
*index = table_info->indexes->name[table_info->indexes->name_length - id];
           return 0;
       }
   }
   return -1;
}

*THIS function works fine for GET request.
*
_*But when i tried the same for all cases in set request, table_info->indexes->name_length always comes out to be 0. I want to know, does this information is not passed in case of set request to table handler or i am missing something.

*_thanks in advance for help.
PArveen YAdav

_*
*_
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
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

Reply via email to