> Dave,
>    I tried using "netsnmp_register_scalar" for an INTEGER type scalar
> ... and it returned the error No such object instance exists. 

>    However, if I use netsnmp_register_instance with
> netsnmp_instance_int_handler in netsnmp_create_handler_registration,
> the same works fine.   

Did you use the same OID in both cases?

Since 'netsnmp_register_instance' is registering a single instance,
the OID that it registers will be the OID of the instance - including
the final instance subidentifier '0'.

Since 'netsnmp_register_scalar' is registering a scalar object,
(covering both the valid instance and all invalid ones),  the OID
that it registers will be the OID of the object - *not* including
the final instance subidentifier '0'.


>    Further, if I use netsnmp_scalar_helper_handler in
> netsnmp_create_handler_registration, while using netsnmp_register_instance,

No - that's mixing two different helpers, and I wouldn't expect it to work.
You shouldn't need to mention netsnmp_scalar_helper_handler by name
anyway.



>    Further, I could not find any code which declares/defines the function
> "netsnmp_register_scalar_watcher" in the netsnmp source tarball. 
> Could it be I am missing something here?

No - I misremembered the name of the routine - sorry.
Try
        netsnmp_register_watched_scalar

(in agent/helpers/watcher.c)

Dave



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.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