[ntpsec commit] sntp -> ntpdig renaming. All documentation updated as well.

Eric S. Raymond esr at ntpsec.org
Wed Oct 14 00:02:07 UTC 2015


Module:    ntpsec
Branch:    master
Commit:    4dd538b899b0b874da0a170d0b616adc28f9b9ce
Changeset: http://git.ntpsec.org/ntpsec/commit/?id=4dd538b899b0b874da0a170d0b616adc28f9b9ce

Author:    Eric S. Raymond <esr at thyrsus.com>
Date:      Tue Oct 13 20:01:19 2015 -0400

sntp -> ntpdig renaming.  All documentation updated as well.

---

 README                                            |  3 +-
 devel-docs/TODO                                   | 12 ++---
 docs/asciidoc.conf                                |  4 +-
 docs/includes/manual.txt                          |  2 +-
 docs/includes/ntpd-body.txt                       |  2 +-
 docs/includes/{sntp-body.txt => ntpdig-body.txt}  | 38 ++++++-------
 docs/index.txt                                    |  9 ++--
 docs/{sntp.txt => ntpdig.txt}                     |  4 +-
 include/ntp_intres.h                              |  2 +-
 ntpd/ntp.keys.txt                                 |  2 +-
 ntpd/ntp_timer.c                                  |  2 +-
 ntpd/ntpd-man.txt.in                              |  2 +-
 {sntp => ntpdig}/crypto.c                         |  4 +-
 {sntp => ntpdig}/crypto.h                         |  2 -
 {sntp => ntpdig}/data_formats.h                   |  0
 {sntp => ntpdig}/include/ntp.lic                  |  0
 {sntp => ntpdig}/kod_management.c                 |  0
 {sntp => ntpdig}/kod_management.h                 |  0
 {sntp => ntpdig}/log.c                            |  2 +-
 {sntp => ntpdig}/log.h                            |  2 +-
 {sntp => ntpdig}/main.c                           | 66 +++++++++++------------
 {sntp => ntpdig}/main.h                           |  2 +-
 {sntp => ntpdig}/networking.c                     |  6 +--
 {sntp => ntpdig}/networking.h                     |  0
 sntp/sntp-man.txt.in => ntpdig/ntpdig-man.txt.in  |  6 +--
 sntp/sntp.c => ntpdig/ntpdig.c                    |  2 +-
 {sntp => ntpdig}/utilities.c                      |  0
 {sntp => ntpdig}/utilities.h                      |  0
 {sntp => ntpdig}/wscript                          | 12 ++---
 ports/winnt/libntp/arc4wrap.c                     |  2 +-
 ports/winnt/scripts/mkver.bat                     |  8 +--
 scripts/lib/NTP/Util.pm                           | 12 ++---
 scripts/ntpdate                                   |  8 +--
 scripts/ntpsweep/ntpsweep.in                      |  4 +-
 scripts/t/lib/Test/Util.pm                        |  4 +-
 scripts/t/ntpsweep.t                              |  2 +-
 scripts/t/util.t                                  | 20 +++----
 tests/{sntp => ntpdig}/crypto.c                   |  2 +-
 tests/{sntp => ntpdig}/crypto.cpp                 |  4 +-
 tests/{sntp => ntpdig}/data/debug-input-lfp-bin   |  0
 tests/{sntp => ntpdig}/data/debug-input-lfp-dec   |  0
 tests/{sntp => ntpdig}/data/debug-input-pkt       |  0
 tests/{sntp => ntpdig}/data/key-test-ascii        |  0
 tests/{sntp => ntpdig}/data/key-test-comments     |  0
 tests/{sntp => ntpdig}/data/key-test-empty        |  0
 tests/{sntp => ntpdig}/data/key-test-hex          |  0
 tests/{sntp => ntpdig}/data/key-test-invalid-hex  |  0
 tests/{sntp => ntpdig}/data/kod-expected-multiple |  0
 tests/{sntp => ntpdig}/data/kod-expected-single   |  0
 tests/{sntp => ntpdig}/data/kod-test-blanks       |  0
 tests/{sntp => ntpdig}/data/kod-test-correct      |  0
 tests/{sntp => ntpdig}/data/kod-test-empty        |  0
 tests/{sntp => ntpdig}/fileHandlingTest.c         |  0
 tests/{sntp => ntpdig}/fileHandlingTest.h         |  2 +-
 tests/{sntp => ntpdig}/keyFile.c                  |  0
 tests/{sntp => ntpdig}/keyFile.cpp                |  0
 tests/{sntp => ntpdig}/kodDatabase.c              |  2 +-
 tests/{sntp => ntpdig}/kodDatabase.cpp            |  4 +-
 tests/{sntp => ntpdig}/kodFile.c                  |  0
 tests/{sntp => ntpdig}/kodFile.cpp                |  0
 tests/{sntp => ntpdig}/nameresolution.cpp         |  4 +-
 tests/{sntp => ntpdig}/networking.c               |  2 +-
 tests/{sntp => ntpdig}/networking.cpp             |  2 +-
 tests/ntpdig/ntpdigtest.h                         | 35 ++++++++++++
 tests/{sntp => ntpdig}/packetHandling.c           |  2 +-
 tests/{sntp => ntpdig}/packetHandling.cpp         |  4 +-
 tests/{sntp => ntpdig}/packetProcessing.cpp       |  4 +-
 tests/{sntp => ntpdig}/tests-runner               |  0
 tests/{sntp => ntpdig}/tests_main.c               |  2 +-
 tests/{sntp => ntpdig}/tests_main.cpp             |  2 +-
 tests/{sntp => ntpdig}/tests_main.h               |  0
 tests/{sntp => ntpdig}/utilities.cpp              |  6 +--
 tests/sntp/sntptest.h                             | 35 ------------
 wscript                                           |  4 +-
 74 files changed, 180 insertions(+), 182 deletions(-)

diff --git a/README b/README
index 9d3dc49..37f7347 100644
--- a/README
+++ b/README
@@ -76,7 +76,8 @@ scripts/::	Directory containing scripts to build the configuration
 		monitoring and support hold various perl and shell
 		scripts for visualizing synchronization and daemon startup.
 
-sntp/::		Query an NTP or SNTP server to report or set the time.
+ntpdig/::	Query an NTP or SNTP server to report or set the time.
+		(This tool was formerly sntp).
 
 tests/::	Self-test code.
 
diff --git a/devel-docs/TODO b/devel-docs/TODO
index 8f4a107..6a1980c 100644
--- a/devel-docs/TODO
+++ b/devel-docs/TODO
@@ -17,7 +17,7 @@ None right now. (Sep-22 2015)
 
 * @ expansion needs to be made to work fully for *.txt.in files. They
   are not yet doing file inclusions properly - for example, in
-  sntp/sntp-man.txt.in the @../docs/includes/sntp-body.txt@ is not
+  ntpdig/ntpdig-man.txt.in the @../docs/includes/ntpdig-body.txt@ is not
   interpreted.
 
 * The doc target should build manual pages. Previous item about @-expansion
@@ -123,10 +123,7 @@ a file and getting them from other NTP servers.
 * Similarly, includes/footer.txt is a tabular hack made to resemble the
   old HTML and should be cleaned up.
 
-* Do the ntp -> ntps name change.  Note: ntp-keygen -> ntpskeygen,
-  and perhaps sntp -> ntpss (so *all* programs have the ntps prefix).
-
-* The format and organization of the NEWS file needs a rethink.
+0* The format and organization of the NEWS file needs a rethink.
 
 * Phabricator-centered workflow needs to be written up and integrated
   with the website content I wrote for us.
@@ -157,12 +154,11 @@ a file and getting them from other NTP servers.
 
 * Hal says "We need a way to inspect/debug bits on the wire. `ntpdate
   -du' is the traditional approach."  Hal's straw man is a new program
-  rather than trying to make sntp do this.  Eric's prposed answer:
+  rather than trying to make sntp do this.  Eric's proposed answer:
   ntpshark, a command interpreter written around ntpproto.py and
   loosely modeled on wireshark.
 
-* Bigger game: can a Python front end to ntpproto.py replace sntp?
-  Or even ntpq?
+* Replace ntpq with a Python wrapper around ntpproto.py.
 
 * There is a mess around the symbols NO_MAIN_ALLOWED, BUILD_AS_LIB, and
   LIBNTP_C that needs to be refactored.  ntpd should *always* be built as
