<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
  img {
    max-width: 100%;
    height: auto;
  }
  p.details {
    font-style:italic;
    color:#777
  }
  .footer p {
    font-size:small;
    color:#777
  }
  pre.commit-message {
    white-space: pre-wrap;
  }
  .file-stats a {
    text-decoration: none;
  }
  .file-stats .new-file {
    color: #090;
  }
  .file-stats .deleted-file {
    color: #B00;
  }
</style>
<body>
<div class='content'>
<h3>
Hal Murray pushed to branch master
at <a href="https://gitlab.com/NTPsec/ntpsec">NTPsec / ntpsec</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.com/NTPsec/ntpsec/commit/6c5c9e0643f5b113a91ebf7a9e6f404adceecf75">6c5c9e06</a></strong>
<div>
<span>by Hal Murray</span>
<i>at 2015-12-22T04:47:31Z</i>
</div>
<pre class='commit-message'>Add lost packet count to rawstats</pre>
</li>
</ul>
<h4>5 changed files:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
docs/includes/mon-commands.txt
</a>
</li>
<li class='file-stats'>
<a href='#diff-1'>
include/ntp.h
</a>
</li>
<li class='file-stats'>
<a href='#diff-2'>
include/ntpd.h
</a>
</li>
<li class='file-stats'>
<a href='#diff-3'>
ntpd/ntp_proto.c
</a>
</li>
<li class='file-stats'>
<a href='#diff-4'>
ntpd/ntp_util.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/6c5c9e0643f5b113a91ebf7a9e6f404adceecf75#diff-0'>
<strong>
docs/includes/mon-commands.txt
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/docs/includes/mon-commands.txt
</span><span style="color: #000000;background-color: #ddffdd">+++ b/docs/includes/mon-commands.txt
</span><span style="color: #aaaaaa">@@ -134,7 +134,7 @@ show the offset, delay, dispersion and RMS jitter, all in seconds.
</span> ---------------------------------------------------------------------------------
 5628 54575.160 128.4.1.1 192.168.1.5 3565350574.400229473
     3565350574.442385200 3565350574.442436000 3565350575.154505763
<span style="color: #000000;background-color: #ffdddd">-    0 4 4 1 8 -21 0.000000 0.000320 PPS
</span><span style="color: #000000;background-color: #ddffdd">+    0 4 4 1 8 -21 0.000000 0.000320 PPS 0
</span> ---------------------------------------------------------------------------------
 +
 |==============================================================================
<span style="color: #aaaaaa">@@ -153,9 +153,10 @@ show the offset, delay, dispersion and RMS jitter, all in seconds.
</span> |1                   |1-15, 16: not synced              |stratum
 |8                   |log~2~ seconds                    |poll
 |-21                 |log~2~ seconds                    |precision
<span style="color: #000000;background-color: #ffdddd">-|0.000000            |seconds                           |total roundtrip delay to the primary reference clock
-|0.000320            |seconds                           |total dispersion to the primary reference clock
</span><span style="color: #000000;background-color: #ddffdd">+|0.000000            |seconds                           |total roundtrip delay from the remote server to the primary reference clock
+|0.000320            |seconds                           |total dispersion from the remote server to the primary reference clock
</span> |.PPS.               |IP or text                        |refid, association ID
<span style="color: #000000;background-color: #ddffdd">+| 0                  |integer                           |lost packets since last response
</span> |==============================================================================
 +
 The first two fields show the date (Modified Julian Day) and time
</code></pre>

