Hi dave, I have modified the program ustScalarSet.c to return a float value
struct variable2 ustScalarSet_variables[] = { /* magic number , variable type , ro/rw , callback fn , L, oidsuffix */ ... { VIBHA, ASN_FLOAT, RWRITE, var_ustScalarSet, 1, { 7 } }, }; unsigned char * var_ustScalarSet(struct variable *vp, oid *name, size_t *length, int exact, size_t *var_len, WriteMethod **write_method) { /* variables we may use later */ static long long_ret; static unsigned char *ChSwUG; ..... case VIBHA: *write_method = write_vibha; *var_len = sizeof(float); ChSwUG = &fl; fprintf(stderr,"\n\nEntered test setting value"); return (unsigned char *) ChSwUG; ..... } >>ajit -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Shield Sent: Monday, February 11, 2008 7:14 PM To: Ajit J Clarence Cc: net-snmp-users@lists.sourceforge.net Subject: Re: Adding of float datatype using UCD snmp On 11/02/2008, Ajit J Clarence <[EMAIL PROTECTED]> wrote: > When I added float MIB object using UCD snmp MIB structure, I get the > following error, when I use snmpget > > "Entered test setting valueInternal error in type switching > snmp_build: unknown failuresend response: Error building ASN.1 > representation (wrong type in snmp_realloc_rbuild_var_op: 72) > -- .1.3.6.1.3.7.0" > > Can anyone help me to resolve this issue? What exectly are you doing? What is the MIB definition of this object, and what does the code look like? Dave ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ 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