diff --git a/docs/asciidoc.conf b/docs/asciidoc.conf
index 0cf7e9a..19ecf91 100644
--- a/docs/asciidoc.conf
+++ b/docs/asciidoc.conf
@@ -17,6 +17,7 @@ project-bugtracker="NTPsec"
 millshome=http://www.eecis.udel.edu/~mills/
 ntp=ntp
 ntpd=ntpd
+ntpdig=ntpdig
 ntpdconf=ntpd.conf
 ntpkeygen=ntp-keygen
 ntpkeys=ntp.keys
@@ -24,7 +25,6 @@ ntpq=ntpq
 ntptickadj=ntptickadj
 ntptime=ntptime
 ntpwait=ntp-wait
-sntp=sntp
 # Annoyingly, these have to be *manually* synchronized with the headers
 # on their manual pages - asciidoc doesn't expand attributes in header lines.
 ntpdconfman=ntp.conf(5)
@@ -35,4 +35,4 @@ ntpqman=ntpq(1)
 ntptickadjman=tntptickadj(8)
 ntptimeman=ntptime(8)
 ntpwaitman=ntp-wait(8)
-sntpman=sntp(1)
+ntpdigman=ntpdig(1)
diff --git a/docs/includes/manual.txt b/docs/includes/manual.txt
index a4b9e53..62efd84 100644
--- a/docs/includes/manual.txt
+++ b/docs/includes/manual.txt
@@ -1,7 +1,7 @@
 == Program Manual Pages ==
 * link:ntpd.html[`{ntpd}` - Network Time Protocol (NTP) daemon]
 * link:ntpq.html[`{ntpq}` - standard NTP query program]
-* link:sntp.html[`{sntp}` - Simple Network Time Protocol (SNTP) client]
+* link:ntpdig.html[`{ntpdig}` - Simple Network Time Protocol (SNTP) client]
 * link:ntptrace.html[`ntptrace` - trace a chain of NTP servers back to the primary source]
 * link:ntptickadj.html[`{ntptickadj}` - set time-related kernel variables]
 * link:ntptime.html[`{ntptime}` - read and set kernel time variables]
diff --git a/docs/includes/ntpd-body.txt b/docs/includes/ntpd-body.txt
index a2bc94c..62b726c 100644
--- a/docs/includes/ntpd-body.txt
+++ b/docs/includes/ntpd-body.txt
@@ -414,7 +414,7 @@ starting {ntpdman}, but this was never more than a mediocre hack
 and is no longer needed. If you are following the instructions
 in <<starting>> and you still need to set the
 system time before starting {ntpd}, please open a bug report and
-document what is going on, and then look at using {sntpman}.
+document what is going on, and then look at using {ntpdigman}.
 
 There is a way to start {ntpdman} that often addresses all of
 the problems mentioned above.
diff --git a/docs/includes/sntp-body.txt b/docs/includes/ntpdig-body.txt
similarity index 87%
rename from docs/includes/sntp-body.txt
rename to docs/includes/ntpdig-body.txt
index 2e16c80..23e5a45 100644
--- a/docs/includes/sntp-body.txt
+++ b/docs/includes/ntpdig-body.txt
@@ -1,10 +1,10 @@
-// This is the body of the manual page for sntp.
+// This is the body of the manual page for ntpdig.
 // It's included in two places: once for the docs/ HTML
 // tree, and once to make an individual man page.
 
 == SYNOPSIS ==
 
-{sntp}
+{ntpdig}
     [--help | -?] [-4 | -6] [-a keynum] [-b bcaddress] [-B bctimeout]
     [-c] [-d] [-D debug-level] [-g delay] [-K kodfile] [-k keyfile]
     [-l logfile] [-M steplimit] [-o ntpver] [-r] [-S] [-s]
@@ -12,7 +12,7 @@
 
 == DESCRIPTION ==
 
