Re: Parsing Get/Set Requests in Table_Handler
Dave Shield <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
2009/2/10 M. Zeeshan - IMS <[email protected]>: > By reading section 6 of the file 'AGENT.txt' i am still unable to make neat > sense and difference between RESERVE, RESERVE2 and ACTION.... In very general terms: RESERVE1: Is this individual assignment OK? (type, value, etc) RESERVE2: Is the assignment as a whole OK? consistency between varbinds, etc ACTION: Apply the assignments Now that's just a convention for the sort of processing needed in each pass. The agent can actually do whatever it likes in each case, just as long as it's ready to back out again if one of the other varbind assignments fails. So one possible alternative (particularly for creating a new row in a table), might be to create the data structure for the new row in the RESERVE1 pass, apply the new values in during RESERVE2, and check the consistency and/or completeness of the row during the ACTION pass. The advantage of that approach is that it doesn''t matter which order the varbinds are processed in. For example, assume there's a RowStatus column, which is responsible for creating the new row structure, and checking that the row is complete. Regardless of whether the RowStatus varbind comes first or last in the list, the data structure will always created (in R1) *before* the individual values are inserted into it (in R2), and all the values will be applied (in R2) *before* the validity is checked (in A). That's not the only way to handle this, but it's certainly one sensible approach. > can you please specify a simple example to make this sense of or do i have > to code for each of them and what will be the differences. Have a look at the code for some of the current MIB modules, to see how various people have handled this in the past. Dave ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ 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