Dave, Sorry for being so naive!! The removal of instanceid "0" worked with netsnmp_instance_int_handler as the handler in the netsnmp_create_handler_registration call.
However, I still need to specify the name of the instance handler in netsnmp_create_handler_registration. So, I did not quite get, how I can do *without* specifying the "netsnmp_scalar_helper_handler" by name in netsnmp_create_handler_registration. Also, if I specify the netsnmp_scalar_helper_handler as second arg in the netsnmp_create_handler_registration function call, the illegal call to netsnmp_call_handler() is reported in the agent. So, if I have to specify the netsnmp_instance_int_handler in the netsnmp_create_handler_registration function call, I have not achieved the case where the handler is datatype independant. I am really sorry, if I have missed something very obvious, Thanks and Regards, Arijit -----Original Message----- From: Dave Shield [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 23, 2004 2:23 PM To: Mukherjee, Arijit (Arijit) Cc: [EMAIL PROTECTED] Subject: Re: Which handler to use for DisplayString type > 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