-{sntp} can be used as an SNTP client to query a NTP or SNTP server and
+{ntpdig} can be used as an SNTP client to query a NTP or SNTP server and
 either display the time or set the local system's time (given suitable
 privilege). It can be run as an interactive command or from a _cron_
 job. NTP (the Network Time Protocol) and SNTP (the Simple Network Time
@@ -74,7 +74,7 @@ option (`-k`) for more details.
   Listen to the address specified for broadcast time sync. This option
   may appear an unlimited number of times.
 +
-If specified `{sntp}` will listen to the specified address for NTP
+If specified `{ntpdig}` will listen to the specified address for NTP
 broadcasts. The default maximum wait time can (and probably should) be
 modified with `-t`.
 
@@ -85,7 +85,7 @@ modified with `-t`.
 Requests from an NTP "client" to a "server" should never be sent more
 rapidly than one every 2 seconds. By default, any IPs returned as part
 of a DNS lookup are assumed to be for a single instance of {ntpd}, and
-therefore `{sntp}` will send queries to these IPs one after another,
+therefore `{ntpdig}` will send queries to these IPs one after another,
 with a 2-second gap in between each query.
 +
 The `-c` or `--concurrent` flag says that any IPs returned for the DNS
@@ -123,7 +123,7 @@ message will be displayed. The file will not be created.
 `-k` file-name, `--keyfile`=_file-name_::
   Look in this file for the key specified with `-a`.
 +
-This option specifies the keyfile. `{sntp}` will search for the key
+This option specifies the keyfile. `{ntpdig}` will search for the key
 specified with `-a` keyno in this file. See _{ntpkeysman}_ for more
 information.
 
@@ -149,34 +149,34 @@ situations demand different values.
   number as its argument.  Defaults to 4.  Seldom useful.
 
 `-r`, `--usereservedport`::
-  By default, `{sntp}` uses a UDP source port number selected by the
+  By default, `{ntpdig}` uses a UDP source port number selected by the
   operating system. When this option is used, the reserved NTP port 123
-  is used, which most often requires `{sntp}` be invoked as the superuser
+  is used, which most often requires `{ntpdig}` be invoked as the superuser
   (commonly "root"). This can help identify connectivity failures due to
   port-based firewalling which affect `{ntpd}`, which always uses source
   port 123.
 
 `-S`, `--step`::
-  By default, `{sntp}` displays the clock offset but does not attempt to
+  By default, `{ntpdig}` displays the clock offset but does not attempt to
   correct it. This option enables offset correction by stepping, that
   is, directly setting the clock to the corrected time. This typically
-  requires `{sntp}` be invoked as the superuser ("root").
+  requires `{ntpdig}` be invoked as the superuser ("root").
 
 `-s`, `--slew`::
-  By default, `{sntp}` displays the clock offset but does not attempt to
+  By default, `{ntpdig}` displays the clock offset but does not attempt to
   correct it. This option enables offset correction by slewing using
   adjtime(), which changes the rate of the clock for a period long
   enough to accomplish the required offset (phase) correction. This
-  typically requires `{sntp}` be invoked as the superuser ("root").
+  typically requires `{ntpdig}` be invoked as the superuser ("root").
 
 `-t` seconds, `--timeout`=_seconds_::
   The number of seconds to wait for responses. This option takes an
   integer number as its argument. The default _seconds_ for this option
   is: 5.
 +
-When waiting for a reply, `{sntp}` will wait the number of seconds
+When waiting for a reply, `{ntpdig}` will wait the number of seconds
 specified before giving up. The default should be more than enough for
-a unicast response. If `{sntp}` is only waiting for a broadcast response
+a unicast response. If `{ntpdig}` is only waiting for a broadcast response
 a longer timeout is likely needed.
 
 `--wait`, `--no-wait`::
@@ -190,19 +190,19 @@ If we are not setting the time, wait for all pending responses.
 
 == USAGE ==
 
-`{sntp} ntpserver.somewhere`::
+`{ntpdig} ntpserver.somewhere`::
   is the simplest use of this program and can be run as an unprivileged
   command to check the current time and error in the local clock.
-`{sntp} -Ss -M 128 ntpserver.somewhere`::
+`{ntpdig} -Ss -M 128 ntpserver.somewhere`::
   With suitable privilege, run as a command or from a _cron_(8) job,
-  `{sntp} -Ss -M 128 ntpserver.somewhere` will request the time from the
+  `{ntpdig} -Ss -M 128 ntpserver.somewhere` will request the time from the
   server, and if that server reports that it is synchronized then if the
   offset adjustment is less than 128 milliseconds the correction will be
   slewed, and if the correction is more than 128 milliseconds the
   correction will be stepped.
-`{sntp} -S ntpserver.somewhere`::
+`{ntpdig} -S ntpserver.somewhere`::
   With suitable privilege, run as a command or from a _cron_(8) job,
-  `{sntp} -S ntpserver.somewhere` will set (step) the local clock from a
+  `{ntpdig} -S ntpserver.somewhere` will set (step) the local clock from a
   synchronized specified server, like the `ntpdate` utility from older
   NTP implementations.
 
diff --git a/docs/index.txt b/docs/index.txt
index 965cd30..3e25aad 100644
--- a/docs/index.txt
+++ b/docs/index.txt
@@ -82,13 +82,16 @@ few will be user-visible:
 
 * The deprecated ntpdc utility, long since replaced by {ntpq}, has been removed.
 
-* The `tickadj` utility has been rebamed `ntptickadj` and is now fully
-  portable.
+* The `tickadj` utility has been renamed `ntptickadj`.
 
 * A number of obsolete refclocks have been removed.
 
+* The sntp program has been renamed {ntpdig} in order to make
+  NTP installables have a uniform name prefix and take up less
+  namespace.
+
 * The deprecated ntpdate program has been replaced with a shell
-  wrapper around {sntp}.
+  wrapper around {ntpdig}.
 
 * As noted above, Autokey support has been removed.
 
diff --git a/docs/sntp.txt b/docs/ntpdig.txt
similarity index 75%
rename from docs/sntp.txt
rename to docs/ntpdig.txt
index 8dfbb49..362f1b8 100644
--- a/docs/sntp.txt
+++ b/docs/ntpdig.txt
@@ -1,4 +1,4 @@
-= `{sntp}` - Simple Network Time Protocol (SNTP) Client =
+= `{ntpdig}` - Simple Network Time Protocol (SNTP) Client =
 
 [cols="10%,90%",frame="none",grid="none",style="verse"]
 |==============================
@@ -11,7 +11,7 @@ S is for snakeoil.
 
 '''''
 
-include::includes/sntp-body.txt[]
+include::includes/ntpdig-body.txt[]
 
 '''''
 
diff --git a/include/ntp_intres.h b/include/ntp_intres.h
index f146225..1e67bc9 100644
--- a/include/ntp_intres.h
+++ b/include/ntp_intres.h
@@ -39,7 +39,7 @@ extern int getnameinfo_sometime(sockaddr_u *, size_t, size_t, int,
 				gni_sometime_callback, void *);
 #endif	/* USE_WORKER */
 
-/* intres_timeout_req() is provided by the client, ntpd or sntp. */
+/* intres_timeout_req() is provided by the client, ntpd or ntpdig. */
 extern void intres_timeout_req(u_int);
 
 #endif	/* GUARD_NTP_INTRES_H */
diff --git a/ntpd/ntp.keys.txt b/ntpd/ntp.keys.txt
index aa8dd2a..9ef0911 100644
--- a/ntpd/ntp.keys.txt
+++ b/ntpd/ntp.keys.txt
@@ -54,6 +54,6 @@ format.
 
 == SEE ALSO ==
 
-{ntpconfman}, {ntpdman}, {ntpqman}, {sntpman}.
+{ntpconfman}, {ntpdman}, {ntpqman}, {ntpdigman}.
 
 // end
diff --git a/ntpd/ntp_timer.c b/ntpd/ntp_timer.c
index f980df1..0ef4bf3 100644
--- a/ntpd/ntp_timer.c
+++ b/ntpd/ntp_timer.c
@@ -218,7 +218,7 @@ init_timer(void)
  * timeout expires, worker_idle_timer_fired() is invoked (again, in the
  * parent).
  *
- * sntp and ntpd each provide implementations adapted to their timers.
+ * ntpdig and ntpd each provide implementations adapted to their timers.
  */
 void
 intres_timeout_req(
diff --git a/ntpd/ntpd-man.txt.in b/ntpd/ntpd-man.txt.in
index 65f2b49..3d73df5 100644
--- a/ntpd/ntpd-man.txt.in
+++ b/ntpd/ntpd-man.txt.in
@@ -18,4 +18,4 @@ One of the following exit values will be returned:
 
 == SEE ALSO ==
 
-{ntpconfman}, {ntpqman}, {sntpman}.
+{ntpconfman}, {ntpqman}, {ntpdigman}.
diff --git a/sntp/crypto.c b/ntpdig/crypto.c
similarity index 96%
rename from sntp/crypto.c
rename to ntpdig/crypto.c
index 715924b..c12a401 100644
--- a/sntp/crypto.c
+++ b/ntpdig/crypto.c
@@ -104,12 +104,12 @@ auth_init(
 
 	if (keyf == NULL) {
 		if (1 || debug)
-			printf("sntp auth_init: Couldn't open key file %s for reading!\n", keyfile);
+			printf("ntpdig auth_init: Couldn't open key file %s for reading!\n", keyfile);
 		return -1;
 	}
 	if (feof(keyf)) {
 		if (1 || debug)
-			printf("sntp auth_init: Key file %s is empty!\n", keyfile);
+			printf("ntpdig auth_init: Key file %s is empty!\n", keyfile);
 		fclose(keyf);
 		return -1;
 	}
diff --git a/sntp/crypto.h b/ntpdig/crypto.h
similarity index 95%
rename from sntp/crypto.h
rename to ntpdig/crypto.h
index b8c95a1..08d06cd 100644
--- a/sntp/crypto.h
+++ b/ntpdig/crypto.h
@@ -13,8 +13,6 @@
 
 #define LEN_PKT_MAC	LEN_PKT_NOMAC + sizeof(uint32_t)
 
-/* #include "sntp-opts.h" */
-
 struct key {
 	struct key *next;
 	int key_id;
diff --git a/sntp/data_formats.h b/ntpdig/data_formats.h
similarity index 100%
rename from sntp/data_formats.h
rename to ntpdig/data_formats.h
diff --git a/sntp/include/ntp.lic b/ntpdig/include/ntp.lic
similarity index 100%
rename from sntp/include/ntp.lic
rename to ntpdig/include/ntp.lic
diff --git a/sntp/kod_management.c b/ntpdig/kod_management.c
similarity index 100%
rename from sntp/kod_management.c
rename to ntpdig/kod_management.c
diff --git a/sntp/kod_management.h b/ntpdig/kod_management.h
similarity index 100%
rename from sntp/kod_management.h
rename to ntpdig/kod_management.h
diff --git a/sntp/log.c b/ntpdig/log.c
similarity index 95%
rename from sntp/log.c
rename to ntpdig/log.c
index 89f94e9..9d9ce3f 100644
--- a/sntp/log.c
+++ b/ntpdig/log.c
@@ -7,7 +7,7 @@ char *progname;		/* for msyslog use too */
 static void cleanup_log(void);
 
 void
-sntp_init_logging(
+ntpdig_init_logging(
 	const char *prog
 	)
 {
diff --git a/sntp/log.h b/ntpdig/log.h
similarity index 90%
rename from sntp/log.h
rename to ntpdig/log.h
index 4131f29..0b56fca 100644
--- a/sntp/log.h
+++ b/ntpdig/log.h
@@ -16,7 +16,7 @@
 # define OPENLOG_FAC	LOG_DAEMON
 #endif
 
-void sntp_init_logging(const char *program);
+void ntpdig_init_logging(const char *program);
 void open_logfile(const char *logfile);
 
 extern char *progname;		/* for msyslog use too */
diff --git a/sntp/main.c b/ntpdig/main.c
similarity index 95%
rename from sntp/main.c
rename to ntpdig/main.c
index c9927c8..3e74b53 100644
--- a/sntp/main.c
+++ b/ntpdig/main.c
@@ -97,10 +97,10 @@ u_long current_time;		/* libntp/authkeys.c */
 
 void open_sockets(void);
 void handle_lookup(const char *name, int flags);
-void sntp_addremove_fd(int fd, int is_pipe, int remove_it);
+void ntpdig_addremove_fd(int fd, int is_pipe, int remove_it);
 void worker_timeout(evutil_socket_t, short, void *);
 void worker_resp_cb(evutil_socket_t, short, void *);
-void sntp_name_resolved(int, int, void *, const char *, const char *,
+void ntpdig_name_resolved(int, int, void *, const char *, const char *,
 			const struct addrinfo *,
 			const struct addrinfo *);
 void queue_xmt(SOCKET sock, struct dns_ctx *dctx, sent_pkt *spkt,
@@ -112,7 +112,7 @@ void timeout_query(sent_pkt *);
 void timeout_queries(void);
 void sock_cb(evutil_socket_t, short, void *);
 void check_exit_conditions(void);
-void sntp_libevent_log_cb(int, const char *);
+void ntpdig_libevent_log_cb(int, const char *);
 void set_li_vn_mode(struct pkt *spkt, char leap, char version, char mode);
 int  set_time(double offset);
 void dec_pending_ntp(const char *, sockaddr_u *);
@@ -165,10 +165,10 @@ static int opt_wait = false;
  * The actual main function.
  */
 int
-sntp_main (
+ntpdig_main (
 	int argc,
 	char **argv,
-	const char *sntpVersion
+	const char *ntpdigVersion
 	)
 {
 	int			i;
@@ -178,7 +178,7 @@ sntp_main (
 	struct event_config *	evcfg;
 
 	/* Initialize logging system - sets up progname */
-	sntp_init_logging(argv[0]);
+	ntpdig_init_logging(argv[0]);
 
 	if (!libevent_version_ok())
 		exit(EXIT_SOFTWARE);
@@ -251,7 +251,7 @@ sntp_main (
 		opt_timeout = atof(ntp_optarg);
 		break;
 	    case 'V':
-		printf("sntp %s\n", sntpVersion);
+		printf("ntpdig %s\n", ntpdigVersion);
 		exit(0);
 	    case 'w':
 		opt_wait = true;
@@ -284,7 +284,7 @@ sntp_main (
 	if (opt_logfile)
 		open_logfile(opt_logfile);
 
-	msyslog(LOG_INFO, "sntp %s", sntpVersion);
+	msyslog(LOG_INFO, "ntpdig %s", ntpdigVersion);
 
 	if (0 == argc && !opt_broadcast && !opt_concurrent) {
 		printf("%s: Must supply at least one of -b hostname, -c hostname, or hostname.\n",
@@ -334,7 +334,7 @@ sntp_main (
 	**
 	** HMS: What exactly does the above mean?
 	*/
-	event_set_log_callback(&sntp_libevent_log_cb);
+	event_set_log_callback(&ntpdig_libevent_log_cb);
 	if (debug > 0)
 		event_enable_debug_mode();
 #ifdef USE_WORK_THREAD
@@ -359,7 +359,7 @@ sntp_main (
 
 	/* wire into intres resolver */
 	worker_per_query = true;
-	addremove_io_fd = &sntp_addremove_fd;
+	addremove_io_fd = &ntpdig_addremove_fd;
 
 	open_sockets();
 
@@ -518,7 +518,7 @@ handle_lookup(
 
 	++n_pending_dns;
 	getaddrinfo_sometime(name, "123", &hints, 0,
-			     &sntp_name_resolved, ctx);
+			     &ntpdig_name_resolved, ctx);
 }
 
 
@@ -532,7 +532,7 @@ handle_lookup(
 ** - decrement n_pending_dns
 */
 void
-sntp_name_resolved(
+ntpdig_name_resolved(
 	int			rescode,
 	int			gai_errno,
 	void *			context,
@@ -593,7 +593,7 @@ sntp_name_resolved(
 				break;
 
 			default:
-				msyslog(LOG_ERR, "sntp_name_resolved: unexpected ai_family: %d",
+				msyslog(LOG_ERR, "ntpdig_name_resolved: unexpected ai_family: %d",
 					ai->ai_family);
 				exit(1);
 				break;
@@ -1016,7 +1016,7 @@ sock_cb(
 /*
  * check_exit_conditions()
  *
- * If sntp has a reply, ask the event loop to stop after this round of
+ * If ntpdig has a reply, ask the event loop to stop after this round of
  * callbacks, unless --wait was used.
  */
 void
@@ -1034,10 +1034,10 @@ check_exit_conditions(void)
 
 
 /*
- * sntp_addremove_fd() is invoked by the intres blocking worker code
+ * ntpdig_addremove_fd() is invoked by the intres blocking worker code
  * to read from a pipe, or to stop same.
  */
-void sntp_addremove_fd(
+void ntpdig_addremove_fd(
 	int	fd,
 	int	is_pipe,
 	int	remove_it
@@ -1076,7 +1076,7 @@ void sntp_addremove_fd(
 		       &worker_resp_cb, c);
 	if (NULL == ev) {
 		msyslog(LOG_ERR,
-			"sntp_addremove_fd: event_new(base, fd) failed!");
+			"ntpdig_addremove_fd: event_new(base, fd) failed!");
 		return;
 	}
 	c->resp_read_ctx = ev;
@@ -1110,7 +1110,7 @@ worker_resp_cb(
  * timeout expires, worker_idle_timer_fired() is invoked (again, in the
  * parent).
  *
- * sntp and ntpd each provide implementations adapted to their timers.
+ * ntpdig and ntpd each provide implementations adapted to their timers.
  */
 void
 intres_timeout_req(
@@ -1151,7 +1151,7 @@ worker_timeout(
 
 
 void
-sntp_libevent_log_cb(
+ntpdig_libevent_log_cb(
 	int		severity,
 	const char *	msg
 	)
@@ -1235,7 +1235,7 @@ handle_pkt(
 	double		offset;
 	double		precision;
 	double		synch_distance;
-	char *		p_SNTP_PRETEND_TIME;
+	char *		p_NTPDIG_PRETEND_TIME;
 	time_t		pretend_time;
 #if SIZEOF_TIME_T == 8
 	long long	ll;
@@ -1286,14 +1286,14 @@ handle_pkt(
 
 		gettimeofday_cached(base, &tv_dst);
 
-		p_SNTP_PRETEND_TIME = getenv("SNTP_PRETEND_TIME");
-		if (p_SNTP_PRETEND_TIME) {
+		p_NTPDIG_PRETEND_TIME = getenv("NTPDIG_PRETEND_TIME");
+		if (p_NTPDIG_PRETEND_TIME) {
 			pretend_time = 0;
 #if SIZEOF_TIME_T == 4
-			if (1 == sscanf(p_SNTP_PRETEND_TIME, "%ld", &l))
+			if (1 == sscanf(p_NTPDIG_PRETEND_TIME, "%ld", &l))
 				pretend_time = (time_t)l;
 #elif SIZEOF_TIME_T == 8
-			if (1 == sscanf(p_SNTP_PRETEND_TIME, "%lld", &ll))
+			if (1 == sscanf(p_NTPDIG_PRETEND_TIME, "%lld", &ll))
 				pretend_time = (time_t)ll;
 #else
 # include "GRONK: unexpected value for SIZEOF_TIME_T"
@@ -1354,7 +1354,7 @@ handle_pkt(
 			    : "");
 		free(ts_str);
 
-		if (p_SNTP_PRETEND_TIME)
+		if (p_NTPDIG_PRETEND_TIME)
 			return EXIT_SUCCESS;
 
 		if (!time_adjusted && (opt_step || opt_slew))
@@ -1441,24 +1441,24 @@ offset_calculation(
 
 #ifdef DEBUG
 	if (debug > 3) {
-		printf("sntp rootdelay: %f\n", FPTOD(p_rdly));
-		printf("sntp rootdisp: %f\n", FPTOD(p_rdsp));
-		printf("sntp syncdist: %f\n", *synch_distance);
+		printf("ntpdig rootdelay: %f\n", FPTOD(p_rdly));
+		printf("ntpdig rootdisp: %f\n", FPTOD(p_rdsp));
+		printf("ntpdig syncdist: %f\n", *synch_distance);
 
 		pkt_output(rpkt, rpktl, stdout);
 
-		printf("sntp offset_calculation: rpkt->reftime:\n");
+		printf("ntpdig offset_calculation: rpkt->reftime:\n");
 		l_fp_output(&p_ref, stdout);
-		printf("sntp offset_calculation: rpkt->org:\n");
+		printf("ntpdig offset_calculation: rpkt->org:\n");
 		l_fp_output(&p_org, stdout);
-		printf("sntp offset_calculation: rpkt->rec:\n");
+		printf("ntpdig offset_calculation: rpkt->rec:\n");
 		l_fp_output(&p_rec, stdout);
-		printf("sntp offset_calculation: rpkt->xmt:\n");
+		printf("ntpdig offset_calculation: rpkt->xmt:\n");
 		l_fp_output(&p_xmt, stdout);
 	}
 #endif
 
-	TRACE(3, ("sntp offset_calculation:\trec - org t21: %.6f\n"
+	TRACE(3, ("ntpdig offset_calculation:\trec - org t21: %.6f\n"
 		  "\txmt - dst t34: %.6f\tdelta: %.6f\toffset: %.6f\n",
 		  t21, t34, delta, *offset));
 
diff --git a/sntp/main.h b/ntpdig/main.h
similarity index 92%
rename from sntp/main.h
rename to ntpdig/main.h
index 97d63a0..90c357b 100644
--- a/sntp/main.h
+++ b/ntpdig/main.h
@@ -15,7 +15,7 @@
 #include "crypto.h"
 
 void	set_li_vn_mode(struct pkt *spkt, char leap, char version, char mode); 
-extern int sntp_main(int argc, char **argv, const char *);
+extern int ntpdig_main(int argc, char **argv, const char *);
 int	generate_pkt(struct pkt *x_pkt, const struct timeval *tv_xmt,
 				  int key_id, struct key *pkt_key);
 int	handle_pkt(int rpktl, struct pkt *rpkt, sockaddr_u *host,
diff --git a/sntp/networking.c b/ntpdig/networking.c
similarity index 97%
rename from sntp/networking.c
rename to ntpdig/networking.c
index b296b6b..84dfb98 100644
--- a/sntp/networking.c
+++ b/ntpdig/networking.c
@@ -16,11 +16,11 @@ sendpkt (
 
 #ifdef DEBUG
 	if (debug > 2) {
-		printf("sntp sendpkt: Packet data:\n");
+		printf("ntpdig sendpkt: Packet data:\n");
 		pkt_output(pkt, len, stdout);
 	}
 #endif
-	TRACE(1, ("sntp sendpkt: Sending packet to %s ...\n",
+	TRACE(1, ("ntpdig sendpkt: Sending packet to %s ...\n",
 		  sptoa(dest)));
 
 	cc = sendto(rsock, (void *)pkt, len, 0, &dest->sa, 
@@ -192,7 +192,7 @@ process_pkt (
 		}
 		/* Yay! Things worked out! */
 		is_authentic = 1;
-		TRACE(1, ("sntp %s: packet from %s authenticated using key id %d.\n",
+		TRACE(1, ("ntpdig %s: packet from %s authenticated using key id %d.\n",
 			  func_name, stoa(sender), key_id));
 		break;
 
diff --git a/sntp/networking.h b/ntpdig/networking.h
similarity index 100%
rename from sntp/networking.h
rename to ntpdig/networking.h
diff --git a/sntp/sntp-man.txt.in b/ntpdig/ntpdig-man.txt.in
similarity index 68%
rename from sntp/sntp-man.txt.in
rename to ntpdig/ntpdig-man.txt.in
index 3e4f6b9..e3f0951 100644
--- a/sntp/sntp-man.txt.in
+++ b/ntpdig/ntpdig-man.txt.in
@@ -1,10 +1,10 @@
-= sntp(1) =
+= ntpdig(1) =
 :doctype: manpage
 
 == NAME ==
-{sntp} - standard Simple Network Time Protocol client program
+{ntpdig} - standard Simple Network Time Protocol client program
 
- at ../docs/includes/sntp-body.txt@
+ at ../docs/includes/ntpdig-body.txt@
 
 == EXIT STATUS ==
 
diff --git a/sntp/sntp.c b/ntpdig/ntpdig.c
similarity index 66%
rename from sntp/sntp.c
rename to ntpdig/ntpdig.c
index 2e3bfec..883d1ca 100644
--- a/sntp/sntp.c
+++ b/ntpdig/ntpdig.c
@@ -8,5 +8,5 @@ main (
 	char **	argv
 	) 
 {
-	return sntp_main(argc, argv, Version);
+	return ntpdig_main(argc, argv, Version);
 }
diff --git a/sntp/utilities.c b/ntpdig/utilities.c
similarity index 100%
rename from sntp/utilities.c
rename to ntpdig/utilities.c
diff --git a/sntp/utilities.h b/ntpdig/utilities.h
similarity index 100%
rename from sntp/utilities.h
rename to ntpdig/utilities.h
diff --git a/sntp/wscript b/ntpdig/wscript
similarity index 66%
rename from sntp/wscript
rename to ntpdig/wscript
index 1779bd0..e41857c 100644
--- a/sntp/wscript
+++ b/ntpdig/wscript
@@ -2,23 +2,23 @@ def build(ctx):
 	srcnode = ctx.srcnode.abspath()
 	bldnode = ctx.bldnode.abspath()
 
-	sntp_source = [
+	ntpdig_source = [
 		"crypto.c",
 		"kod_management.c",
 		"log.c",
 		"main.c",
 		"networking.c",
-		"sntp.c",
+		"ntpdig.c",
 		"utilities.c"
 	]
 
 	ctx(
-		target		= "sntp",
+		target		= "ntpdig",
 		features	= "c cprogram bld_include src_include libisc_include ntp_version",
-		use			= "ntp isc opts M PTHREAD sntp_obj LIBEVENT LIBEVENT_CORE LIBEVENT_PTHREADS RT CRYPTO",
-		source		= sntp_source,
+		use			= "ntp isc opts M PTHREAD ntpdig_obj LIBEVENT LIBEVENT_CORE LIBEVENT_PTHREADS RT CRYPTO",
+		source		= ntpdig_source,
 		includes	= [
-						"%s/sntp/" % bldnode
+						"%s/ntpdig/" % bldnode
 					] + ctx.env.PLATFORM_INCLUDES, # XXX: Hack needs to use libevent_inc or something else.
 		install_path= "${PREFIX}/bin/",
 	)
diff --git a/ports/winnt/libntp/arc4wrap.c b/ports/winnt/libntp/arc4wrap.c
index 9513d15..641a666 100644
--- a/ports/winnt/libntp/arc4wrap.c
+++ b/ports/winnt/libntp/arc4wrap.c
@@ -81,4 +81,4 @@ private_unlock_(void)
 }
 
 #pragma warning(disable : 4244)
-#include "../../../sntp/libevent/arc4random.c"
+#include "../../../ntpdig/libevent/arc4random.c"
diff --git a/ports/winnt/scripts/mkver.bat b/ports/winnt/scripts/mkver.bat
index 4d55d2f..ac2293a 100755
--- a/ports/winnt/scripts/mkver.bat
+++ b/ports/winnt/scripts/mkver.bat
@@ -243,13 +243,13 @@ REM ****************************************************************************
 
 :NOBK
 	REM ** If that was not successful, we'll take a look into a version file, if available
-	IF EXIST ..\..\..\..\sntp\scm-rev (
-		IF "%CSET%"=="" FOR /F "TOKENS=1" %%a IN ('type ..\..\..\..\sntp\scm-rev') DO @SET CSET=%%a
+	IF EXIST ..\..\..\..\ntpdig\scm-rev (
+		IF "%CSET%"=="" FOR /F "TOKENS=1" %%a IN ('type ..\..\..\..\ntpdig\scm-rev') DO @SET CSET=%%a
 	)
 	REM next if block can go away once all windows compilers are building in
 	REM ports\winnt\<compiler dir>\<binary name dir> (ports\winnt\vs2008\ntpd)
-	IF EXIST ..\..\..\sntp\scm-rev (
-		IF "%CSET%"=="" FOR /F "TOKENS=1" %%a IN ('type ..\..\..\sntp\scm-rev') DO @SET CSET=%%a
+	IF EXIST ..\..\..\ntpdig\scm-rev (
+		IF "%CSET%"=="" FOR /F "TOKENS=1" %%a IN ('type ..\..\..\ntpdig\scm-rev') DO @SET CSET=%%a
 	)
 
 	REM ** Now, expand our version number with the CSet revision, if we managed to get one
diff --git a/scripts/lib/NTP/Util.pm b/scripts/lib/NTP/Util.pm
index f37aeaa..821721c 100644
--- a/scripts/lib/NTP/Util.pm
+++ b/scripts/lib/NTP/Util.pm
@@ -5,10 +5,10 @@ use Exporter 'import';
 use Carp;
 use version 0.77;
 
-our @EXPORT_OK = qw(ntp_read_vars do_dns ntp_peers ntp_sntp_line);
+our @EXPORT_OK = qw(ntp_read_vars do_dns ntp_peers ntp_ntpdig_line);
 
 my $ntpq_path = 'ntpq';
-my $sntp_path = 'sntp';
+my $ntpdig_path = 'ntpdig';
 
 our $IP_AGNOSTIC;
 
@@ -126,11 +126,11 @@ sub ntp_peers {
 }
 
 # TODO: we don't need this but it would be nice to have all the line parsed
-sub ntp_sntp_line {
+sub ntp_ntpdig_line {
     my ($host) = @_;
 
-    my $cmd = "$sntp_path $host |";
-    open my $fh, $cmd or croak "Could not start sntp: $!";
+    my $cmd = "$ntpdig_path $host |";
+    open my $fh, $cmd or croak "Could not start ntpdig: $!";
 
     my ($offset, $stratum);
     while (<$fh>) {
@@ -141,7 +141,7 @@ sub ntp_sntp_line {
         $offset = $output[3];
         ($stratum = $output[7]) =~ s/s(\d{1,2})/$1/;
     }
-    close $fh or croak "running sntp failed: $! (exit status $?)";
+    close $fh or croak "running ntpdig failed: $! (exit status $?)";
     return ($offset, $stratum);
 }
 
diff --git a/scripts/ntpdate b/scripts/ntpdate
index ed488a6..2aa6930 100755
--- a/scripts/ntpdate
+++ b/scripts/ntpdate
@@ -5,15 +5,15 @@
 # Not documented, as this is strictly a backward-compatibility shim. It's
 # based on the recipes at
 #           http://support.ntp.org/bin/view/Dev/DeprecatingNtpdate
-# with corrections for modern sntp options.
+# with corrections for modern ntpdig options.
 #
 # Debug this by giving the -n option, which causes it to echo the
-# generated sntp command rather than executing it.
+# generated ntpdig command rather than executing it.
 #
 # Known bug: The -e and -p options of ntpdate are not yet
 # implemented.
 #
-# ntpdate sntp    ntpd    What it does
+# ntpdate ntpdig  ntpd    What it does
 # -4      -4      -q -4   Resolve DNS lookups to A records         
 # -6      -6      -q -6   Resolve DNS lookups to AAAA records      
 # -a N    -a N    -q      Authentication   
@@ -71,7 +71,7 @@ then
     ADJUST="-s -j"
 fi
 
-$echo sntp $ADJUST $TIMEOUT $PASSTHROUGH $*
+$echo ntpdig $ADJUST $TIMEOUT $PASSTHROUGH $*
 
 #end
 
diff --git a/scripts/ntpsweep/ntpsweep.in b/scripts/ntpsweep/ntpsweep.in
index 70e33fe..300989f 100644
--- a/scripts/ntpsweep/ntpsweep.in
+++ b/scripts/ntpsweep/ntpsweep.in
@@ -22,7 +22,7 @@ package ntpsweep;
 use 5.006_000;
 use strict;
 use lib "@PERLLIBDIR@";
-use NTP::Util qw(do_dns ntp_read_vars ntp_peers ntp_sntp_line);
+use NTP::Util qw(do_dns ntp_read_vars ntp_peers ntp_ntpdig_line);
 
 (my $program = $0) =~ s%.*/(.+?)(.pl)?$%$1%;
 my ($showpeers, $maxlevel, $strip);
@@ -109,7 +109,7 @@ sub scan_host {
         $known_host = 1;
     }
     else {
-        ($offset, $stratum) = ntp_sntp_line($host);
+        ($offset, $stratum) = ntp_ntpdig_line($host);
 
         # got answers ? If so, go on.
         if ($stratum) {
diff --git a/scripts/t/lib/Test/Util.pm b/scripts/t/lib/Test/Util.pm
index ea10a11..e04816a 100644
--- a/scripts/t/lib/Test/Util.pm
+++ b/scripts/t/lib/Test/Util.pm
@@ -78,12 +78,12 @@ my $override = Sub::Override->new;
                 return shift @hosts 
             }) if exists $mock{dns};
 
-        $override->replace($package.'::ntp_sntp_line' => sub { 
+        $override->replace($package.'::ntp_ntpdig_line' => sub { 
                 return () if !@offset_stratums;
                 croak 'offset_stratums elements should be ARRAY refs' 
                     if ref $offset_stratums[0] ne 'ARRAY';
                 return @{ shift @offset_stratums };
-            }) if exists $mock{sntp_line};
+            }) if exists $mock{ntpdig_line};
     }
 
     sub run_mocked {
diff --git a/scripts/t/ntpsweep.t b/scripts/t/ntpsweep.t
index be97482..b22eb24 100644
--- a/scripts/t/ntpsweep.t
+++ b/scripts/t/ntpsweep.t
@@ -18,7 +18,7 @@ require "./$script_name";
 
 check_help("./$script_name", @options);
 
-mock_ntp_util('ntpsweep', read_vars => 1, peers => 1, sntp_line => 1, dns => 1);
+mock_ntp_util('ntpsweep', read_vars => 1, peers => 1, ntpdig_line => 1, dns => 1);
 
 my $header = <<'HEADER';
 Host                             st offset(s) version     system       processor
diff --git a/scripts/t/util.t b/scripts/t/util.t
index 1154086..f75a466 100644
--- a/scripts/t/util.t
+++ b/scripts/t/util.t
@@ -25,10 +25,10 @@ BEGIN {
         ntp_peers(@{ delete $opts{opts} || []});
     }
 
-    sub test_sntp_line {
+    sub test_ntpdig_line {
         my (%opts) = @_;
         _parse_opts(%opts);
-        ntp_sntp_line(@{ delete $opts{opts} || []});
+        ntp_ntpdig_line(@{ delete $opts{opts} || []});
     }
 
     sub _parse_opts {
@@ -40,7 +40,7 @@ BEGIN {
 }
 
 require_ok 'NTP::Util';
-NTP::Util->import(qw(ntp_read_vars ntp_peers ntp_sntp_line));
+NTP::Util->import(qw(ntp_read_vars ntp_peers ntp_ntpdig_line));
 
 eval {
     test_read_vars(opts => [0, []], fail_open => 1,
@@ -161,19 +161,19 @@ PEER_END
 );
 
 eval {
-    test_sntp_line(opts => ['localhost'], fail_open => 1,
-        open_str => "sntp localhost |");
+    test_ntpdig_line(opts => ['localhost'], fail_open => 1,
+        open_str => "ntpdig localhost |");
 } or do {
-    like($@, qr/Could not start sntp: /, 'ntp_sntp_line dies on failed execution');
+    like($@, qr/Could not start ntpdig: /, 'ntp_ntpdig_line dies on failed execution');
 };
 
 is_deeply(
-    [test_sntp_line(opts => ['localhost'], 
-        output => <<'SNTP_END')],
-sntp 4.2.7p379 at 1.2946-o Tue Aug 27 18:55:18 UTC 2013 (4)
+    [test_ntpdig_line(opts => ['localhost'], 
+        output => <<'NTPDIG_END')],
+ntpdig 4.2.7p379 at 1.2946-o Tue Aug 27 18:55:18 UTC 2013 (4)
 Can't open KOD db file /var/db/ntp-kod for writing: Permission denied
 2013-09-19 22:49:29.381062 (-0100) +0.000007 +/- 0.077138 localhost 127.0.0.1 s4
-SNTP_END
+NTPDIG_END
     ['+0.000007', '4'],
     'stratum and offset parsed'
 );
diff --git a/tests/sntp/crypto.c b/tests/ntpdig/crypto.c
similarity index 99%
rename from tests/sntp/crypto.c
rename to tests/ntpdig/crypto.c
index 9286bb1..9b76e5a 100644
--- a/tests/sntp/crypto.c
+++ b/tests/ntpdig/crypto.c
@@ -7,7 +7,7 @@ TEST_SETUP(crypto) {}
 
 TEST_TEAR_DOWN(crypto) {}
 
-#include "sntptest.h"
+#include "ntpdigtest.h"
 
 #include "crypto.h"
 
diff --git a/tests/sntp/crypto.cpp b/tests/ntpdig/crypto.cpp
similarity index 98%
rename from tests/sntp/crypto.cpp
rename to tests/ntpdig/crypto.cpp
index 61ae004..1487256 100644
--- a/tests/sntp/crypto.cpp
+++ b/tests/ntpdig/crypto.cpp
@@ -9,13 +9,13 @@ TEST_SETUP(crypto) {}
 
 TEST_TEAR_DOWN(crypto) {}
 
-#include "sntptest.h"
+#include "ntpdigtest.h"
 
 extern "C" {
 #include "crypto.h"
 };
 
-class cryptoTest : public sntptest {
+class cryptoTest : public ntpdigtest {
 };
 
 #define MD5_LENGTH 16
diff --git a/tests/sntp/data/debug-input-lfp-bin b/tests/ntpdig/data/debug-input-lfp-bin
similarity index 100%
rename from tests/sntp/data/debug-input-lfp-bin
rename to tests/ntpdig/data/debug-input-lfp-bin
diff --git a/tests/sntp/data/debug-input-lfp-dec b/tests/ntpdig/data/debug-input-lfp-dec
similarity index 100%
rename from tests/sntp/data/debug-input-lfp-dec
rename to tests/ntpdig/data/debug-input-lfp-dec
diff --git a/tests/sntp/data/debug-input-pkt b/tests/ntpdig/data/debug-input-pkt
similarity index 100%
rename from tests/sntp/data/debug-input-pkt
rename to tests/ntpdig/data/debug-input-pkt
diff --git a/tests/sntp/data/key-test-ascii b/tests/ntpdig/data/key-test-ascii
similarity index 100%
rename from tests/sntp/data/key-test-ascii
rename to tests/ntpdig/data/key-test-ascii
diff --git a/tests/sntp/data/key-test-comments b/tests/ntpdig/data/key-test-comments
similarity index 100%
rename from tests/sntp/data/key-test-comments
rename to tests/ntpdig/data/key-test-comments
diff --git a/tests/sntp/data/key-test-empty b/tests/ntpdig/data/key-test-empty
similarity index 100%
rename from tests/sntp/data/key-test-empty
rename to tests/ntpdig/data/key-test-empty
diff --git a/tests/sntp/data/key-test-hex b/tests/ntpdig/data/key-test-hex
similarity index 100%
rename from tests/sntp/data/key-test-hex
rename to tests/ntpdig/data/key-test-hex
diff --git a/tests/sntp/data/key-test-invalid-hex b/tests/ntpdig/data/key-test-invalid-hex
similarity index 100%
rename from tests/sntp/data/key-test-invalid-hex
rename to tests/ntpdig/data/key-test-invalid-hex
diff --git a/tests/sntp/data/kod-expected-multiple b/tests/ntpdig/data/kod-expected-multiple
similarity index 100%
rename from tests/sntp/data/kod-expected-multiple
rename to tests/ntpdig/data/kod-expected-multiple
diff --git a/tests/sntp/data/kod-expected-single b/tests/ntpdig/data/kod-expected-single
similarity index 100%
rename from tests/sntp/data/kod-expected-single
rename to tests/ntpdig/data/kod-expected-single
diff --git a/tests/sntp/data/kod-test-blanks b/tests/ntpdig/data/kod-test-blanks
similarity index 100%
rename from tests/sntp/data/kod-test-blanks
rename to tests/ntpdig/data/kod-test-blanks
diff --git a/tests/sntp/data/kod-test-correct b/tests/ntpdig/data/kod-test-correct
similarity index 100%
rename from tests/sntp/data/kod-test-correct
rename to tests/ntpdig/data/kod-test-correct
diff --git a/tests/sntp/data/kod-test-empty b/tests/ntpdig/data/kod-test-empty
similarity index 100%
rename from tests/sntp/data/kod-test-empty
rename to tests/ntpdig/data/kod-test-empty
diff --git a/tests/sntp/fileHandlingTest.c b/tests/ntpdig/fileHandlingTest.c
similarity index 100%
rename from tests/sntp/fileHandlingTest.c
rename to tests/ntpdig/fileHandlingTest.c
diff --git a/tests/sntp/fileHandlingTest.h b/tests/ntpdig/fileHandlingTest.h
similarity index 93%
rename from tests/sntp/fileHandlingTest.h
rename to tests/ntpdig/fileHandlingTest.h
index f1fcd04..7396afa 100644
--- a/tests/sntp/fileHandlingTest.h
+++ b/tests/ntpdig/fileHandlingTest.h
@@ -1,7 +1,7 @@
 #ifndef GUARD_FILE_HANDLING_TEST_H
 #define GUARD_FILE_HANDLING_TEST_H
 
-#include "sntptest.h"
+#include "ntpdigtest.h"
 
 typedef enum {
 	INPUT_DIR = 0,
diff --git a/tests/sntp/keyFile.c b/tests/ntpdig/keyFile.c
similarity index 100%
rename from tests/sntp/keyFile.c
rename to tests/ntpdig/keyFile.c
diff --git a/tests/sntp/keyFile.cpp b/tests/ntpdig/keyFile.cpp
similarity index 100%
rename from tests/sntp/keyFile.cpp
rename to tests/ntpdig/keyFile.cpp
diff --git a/tests/sntp/kodDatabase.c b/tests/ntpdig/kodDatabase.c
similarity index 99%
rename from tests/sntp/kodDatabase.c
rename to tests/ntpdig/kodDatabase.c
index 4d51960..ac99223 100644
--- a/tests/sntp/kodDatabase.c
+++ b/tests/ntpdig/kodDatabase.c
@@ -1,7 +1,7 @@
 #include "unity.h"
 #include "unity_fixture.h"
 
-#include "sntptest.h"
+#include "ntpdigtest.h"
 
 #include "kod_management.h"
 
diff --git a/tests/sntp/kodDatabase.cpp b/tests/ntpdig/kodDatabase.cpp
similarity index 97%
rename from tests/sntp/kodDatabase.cpp
rename to tests/ntpdig/kodDatabase.cpp
index 7e84e8e..d73c080 100644
--- a/tests/sntp/kodDatabase.cpp
+++ b/tests/ntpdig/kodDatabase.cpp
@@ -9,13 +9,13 @@ TEST_SETUP(kodDatabase) {}
 
 TEST_TEAR_DOWN(kodDatabase) {}
 
-#include "sntptest.h"
+#include "ntpdigtest.h"
 
 extern "C" {
 #include "kod_management.h"
 };
 
-class kodDatabaseTest : public sntptest {
+class kodDatabaseTest : public ntpdigtest {
 protected:
 	virtual void SetUp() {
 		kod_init_kod_db("/dev/null", true);
diff --git a/tests/sntp/kodFile.c b/tests/ntpdig/kodFile.c
similarity index 100%
rename from tests/sntp/kodFile.c
rename to tests/ntpdig/kodFile.c
diff --git a/tests/sntp/kodFile.cpp b/tests/ntpdig/kodFile.cpp
similarity index 100%
rename from tests/sntp/kodFile.cpp
rename to tests/ntpdig/kodFile.cpp
diff --git a/tests/sntp/nameresolution.cpp b/tests/ntpdig/nameresolution.cpp
similarity index 98%
rename from tests/sntp/nameresolution.cpp
rename to tests/ntpdig/nameresolution.cpp
index 2a5901c..d3fcf58 100644
--- a/tests/sntp/nameresolution.cpp
+++ b/tests/ntpdig/nameresolution.cpp
@@ -9,13 +9,13 @@ TEST_SETUP(nameresolution) {}
 
 TEST_TEAR_DOWN(nameresolution) {}
 
-#include "sntptest.h"
+#include "ntpdigtest.h"
 
 extern "C" {
 #include "networking.h"
 };
 
-class networkingTest : public sntptest {
+class networkingTest : public ntpdigtest {
 protected:
 	bool CompareAddrinfo(const char* host,
 											   int family, int flags,
diff --git a/tests/sntp/networking.c b/tests/ntpdig/networking.c
similarity index 51%
rename from tests/sntp/networking.c
rename to tests/ntpdig/networking.c
index 57eccf4..c9dff48 100644
--- a/tests/sntp/networking.c
+++ b/tests/ntpdig/networking.c
@@ -1,3 +1,3 @@
-#include "sntptest.h"
+#include "ntpdigtest.h"
 
 #include "networking.h"
diff --git a/tests/sntp/networking.cpp b/tests/ntpdig/networking.cpp
similarity index 63%
rename from tests/sntp/networking.cpp
rename to tests/ntpdig/networking.cpp
index 1d6ad6c..f4c99c5 100644
--- a/tests/sntp/networking.cpp
+++ b/tests/ntpdig/networking.cpp
@@ -1,4 +1,4 @@
-#include "sntptest.h"
+#include "ntpdigtest.h"
 
 extern "C" {
 #include "networking.h"
diff --git a/tests/ntpdig/ntpdigtest.h b/tests/ntpdig/ntpdigtest.h
new file mode 100644
index 0000000..f6fec81
--- /dev/null
+++ b/tests/ntpdig/ntpdigtest.h
@@ -0,0 +1,35 @@
+#ifndef GUARD_NTPDIGTEST_H
+#define GUARD_NTPDIGTEST_H
+
+#include "tests_main.h"
+
+#include "ntp_stdlib.h"
+#include "ntpdig-opts.h"
+
+#if 0
+class ntpdigtest : public ntptest {
+protected:
+	ntpdigtest() {
+		optionSaveState(&ntpdigOptions);
+	}
+
+	~ntpdigtest() {
+		optionRestore(&ntpdigOptions);
+	}
+
+	void ActivateOption(const char* option, const char* argument) {
+		const int ARGV_SIZE = 4;
+
+		char* opts[ARGV_SIZE];
+
+		opts[0] = estrdup("ntpdigopts");
+		opts[1] = estrdup(option);
+		opts[2] = estrdup(argument);
+		opts[3] = estrdup("127.0.0.1");
+
+		optionProcess(&ntpdigOptions, ARGV_SIZE, opts);
+	}
+};
+#endif
+
+#endif // GUARD_NTPDIGTEST_H
diff --git a/tests/sntp/packetHandling.c b/tests/ntpdig/packetHandling.c
similarity index 99%
rename from tests/sntp/packetHandling.c
rename to tests/ntpdig/packetHandling.c
index ce02b76..45b6867 100644
--- a/tests/sntp/packetHandling.c
+++ b/tests/ntpdig/packetHandling.c
@@ -1,7 +1,7 @@
 #include "unity.h"
 #include "unity_fixture.h"
 
-#include "sntptest.h"
+#include "ntpdigtest.h"
 
 #include "kod_management.h"
 #include "main.h"
diff --git a/tests/sntp/packetHandling.cpp b/tests/ntpdig/packetHandling.cpp
similarity index 99%
rename from tests/sntp/packetHandling.cpp
rename to tests/ntpdig/packetHandling.cpp
index 1f6cfff..fac7cbf 100644
--- a/tests/sntp/packetHandling.cpp
+++ b/tests/ntpdig/packetHandling.cpp
@@ -9,7 +9,7 @@ TEST_SETUP(packetHandling) {}
 
 TEST_TEAR_DOWN(packetHandling) {}
 
-#include "sntptest.h"
+#include "ntpdigtest.h"
 
 extern "C" {
 #include "kod_management.h"
@@ -18,7 +18,7 @@ extern "C" {
 #include "ntp.h"
 };
 
-class mainTest : public sntptest {
+class mainTest : public ntpdigtest {
 protected:
 	bool LfpEquality(const l_fp &expected, const l_fp &actual) {
 		if (L_ISEQU(&expected, &actual)) {
diff --git a/tests/sntp/packetProcessing.cpp b/tests/ntpdig/packetProcessing.cpp
similarity index 99%
rename from tests/sntp/packetProcessing.cpp
rename to tests/ntpdig/packetProcessing.cpp
index 26ffe28..8498d7b 100644
--- a/tests/sntp/packetProcessing.cpp
+++ b/tests/ntpdig/packetProcessing.cpp
@@ -9,7 +9,7 @@ TEST_SETUP(packetProcessing) {}
 
 TEST_TEAR_DOWN(packetProcessing) {}
 
-#include "sntptest.h"
+#include "ntpdigtest.h"
 
 extern "C" {
 #include "networking.h"
@@ -23,7 +23,7 @@ extern "C" {
 extern key* key_ptr;
 extern int key_cnt;
 
-class packetProcessingTest : public sntptest {
+class packetProcessingTest : public ntpdigtest {
 protected:
 	pkt testpkt;
 	pkt testspkt;
diff --git a/tests/sntp/tests-runner b/tests/ntpdig/tests-runner
similarity index 100%
rename from tests/sntp/tests-runner
rename to tests/ntpdig/tests-runner
diff --git a/tests/sntp/tests_main.c b/tests/ntpdig/tests_main.c
similarity index 93%
rename from tests/sntp/tests_main.c
rename to tests/ntpdig/tests_main.c
index d6c4255..49cb16d 100644
--- a/tests/sntp/tests_main.c
+++ b/tests/ntpdig/tests_main.c
@@ -1,6 +1,6 @@
 #include "tests_main.h"
 
-const char *progname = "sntptest";
+const char *progname = "ntpdigtest";
 
 static const char** args_argv;
 static int args_argc;
diff --git a/tests/sntp/tests_main.cpp b/tests/ntpdig/tests_main.cpp
similarity index 86%
rename from tests/sntp/tests_main.cpp
rename to tests/ntpdig/tests_main.cpp
index c92ecce..a1c498d 100644
--- a/tests/sntp/tests_main.cpp
+++ b/tests/ntpdig/tests_main.cpp
@@ -1,6 +1,6 @@
 #include "tests_main.h"
 
-const char *progname = "sntptest";
+const char *progname = "ntpdigtest";
 
 static void RunAllTests(void) {
 	RUN_TEST_GROUP(crypto);
diff --git a/tests/sntp/tests_main.h b/tests/ntpdig/tests_main.h
similarity index 100%
rename from tests/sntp/tests_main.h
rename to tests/ntpdig/tests_main.h
diff --git a/tests/sntp/utilities.cpp b/tests/ntpdig/utilities.cpp
similarity index 97%
rename from tests/sntp/utilities.cpp
rename to tests/ntpdig/utilities.cpp
index cb1c0e8..8cca3aa 100644
--- a/tests/sntp/utilities.cpp
+++ b/tests/ntpdig/utilities.cpp
@@ -9,7 +9,7 @@ TEST_SETUP(utilities) {}
 
 TEST_TEAR_DOWN(utilities) {}
 
-#include "sntptest.h"
+#include "ntpdigtest.h"
 #include "fileHandlingTest.h"
 
 extern "C" {
@@ -20,7 +20,7 @@ const char * Version = "stub unit test Version string";
 
 using std::string;
 
-class utilitiesTest : public sntptest {
+class utilitiesTest : public ntpdigtest {
 protected:
 	sockaddr_u CreateSockaddr4(const char* address) {
 		sockaddr_u s;
@@ -72,7 +72,7 @@ protected:
 
 /* 
  * These tests are essentially a copy of the tests for socktoa()
- * in libntp. If sntp switches to using that functions, these
+ * in libntp. If ntpdig switches to using that functions, these
  * tests can be removed.
  */
 
diff --git a/tests/sntp/sntptest.h b/tests/sntp/sntptest.h
deleted file mode 100644
index f8ed175..0000000
--- a/tests/sntp/sntptest.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef GUARD_SNTPTEST_H
-#define GUARD_SNTPTEST_H
-
-#include "tests_main.h"
-
-#include "ntp_stdlib.h"
-#include "sntp-opts.h"
-
-#if 0
-class sntptest : public ntptest {
-protected:
-	sntptest() {
-		optionSaveState(&sntpOptions);
-	}
-
-	~sntptest() {
-		optionRestore(&sntpOptions);
-	}
-
-	void ActivateOption(const char* option, const char* argument) {
-		const int ARGV_SIZE = 4;
-
-		char* opts[ARGV_SIZE];
-
-		opts[0] = estrdup("sntpopts");
-		opts[1] = estrdup(option);
-		opts[2] = estrdup(argument);
-		opts[3] = estrdup("127.0.0.1");
-
-		optionProcess(&sntpOptions, ARGV_SIZE, opts);
-	}
-};
-#endif
-
-#endif // GUARD_SNTPTEST_H
diff --git a/wscript b/wscript
index c157abe..3bf0742 100644
--- a/wscript
+++ b/wscript
@@ -98,7 +98,7 @@ def build(ctx):
 	if ctx.env.REFCLOCK_PARSE: # Only required by the parse refclock
 		ctx.recurse("libparse")
 	ctx.recurse("libntp")
-	ctx.recurse("sntp")
+	ctx.recurse("ntpdig")
 	ctx.recurse("ntpd")
 	ctx.recurse("ntpq")
 #	ctx.recurse("clockstuff") - 
@@ -130,7 +130,7 @@ def build(ctx):
 		"ntpq/ntpq-man.txt.in",
 		"scripts/ntp-wait/ntp-wait-man.txt.in",
 		"scripts/ntptrace/ntptrace-man.txt.in",
-		"sntp/sntp-man.txt.in",
+		"ntpdig/ntpdig-man.txt.in",
 		"util/ntptickadj-man.txt.in",
 		"util/ntptime-man.txt.in",
 	]



More information about the vc mailing list