Hi Dev ,

Many thanks for your response. 
I am using mib2c.iterate.conf . I have one question is it possible for
scalar attribute . For example in a single SNMPSET request if manager is
trying to set three attribute (say ipaddress, netmask, and gateway).
Suppose setting of gateway fails then is it possible to set the old
value of IP address and netmask ? In case of scalar also we will have
different handler.

Regards,
Somenath 


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Shield
Sent: Friday, October 06, 2006 3:35 PM
To: Somenath Pal (WT01 - Broadband Networks)
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: Multiple row creation

On 06/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Many thanks for your answer. Suppose I want to create two rows for two
> different tables in a single SNMPSET request. But the handler (CREAT
AND
> GO) for two different rows will be different. Suppose the second
> creation fails. Now how we can delete the first row? As execution of
> first handler is finished. Is there any way to return back to the
first
> handler?


That's why the Net-SNMP agent uses a multi-pass approach to SET
requests.
Please read the section on SET handling in the file AGENT.txt.  This
refers to the old v4 MIB module API, but the basic model applies to
the v5 handler-based API as well.

Bottom line, the agent won't move from one pass to the next until
*ALL* the varbinds have been processed.  So the agent will do
something like:

     handle_table1( RESERVE1 );
     handle_table2( RESERVE1 );
     handle_table1( RESERVE2 );
     handle_table2( RESERVE2 );
     handle_table1( ACTION );
     handle_table2( ACTION );
     handle_table1( COMMIT );
     handle_table2( COMMIT );


If any of these fail (say handle_table2(ACTION)), then the agent will
call *both* handlers with the appropriate failure mode:

     handle_table1( UNDO );
     handle_table2( UNDO );

That's where you'd need to take care of deleting the newly-created row
again.


Which helper(s) are you using?  Most of the automatically-generated
code ought to include the basic framework to do this.

Dave

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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