On Mon, 2005-04-18 at 11:28, Sunitha J wrote:

> 1) If you're writing code for some generic scalars
>      (by hand use: "mib2c -c mib2c.scalar.conf Netmib")
>  
>   2) If you want to magically "tie" integer variables to integer
>      scalars
>      (by hand use: "mib2c -c mib2c.int_watch.conf Netmib")
> what is the difference between those 2

The second approach can be used to say
   "Here's an internal variable - whenever you're asked
    for a particular SNMP value, return the current value
    of this variable.  Whenever you receive an SNMP SET
    request, update this variable with the new value."

The first approach is more flexible, and should be used
when you need to do something more with the MIB object.


Note that the second (int_watch) approach doesn't actually
handle scalar objects properly.   There's an alternative
API "netsnmp_register_watched_scalar" that can be used to
do much the same thing, but more reliably.
  We probably ought to update the 'int_watch' driver to
use that instead, but I've been reluctant to do so without
Wes' say-so.

See recent threads on the lists titled "instance vs scalar"
(and similar)

Dave



-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
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

Reply via email to