2009/2/5 Lab Partner <[email protected]>:
> I notice there's no requirement to uphold the ordering of variable
> bindings within a request,

That's not strictly true.   The varbinds in a response must match
the order of the varbinds in the original request.  (see RFC 1905,
e.g. the second paragraph of section 4.2.1)



> Since that was probably ambiguous, here's the example: I have a table
> extension to an existing table and unfortunatelty an object needs to
> be set in the extension before it can become active.
>
> The operations are as follows:
> 1) set createAndWait in the original table,
> 2) set the proprietary extension object,
> 3) set active in the original table.
>
> Ideally, one would like to have all three operations in the same set
> PDU. Is it appropriate behavior to let ordering be of significance?

In terms of Set processing, the assignments should be applied
"as if simultaneously" - see RFC 1905, section 4.2.5 - the second
paragraph after step (13).

   This means that the order of varbinds should make no difference.
Whether the createAndGo varbind comes first or last in the list - the
effect should be the same.


This is the reason that that the Net-SNMP agent uses a multi-pass
approach to SET processing.  (And this is also carried through into
the AgentX conversation).
   One approach would be for the first pass (RESERVE1) to validate
the individual varbinds, and set up the data structures for the new
row - including the proprietary extensions.  The second pass(RESERVE2)
could then populate these structures, and the third pass (ACTION)
check that these assignments were consistent and complete.


An alternative approach would be for the first pass to note which varbind
was processed last.   This information could then be used in a subsequent
pass to decide when to call the row validation code - hence ensuring this
was handled *after* all the relevant assignments had been applied.


> On a similar note, if one sets the RowStatus (or any object) for the
> same entry multiple times in a PDU, what is the expected result?

    "Implementation dependent".

If you set "x=1" and "x=2" at exactly the same time - what value
should x have?
   There are four possible answers:
       a)   1    (first assignment takes priority)
       b)   2    (last assignment takes priority)
       c)   either 1 or 2    (with no guarantee as to which)
       d)   Error

The SNMP specs don't say anything about what should happen here,
so you can't assume any one behaviour is The Right Thing To Do.

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-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to