Hello All,

if the snmpset command line has multiple varbinds (variables) to modify for the 
same table
and the same row (index), how can one ensures that all vars are processed in 
one request
struct?

Here is simple case of what I do and have:
I use snmpset command to set a variable but I also have to pass RowStatus value 
on the same line
with same request. 

here is an example of the snmpset command:
snmpset -v 2c -c private localhost myvariable.1 s "hello" myRowStatus.1 i 2

this command is passed to the sub-agent in two netsnmp_request_info structs.
The 1st has the two varbinds the last request has only the last varbind.

In my sub-agent registered handler I have the following code:

int aSubagent_OID_handler( netsnmp_mib_handler *handler,
                          netsnmp_handler_registration *reginfo,
                          netsnmp_agent_request_info *reqinfo,
                          netsnmp_request_info *requests)
{

   int ret = SNMP_ERR_NOERROR;
   netsnmp_request_info *request;
   netsnmp_variable_list *vars;

  for (request = requests; request; request = request->next)
     {
       vars = request->requestvb;
       for (var = vars; var; var = var->next_variable) 
        {
          /* check the mode and process */

       }
  }

}

The spliting of the varbinds in the above fashion
confuses the sub-agent code since it is already processed the 1st request
with both varbinds and then it has
to process the last request, only the last one is incomplete and it is a subset 
of the first.

Is there any way that one can flag the varbind (perhaps in 
netsnmp_variable_list struct )
as processed, once it has been dealt with?


I'm using 5.4.2 release on linux.

Alternatively, and more robustly, is there any way or option to instruct 
snmpset/netsnmp master agent to intelligently
group the varbinds that belong to the same table same index 
in one netsnmp_request_info struct?   

I am doing something wrong here or looking at things in wrong way?

your replies and feedback are always appreciated

Bernadette
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to