On 12 May 2011 19:07, Ravi Depa <ravired...@gmail.com> wrote:
>        The problem what I have is when I
> send a snmpget request to agent, snmp agent is not responding for one
> specific OID which is related to TIMETICKS


>     char return_val[256];


>         case MODE_GET:
>             snmp_set_var_typed_value(requests->requestvb, ASN_TIMETICKS,
>                                      (u_char *)& return_val,
>                                      strnlen (return_val,256));


TimeTicks is a based on the INTEGER type, so you need to return an integer
value (i.e. a 'long' value, not a 256-character string)

Have a look at agent/mibgroup/mibII/system_mib.c:handle_sysUpTime()
for an example of how to implement such an object.

Dave

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to