[Git][NTPsec/ntpsec][master] Improve comments.

Eric S. Raymond gitlab at mg.gitlab.com
Thu Sep 15 20:28:09 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
063438da by Eric S. Raymond at 2016-09-15T16:27:49-04:00
Improve comments.

- - - - -


2 changed files:

- include/ntp.h
- libntp/pktvis.c


Changes:

=====================================
include/ntp.h
=====================================
--- a/include/ntp.h
+++ b/include/ntp.h
@@ -441,12 +441,10 @@ struct peer {
 				    - CRYPTO_TO_ZERO((struct peer *)0))
 
 /*
- * NTP packet format.  The mac field is optional.  It isn't really
- * an l_fp either, but for now declaring it that way is convenient.
- * See Appendix A in the specification.
+ * NTP packet format. See Appendix A in the specification.
  *
  * Note that all u_fp and l_fp values arrive in network byte order
- * and must be converted (except the mac, which isn't, really).
+ * and must be converted.
  */
 struct pkt {
 	uint8_t	li_vn_mode;	/* peer leap indicator */


=====================================
libntp/pktvis.c
=====================================
--- a/libntp/pktvis.c
+++ b/libntp/pktvis.c
@@ -35,8 +35,9 @@ void packet_dump(char *buf, size_t buflen, struct pkt *pkt, size_t len)
 {
     size_t i;
     /*
-     * FIXME: struct pkt fields are in network byte order. Need to
-     * add htonl()/ntohl() calls here  for comprehensibility.
+     * FIXME: struct pkt 32-bit ints (uint32_t, u_fp) are in network
+     * byte order. Might need to add htonl()/ntohl() calls here for
+     * comprehensibility.
      */
     snprintf(buf, buflen, "%d:%d:%d:%d:%u:%u:%u:%s:%s:%s:%s:",
 	   pkt->li_vn_mode, pkt->stratum, pkt->ppoll, pkt->precision,



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/063438da368e4affab31f3efb3757c16bba29de8
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160915/55da2018/attachment.html>


More information about the vc mailing list