-------------
Microsoft Visual C++ V4.1 for Windows NT V3.51
-------------

Last revision: 23 March 1996

The file ntp.mak is a make file for Microsoft"s Visual C++ V4.1. It
groups all the previously independent projects which at this time
consist of lib, ntpdate, ntpq, ntptrace, xntpd, and xntpdc into one
project. The root project is called ntp. To compile the whole thing,
just point your project list at either "ntp - Win32 Debug" (my personal
favorite) or at "ntp - Win32 Release" and hit the compile button. About
a half hour later you have everything you need to install ntp on your
Windows NT V3.51 box. Don"t worry about the errors at the end; they are
there because the ntp project doesn"t really have an executable and,
therefor, doesn"t have a _mainCRTStartup.

The individual subprojects can be compiled by selecting them in the
project list and hitting the compile button.

Jeff Jevniseck <JJEVNISEK@dcosys.qgraph.com>

-------------
Microsoft Visual C++ V2.0 for Windows NT V3.5
-------------

Last revision: 12 Apr 1995

This NTPv3 distribution includes a sample configuration file and the
project makefiles for WindowsNT 3.5 platform using the Microsoft Visual
C++ 2.0 compiler. Also included is a small routine to install the NTP
daemon as a "service" on a WindowsNT box. Besides xntpd, the utilities
that have been ported are ntpdate and xntpdc. The port to WindowsNT 3.5
has been tested using a Bancomm TimeServe2000 GPS receiver clock that
acts as a strata 1 NTP server with no authentication (it has not been
tested with any refclock drivers compiled in).

Following are the known flaws in this port:

1) Currently, I do not know of a way in NT to get information about
   multiple network interface cards. The current port uses just one
   socket bound to INADDR_ANY address. Therefore when dealing with a
   multihomed NT time server, clients should point to the default
   address on the server (otherwise the reply is not guaranteed to come
   from the same interface to which the request was sent). Working with
   Microsoft to get this resolved.

2) There is some problem with "longjmp" in xntpdc/ntpdc.c that causes a
   software exception on doing a Control-C in xntpdc. Be patient!

3) The error messages logged by xntpd currently contain only the
   numerical error code. Corresponding error message string has to be
   looked up in "Books Online" on Visual C++ 2.0 under the topic
   "Numerical List of Error Codes".

----------------------------------------------------
MAKING XNTPD FOR WindowsNT 3.5 using Visual C++ 2.0:
----------------------------------------------------

Separate projects are needed for xntpd, ntpdate, xntpdc, and the library
containing routines used by them.

1) First build the static library composed of routines in the lib
   subdirectory of the distribution. Load the project by opening the
   corresponding makefile libntp.mak (in the lib subdirectory of the
   distribution) by choosing the Open option in the File menu. This
   should display a list of files contained in this project. Then choose
   the "Rebuild All" option from the Project menu in order to compile
   the routines into a library. The libntp.lib static library is created
   in the lib/WinDebug directory.

   You can now choose to build xntpd, ntpdate, and xntpdc in any order.

2) To build xntpd, load the project by opening the corresponding
   makefile xntpd.mak (in the xntpd subdirectory of the distribution),
   and rebuild all files. The xntpd.exe executable is created in the
   xntpd/WinDebug directory.

3) repeat the above step for ntpdate and xntpdc

-------------------------------------------------
INSTALLING XNTPD AS A SERVICE UNDER WindowsNT 3.5
-------------------------------------------------

At this point you need to install "xntpd" as a service. First modify the
sample configuration file conf/config.winnt35 in the distribution to
suit your needs. Then install it as "%SystemRoot%\NTP.INI" (%SystemRoot%
is an environmental variable that can be determined by typing "set" at
the "Command Prompt" or from the "System" icon in the "Control Panel",
NTP.INI is the suggested name for the "ntp.conf" file in Windows
environment).

The instsrv.c program in the util subdirectory of the distribution can
be used to install "xntpd" as a service and start automatically at boot
time. Compile instsrv.c, and enter form the command prompt "instsrv.exe
NetWorkTimeProtocol <pathname_for_xntd.exe>" Clicking on the "Services"
icon in the "Control Panel" ("Main" group in the "Program Manager") will
display the list of currently installed services in a dialog box. The
NetworkTimeProtocol service should show up in this list. Select it in
the list and hit the "Start" button in the dialog box. The NTP service
should start. View the event log by clicking on the "Event Viewer" icon
in the "Administrative Tools" group of the "Program Manager", there
should be several successful startup messages from NTP. NTP will keep
running and restart automatically when the machine is rebooted.

You can change the start mode (automatic/manual) and other startup
parameters correponding to the NTP service (eg. location of conf file)
also in the "Services" dialog box if you wish.

There is no clean way to run "ntpdate" before starting "xntpd" at boot
time, unlike the Unix environment. "xntpd" will step the clock upto a
1000 seconds. While there is no reason that the system clock should be
that much off during bootup if "xntpd" was running before bootup, you
may want to increase the CLOCK_WAYTOOBIG parameter in include/ntp.h from
1000 to, say, MAXINT.

You can also use instsrv.c to delete the NTP service "instsrv.exe
NetworkTimeProtocol remove"

Viraj Bais <vbais@mailman1.intel.com>