<br>
</li>
<li id='diff-1'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/6c5c9e0643f5b113a91ebf7a9e6f404adceecf75#diff-1'>
<strong>
include/ntp.h
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/include/ntp.h
</span><span style="color: #000000;background-color: #ddffdd">+++ b/include/ntp.h
</span><span style="color: #aaaaaa">@@ -361,6 +361,7 @@ struct peer {
</span>   /*
         * End of clear-to-zero area
         */
<span style="color: #000000;background-color: #ddffdd">+        u_int   outcount;       /* packets sent without reply */
</span>   u_long  update;         /* receive epoch */
 #define end_clear_to_zero update
        int     unreach;        /* watchdog counter */
</code></pre>

<br>
</li>
<li id='diff-2'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/6c5c9e0643f5b113a91ebf7a9e6f404adceecf75#diff-2'>
<strong>
include/ntpd.h
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/include/ntpd.h
</span><span style="color: #000000;background-color: #ddffdd">+++ b/include/ntpd.h
</span><span style="color: #aaaaaa">@@ -287,7 +287,7 @@ extern    void    record_loop_stats (double, double, double, double, int);
</span> extern    void    record_clock_stats (sockaddr_u *, const char *);
 extern int     mprintf_clock_stats(sockaddr_u *, const char *, ...)
                        NTP_PRINTF(2, 3);
<span style="color: #000000;background-color: #ffdddd">-extern  void    record_raw_stats (sockaddr_u *srcadr, sockaddr_u *dstadr, l_fp *t1, l_fp *t2, l_fp *t3, l_fp *t4, int leap, int version, int mode, int stratum, int ppoll, int precision, double root_delay, double root_dispersion, uint32_t refid);
</span><span style="color: #000000;background-color: #ddffdd">+extern     void    record_raw_stats (sockaddr_u *srcadr, sockaddr_u *dstadr, l_fp *t1, l_fp *t2, l_fp *t3, l_fp *t4, int leap, int version, int mode, int stratum, int ppoll, int precision, double root_delay, double root_dispersion, uint32_t refid, u_int outcount);
</span> extern    void    check_leap_file (int is_daily_check, uint32_t ntptime, const time_t * systime);
 extern void    record_crypto_stats (sockaddr_u *, const char *);
 #ifdef DEBUG
</code></pre>

<br>
</li>
<li id='diff-3'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/6c5c9e0643f5b113a91ebf7a9e6f404adceecf75#diff-3'>
<strong>
ntpd/ntp_proto.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntp_proto.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_proto.c
</span><span style="color: #aaaaaa">@@ -1580,6 +1580,7 @@ process_packet(
</span>   pleap = PKT_LEAP(pkt->li_vn_mode);
        pversion = PKT_VERSION(pkt->li_vn_mode);
        pstratum = PKT_TO_STRATUM(pkt->stratum);
<span style="color: #000000;background-color: #ddffdd">+        if (peer->outcount) peer->outcount--;  /* dup, peer with shorter poll */
</span> 
        /*
         * Capture the header values in the client/peer association..
<span style="color: #aaaaaa">@@ -1588,7 +1589,7 @@ process_packet(
</span>       &peer->dstadr->sin : NULL,
            &p_org, &p_rec, &p_xmt, &peer->dst,
            pleap, pversion, pmode, pstratum, pkt->ppoll, pkt->precision,
<span style="color: #000000;background-color: #ffdddd">-            p_del, p_disp, pkt->refid);
</span><span style="color: #000000;background-color: #ddffdd">+       p_del, p_disp, pkt->refid, peer->outcount);
</span>   peer->leap = pleap;
        peer->stratum = min(pstratum, STRATUM_UNSPEC);
        peer->pmode = pmode;
<span style="color: #aaaaaa">@@ -1597,6 +1598,7 @@ process_packet(
</span>   peer->rootdisp = p_disp;
        peer->refid = pkt->refid;         /* network byte order */
        peer->reftime = p_reftime;
<span style="color: #000000;background-color: #ddffdd">+        peer->outcount = 0;
</span> 
        /*
         * First, if either burst mode is armed, enable the burst.
<span style="color: #aaaaaa">@@ -3136,6 +3138,7 @@ peer_xmit(
</span>           intercept_sendpkt(__func__, &peer->srcadr, peer->dstadr, sys_ttl[peer->ttl],
                    &xpkt, sendlen);
                peer->sent++;
<span style="color: #000000;background-color: #ddffdd">+                peer->outcount++;
</span>           peer->throttle += (1 << peer->minpoll) - 2;
 
                /*
</code></pre>

<br>
</li>
<li id='diff-4'>
<a href='https://gitlab.com/NTPsec/ntpsec/commit/6c5c9e0643f5b113a91ebf7a9e6f404adceecf75#diff-4'>
<strong>
ntpd/ntp_util.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/ntpd/ntp_util.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/ntpd/ntp_util.c
</span><span style="color: #aaaaaa">@@ -548,7 +548,9 @@ record_raw_stats(
</span>   int     precision,
        double  root_delay,     /* seconds */
        double  root_dispersion,/* seconds */
<span style="color: #000000;background-color: #ffdddd">-        uint32_t        refid
</span><span style="color: #000000;background-color: #ddffdd">+   uint32_t        refid,
+       u_int   outcount
+
</span>   )
 {
        l_fp    now;
<span style="color: #aaaaaa">@@ -562,13 +564,14 @@ record_raw_stats(
</span>   day = now.l_ui / 86400 + MJD_1900;
        now.l_ui %= 86400;
        if (rawstats.fp != NULL) {
<span style="color: #000000;background-color: #ffdddd">-                fprintf(rawstats.fp, "%lu %s %s %s %s %s %s %s %d %d %d %d %d %d %.6f %.6f %s\n",
</span><span style="color: #000000;background-color: #ddffdd">+           fprintf(rawstats.fp, "%lu %s %s %s %s %s %s %s %d %d %d %d %d %d %.6f %.6f %s %d\n",
</span>               day, ulfptoa(&now, 3),
                    stoa(srcadr), dstadr ?  stoa(dstadr) : "-",
                    ulfptoa(t1, 9), ulfptoa(t2, 9),
                    ulfptoa(t3, 9), ulfptoa(t4, 9),
                    leap, version, mode, stratum, ppoll, precision,
<span style="color: #000000;background-color: #ffdddd">-                    root_delay, root_dispersion, refid_str(refid, stratum));
</span><span style="color: #000000;background-color: #ddffdd">+               root_delay, root_dispersion, refid_str(refid, stratum),
+                   outcount);
</span>           fflush(rawstats.fp);
        }
 }
</code></pre>

<br>
</li>

</div>
<div class='footer' style='margin-top: 10px;'>
<p>

<br>
<a href="https://gitlab.com/NTPsec/ntpsec/commit/6c5c9e0643f5b113a91ebf7a9e6f404adceecf75">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.com/NTPsec/ntpsec/commit/6c5c9e0643f5b113a91ebf7a9e6f404adceecf75"}}</script>
</p>
</div>
</body>
</html>