(coincidentally, I'm writing this note from inside a discussion panel
entitled "Can WBEM replace SNMP?")
>>>>> On Mon, 14 May 2001 11:19:45 +0100, Dave Shield <D.T.Shield@...> said:
Dave> Yup - looks good (and pretty simple to follow). I'm rapidly
Dave> coming round to this model, Wes. They need somewhat better
Dave> documenting, of course, but I won't mention that now.
Well, duh... There is not documentation yet so I agree it needs to be
improved (ie: written).
Dave> I notice that the example scalar handler registers {1,2,3,6,1}
Dave> Is this an instance (presumably within a table), or an object (with
Dave> the implicit instance {1,2,3,6,1,0} ) ?
I was waiting for you to bring this up (and am surprised it took so
long). Currently, .1.2.3.6.1 directly. No .0 at the end.
Note that I wrote the file before making that decision, so the file
(and api) needs to be renamed away frow scalar to probably "instance"
or something instead.
The reasoning is that the helper could be used to register anything,
not just scalars, which I think is important. If someone really
wanted to register just the scalar, there is certainly nothing wrong
with supporting both a scalar helper and a instance helper (and in
fact the scalar helper could merely use the instance helper with a
slightly longer OID registration, all within about 10 lines of
additional code).
Wes> Specifically, what if you do a request like: snmpget -t 6
Wes> ... sysUpTime.0 some.sleep.oid.5 sysUpTime.0 would you expect the
Wes> values of the 2 sysUpTime.0 requests to be? equal, or 5 seconds
Wes> apart?
Dave> I'd say that this is implementation dependent.
Exactly. We agree.
Dave> Does the controlling agent framework detect [doing nothing] as
Dave> an error - if so how?
Dave> Your suggestion for handling errors (as opposed to exceptions)
Dave> seems reasonable. Suck it and see. But that's not quite what I
Dave> meant. Taking the subtree as an example, this registers
Dave> {1,2,3,4} and everything below. The handler itself then checks
Dave> against {1,2,3,4,5,6} - and returns a suitable INTEGER value.
Dave> But with a GET request for {1,2,3,4,5,7}, or {1,2,3,4,5,6,7} -
Dave> the handler won't set a value, but will still return NOERROR.
Dave> What I was asking was where this will be picked up? At what
Dave> stage in the handler chain is this checked for? It's fine if
Dave> there isn't any code to do it yet - I'm just trying to determine
Dave> where it fits logically.
If I understand your question (of which I'm still not convinced), the
master agent (not anything in the helper chain) will eventually
resolve this error handling.
Basically, if a handler returns (note, not a complete list):
For GET:
nothing (doesn't change the varbind)
the agent translates to NoSuchObject (or instance?)
NoSuchObject/other-exception
returns that error. Possibly translating into a SMNPv1
compliant return.
For GETNEXT:
nothing (doesn't change the varbind)
the agent continues the search into the next subtree
END_OF_MIB
bad handler, it shouldn't touch it but did. We should probably
check for this.
Does this direction make sense now?
--
Wes Hardaker
Please mail all replies to net-snmp-coders@...
|