[Git][NTPsec/ntpsec][master] 2 commits: Move recvbuff ring buffer handing from libntp/ to ntpd/.

Eric S. Raymond gitlab at mg.gitlab.com
Thu Aug 2 21:01:07 UTC 2018


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


Commits:
835d03eb by Eric S. Raymond at 2018-08-02T20:13:11Z
Move recvbuff ring buffer handing from libntp/ to ntpd/.

It doesn't need to be accessible deom anywhere else.


- - - - -
bd2b3fac by Eric S. Raymond at 2018-08-02T20:44:03Z
Fix a name ambiguity.

- - - - -


8 changed files:

- include/ntp.h
- include/recvbuff.h
- libntp/wscript
- libntp/recvbuff.c → ntpd/ntp_recvbuff.c
- ntpd/wscript
- tests/common/tests_main.c
- tests/libntp/recvbuff.c → tests/ntpd/recvbuff.c
- tests/wscript


Changes:

=====================================
include/ntp.h
=====================================
@@ -111,12 +111,12 @@ extern uint64_t ntp_random64 (void);
 
 
 /*
- * The endpt structure is used to hold the addresses and socket
+ * The netendpt structure is used to hold the addresses and socket
  * numbers of each of the local network addresses we are using.
  * endpt is unrelated to the select algorithm's struct endpoint.
  */
-typedef struct __endpt {
-	struct __endpt *elink;		/* endpt list link */
+typedef struct netendpt {
+	struct netendpt *elink;		/* endpt list link */
 	SOCKET		fd;		/* socket descriptor */
 	uint32_t	ifnum;		/* endpt instance count */
 	sockaddr_u	sin;		/* unicast address */


=====================================
include/recvbuff.h
=====================================
@@ -36,7 +36,7 @@ struct recvbuf {
 	recvbuf_t *	link;	/* next in list */
 	sockaddr_u	recv_srcadr;
 	sockaddr_u	srcadr;		/* where packet came from */
-	endpt *		dstadr;		/* address pkt arrived on */
+	struct netendpt *	dstadr;		/* address pkt arrived on */
 	SOCKET		fd;		/* fd on which it was received */
 	l_fp		recv_time;	/* time of arrival */
 	void		(*receiver)(struct recvbuf *); /* callback */


=====================================
libntp/wscript
=====================================
@@ -17,7 +17,6 @@ def build(ctx):
         "ntp_endian.c",
         "ntp_dns.c",
         "numtoa.c",
-        "recvbuff.c",
         "refidsmear.c",
         "socket.c",
         "socktoa.c",


=====================================
libntp/recvbuff.c → ntpd/ntp_recvbuff.c
=====================================


=====================================
ntpd/wscript
=====================================
@@ -53,6 +53,7 @@ def build(ctx):
         "ntp_filegen.c",
         "ntp_leapsec.c",
         "ntp_monitor.c",    # Needed by the restrict code
+        "ntp_recvbuff.c",
         "ntp_restrict.c",
         "ntp_util.c",
     ]


=====================================
tests/common/tests_main.c
=====================================
@@ -52,7 +52,6 @@ static void RunAllTests(void)
 	RUN_TEST_GROUP(numtoa);
 	RUN_TEST_GROUP(prettydate);
 	RUN_TEST_GROUP(random);
-	RUN_TEST_GROUP(recvbuff);
 	RUN_TEST_GROUP(refidsmear);
 	RUN_TEST_GROUP(socktoa);
 	RUN_TEST_GROUP(statestr);
@@ -71,6 +70,7 @@ static void RunAllTests(void)
 #ifdef TEST_NTPD
 	RUN_TEST_GROUP(leapsec);
 	RUN_TEST_GROUP(hackrestrict);
+	RUN_TEST_GROUP(recvbuff);
 #endif
 
 }


=====================================
tests/libntp/recvbuff.c → tests/ntpd/recvbuff.c
=====================================


=====================================
tests/wscript
=====================================
@@ -47,7 +47,6 @@ def build(ctx):
         "libntp/netof.c",
         "libntp/numtoa.c",
         "libntp/prettydate.c",
-        "libntp/recvbuff.c",
         "libntp/refidsmear.c",
         "libntp/socktoa.c",
         "libntp/statestr.c",
@@ -100,6 +99,7 @@ def build(ctx):
         # "ntpd/filegen.c",
         "ntpd/leapsec.c",
         "ntpd/restrict.c",
+        "ntpd/recvbuff.c",
     ] + common_source
 
     ctx.ntp_test(



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/7dfd651f8e3349dc8dddd86dc580b1402396896c...bd2b3fac38f4324a43483fbe3a1d5cea8d2be294

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/7dfd651f8e3349dc8dddd86dc580b1402396896c...bd2b3fac38f4324a43483fbe3a1d5cea8d2be294
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20180802/ae0f4c3f/attachment-0001.html>


More information about the vc mailing list