On Wed, 2005-10-19 at 10:52 -0700, Yong Chen (yongche) wrote: > But in ChangeLog, it says: > > Fixes: > - the agent should properly handle requests in the right order. > (e.g., restrict the agent to processing only one SET at a time)
Yes - that's concerned with the processing of two *different* SET requests. Not the processing of two varbind assignments in the *same* SET request. If an agent receives: SET oneFish = xxx SET twoFish = yyy then it should finish handling the "oneFish" assignment *before* starting to look at the "twoFish" assignment. If it receives: SET redFish = xxx, blueFish = yyy then it needs to process *both* assignments "at the same time". > Also the ordering of varbinds in a SET request may have some > significance because of dependency between the varbinds. That's why handling SET requests properly is Non-Trivial! The usual basic technique is to walk through the full list of assignments, checking them individually and making any preparations for acting on them. Then walk through the list again, updating the individual assignments. Then walk through the list *again*, checking that the final state is consistent. Then walk through the list again, tidying up. If one assignment ("oldFish") relies on another ("newFish"), it is *NOT* valid to assume that the varbinds occur in the most helpful order. The agent *MUST* be able to process both SET oldFish = xxx, newFish = yyy and SET newFish = yyy, oldFish = xxx with *exactly* the same results in either case. > Where can I find doc regarding the simultaneously > processing SET assignments? RFC 3416, section 4.2.5 See p22, second para. > And I've been reading the code, but not finding the "as if > simultaneously" processing of SETs. Can you please point me > to the code? There is no One Single Place where this is handled. Each MIB will have different requirements for what assignments rely on other ones, so the "as if simultaneous" code will be specific to each particular MIB. For an example, have a look at 'agent/mibgroup/agent/nsLogging'. This shows one possible approach to ensuring that SEt requests will be processed correctly, independent of varbind order. I probably wouldn't write this in quite the same way now, but it show the basic ideas. Dave ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ 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