RE: net-snmp uses gettimeofday instead of clock_gettime()

Dirk Buijsman <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
My bad, I am using 5.6.1 on a uClinux platform. I check the 5.7.2 release and it indeed is using a different method (timerisset, timeradd, etc).
Cheers,Dirk


> Date: Wed, 8 Jan 2014 08:27:59 +0100
> From: [email protected]
> To: [email protected]; [email protected]
> Subject: Re: net-snmp uses gettimeofday instead of clock_gettime()
> 
> On 01/08/14 02:01, Dirk Buijsman wrote:
> > net-snmp seems to use the function "gettimeofday" (see snmp_api.c) to
> > find out how much time remains until the next timeout. However, this
> > function is not safe as the systemclock could be adjusted by NTP.... The
> > recommended way to do timing seems to be "clock_gettime()".
> > 
> > Is this something worth modifying?
> 
> I think this was fixed about two years ago. Which Net-SNMP version are
> you using and on which operating system ?
> 
> commit f8a3ef0d3d4e530279900101049b8de98a44a6fb
> Author: Bart Van Assche <[email protected]>
> Date:   Mon Feb 6 14:48:52 2012 +0100
> 
>     CHANGES: snmplib + snmpd + snmpwalk: Avoid that system clock changes
> (e.g. by ntpd) affect code that needs relative time
> 
> Bart.
>

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk

_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.