Hi,

Thanks Dave. Your response solved my problem. I have one more question
relating to capturing IP address and MAC address for ethernet interfaces
exist on the system. In my SNMP agent, I have to figure out how many system
ethernet interfaces are exist and update their IP and MAC address in a
table. I have looked at pre installed mibs and found that IP-MIB contains a
table for system ethernet IP addresses but I couldn't find the source to
check how it is implemented. Could you please suggest me how can I implement
this functionality or where I can find some further infromation?

On Fri, May 13, 2011 at 3:15 AM, Dave Shield <d.t.shi...@liverpool.ac.uk>wrote:

> 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
>



-- 
Thank you,
Ravi Depa
------------------------------------------------------------------------------
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