* [Bug 1984] ntp/libisc fails to compile on OS X 10.7 (Lion).
* [Bug 1985] "logconfig =allall" rejected.
+* [Bug 2001] ntpdc timerstats reports overruns as handled.
* [Backward Incompatible] sntp: -l/--filelog -> -l/--logfile, to be
consistent with ntpd.
* libopts/file.c fix from Bruce Korb (arg-type=file).
*/
static void
timer_stats(
- sockaddr_u *srcadr,
- struct interface *inter,
- struct req_pkt *inpkt
+ sockaddr_u * srcadr,
+ struct interface * inter,
+ struct req_pkt * inpkt
)
{
- register struct info_timer_stats *ts;
-
- /*
- * Importations from the timer module
- */
- extern u_long timer_timereset;
- extern u_long timer_overflows;
- extern u_long timer_xmtcalls;
+ struct info_timer_stats * ts;
+ u_long sincereset;
- ts = (struct info_timer_stats *)prepare_pkt(srcadr, inter, inpkt,
- sizeof(struct info_timer_stats));
+ ts = (struct info_timer_stats *)prepare_pkt(srcadr, inter,
+ inpkt, sizeof(*ts));
- ts->timereset = htonl((u_int32)(current_time - timer_timereset));
- ts->alarms = htonl((u_int32)alarm_overflow);
- ts->overflows = htonl((u_int32)timer_overflows);
+ sincereset = current_time - timer_timereset;
+ ts->timereset = htonl((u_int32)sincereset);
+ ts->alarms = ts->timereset;
+ ts->overflows = htonl((u_int32)alarm_overflow);
ts->xmtcalls = htonl((u_int32)timer_xmtcalls);
(void) more_pkt();