On 23/10/2007, Sridhar Addagada <[EMAIL PROTECTED]> wrote:
> It was my understanding that
>     netsnmp_register_watched_scalar is used on the leaf nodes of a mib
>
> and
>     netsnmp_register_watched_instance is used for the tabular
> handling of the variable.

Yes - I'd tend to agree with that.


> But the code in the example
> (http://net-snmp.sourceforge.net/dev/agent/watched_8c-example.html)
> uses the instance handler routine.  Can someone correct my
> understanding of these handler.

No - I think your understanding is correct, and the example really
ought to use the 'watched_scalar' call.

   I suspect that the reason for this is mostly historical.   The scalar
(and watched_scalar) helpers are relatively recent additions to
the agent code - and were preceded by a family of "int_instance"
API calls.   So the early examples of watched object code would
all register the exact instance (since this was the only available
mechanism).
   While the particular example that you're referring to is actually
later than the introduction of the 'watched_scalar' call, it's probably
modelled on these earlier examples, and hence also registers the
instance OID, rather than the scalar object.


Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.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

Reply via email to