Dave, I tried using "netsnmp_register_scalar" for an INTEGER type scalar - while using "netsnmp_instance_int_handler" in netsnmp_create_handler_registration() - and it returned the error No such object instance exists. If I try to use netsnmp_scalar_helper_handler in netsnmp_create_handler_registration, while using netsnmp_register_scalar, I got the same error. However, if I use netsnmp_register_instance with netsnmp_instance_int_handler in netsnmp_create_handler_registration, the same works fine. Further, if I use netsnmp_scalar_helper_handler in netsnmp_create_handler_registration, while using netsnmp_register_instance, I get the error of "netsnmp_call_handler() called illegally" on Agent and "Error in packet: A general Error Occured" on the manager. I tried these to check the use of netsnmp_register_scalar on something that I knew worked with netsnmp_register_instance. I must be missing something here. Could you kindly point out my mistake.
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? Thanks and regards, Arijit -----Original Message----- From: Dave Shield [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 22, 2004 9:52 PM To: Mukherjee, Arijit (Arijit) Cc: [EMAIL PROTECTED] Subject: Re: Which handler to use for DisplayString type > > If I am to call netsnmp_create_handler_registration for a scalar of type > DisplayString, what is the instance handler that this scalar should be > registered with? If you're registering a scalar object, then use netsnmp_register_scalaer() rather than netsnmp_register_instance() This handles invalid requests properly (i.e. a GET on myScalar.1 gives noSuchInstance rather than noSuchObject) For a scalar object that is "watching" an internal variable, then use netsnmp_register_scalar_watcher() This can cope with watching string buffers as well as integers. (with a bit of fiddling for writeable variable-size values). A search on the mailing list archives should give some examples of how to use this. 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