Ok, got it, thanks a lot Dave for your help. Best, Yong Chen
> -----Original Message----- > From: Dave Shield [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 14, 2005 1:10 AM > To: Yong Chen (yongche) > Cc: net-snmp-users@lists.sourceforge.net > Subject: RE: Multiple sets in one pdu > > On Wed, 2005-12-14 at 00:35 -0800, Yong Chen (yongche) wrote: > > Are you saying I can set 'b1' at RESERVE2 (instead of > ACTION), then by > > the time when 'a1' gets to ACTION phase, it can be set > since 'b1' was > > set already in previous pass? > > Yes. > > > But this approach seems to be not scalable. > > Correct. > > > If I have 'a' depending on > > 'b', 'b' depending on 'c', 'c' depending on 'd', then I > need to set 'd' > > in RESERVE2, and 'c' in ACTION, and 'b' in COMMIT, then there's no > > pass left for 'a'. > > If you've got that many interdependent variables: > > - processing them each in a separate pass is not a very > efficient approach. > - it *might* be possible to save the assignments in R1, > sort them into the appropriate order in R2, and act > on them in ACTION. (Or else act on them in R2, and > report errors in ACTION). > - you're probably stretching the v4 model further than it > can sensibly go. > - you could probably do with reviewing the design of your MIB! > > > > > (Actually when we return an error, do we really associate the error > > with the offending varbind in response?) > > Yes. > > > > Still the same problem, the error will be associated with the last > > varbind, not the real "offending" varbind. > > Yup. > Unless you jump through hoops to avoid this (see above). > > > > Will 5.x handler style solve this problem? > > Yes. > > > All my varbinds are in the > > same table so they can have one handler. > > And they will *all* be passed to the handler in one go, so > you can whizz through the list as many times as you like. > > > > Also just curious, in 5.x style, since one handler will > have a list of > > varbinds (in requests) as one of its input parameters, if > some error > > happens during processing, do we know in response pdu which varbind > > caused the problem? > > Because the error is set for a particular varbind: > > netsnmp_set_request_error(reqinfo, request, SNMP_ERR_XXX); > ^^^^^^^ > > (where 'request' is looping through the list of varbinds). > > > Dave > ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ 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