diff options
author | Garrett Wollman <wollman@FreeBSD.org> | 1993-12-21 18:36:48 +0000 |
---|---|---|
committer | Garrett Wollman <wollman@FreeBSD.org> | 1993-12-21 18:36:48 +0000 |
commit | e7c996d95e438eb882cfb523ba6e047f12adb01f (patch) | |
tree | 726a343c62286ac7f6753b0f898e58cdcf285af6 /usr.sbin/xntpd/kernel/README.streams | |
download | src-e7c996d95e438eb882cfb523ba6e047f12adb01f.tar.gz src-e7c996d95e438eb882cfb523ba6e047f12adb01f.zip |
xntpd 3.3b from UDelvendor/ntpd/udel_33B
Notes
Notes:
svn path=/cvs2svn/branches/UDEL/; revision=893
svn path=/vendor/ntpd/udel_33B/; revision=895; tag=vendor/ntpd/udel_33B
Diffstat (limited to 'usr.sbin/xntpd/kernel/README.streams')
-rw-r--r-- | usr.sbin/xntpd/kernel/README.streams | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/usr.sbin/xntpd/kernel/README.streams b/usr.sbin/xntpd/kernel/README.streams new file mode 100644 index 000000000000..26c2825b50df --- /dev/null +++ b/usr.sbin/xntpd/kernel/README.streams @@ -0,0 +1,86 @@ +Some kernels don't support additional user defined line disciplines. +Especially notable in this regard is SunOS and System V. They +provide similar support in the form of "Streams". Accordingly, +included in this directory is a pair of STREAMS modules to +replace the line disciplines that provide clock support for +xntpd. Notice that the "clkdefs.h" file is not used in the +original line discipline, but the "chudefs.h" file is the +same one used in the original line discipline. + +TO INSTALL A NEW STREAMS DRIVER: + +1. Copy your choice to /sys/os, removing the "_STREAMS" in the +filename. + +2. Copy the appropriate *defs.h file to /usr/include/sys, +then link it (with ln) to /sys/sys. + +In the following steps, substitute "clk" for "chu" if you're +installing the clk driver. + +3. Append to /sys/conf.common/files.cmn: + +os/tty_chu.c optional chu + +4. Edit /sys/sun/str_conf.c. You'll want to add lines in three +places. It'll be sort of clear where when you see the file. + +. +. +. +#include "chu.h" +. +. +. +#if NCHU > 0 +extern struct streamtab chuinfo; +#endif +. +. +. +#if NCHU > 0 + { "chu", &chuinfo }, +#endif +. +. +. + +At this point, the kernel-making "config [k-name] ; cd ../[k-name] ; make" +should produce a kernel just as it did before. If it fouls up, +something's wrong. + +5. Edit /sys/[arch]/conf/[k-name] (substituting the architecture and +kernel name) to stick in: + +pseudo-device chu4 # CHU clock support + +You can change 4 to anything you like. It will limit the number +of instantiations of the chu driver you can use at the same time. + +6. Make a new kernel and boot it. + +HOW TO USE THE CHU STREAMS DRIVER: + +The driver should act exactly like the line discipline. +After setting the raw mode, and exclusive access (if you want), +pop off all the extra streams, then push the chu module +on. From then on, any reads from the file in question +will return chucode structures as defined in chudefs.h. +Depending on the settings of PEDANTIC and ANAL_RETENTIVE +used when compiling the kernel, some checking of the +data may or may not be necessary. + +HOW TO USE THE CLK STREAMS DRIVER: + +First, it should be noted that a new ioctl() has been defined. +The CLK_SETSTR ioctl takes a pointer to a string of no more +than CLK_MAXSTRSIZE characters. Until the first CLK_SETSTR +is performed, the driver will simply pass through characters. +Once it is passed a string, then any character in that string +will be immediately followed by a struct timeval. You can +change the string whenever you want by doing another +CLK_SETSTR. The character must be an exact, 8 bit match. +The character '\000' cannot, unfortunately, be stamped. +Passing an empty string to CLK_SETSTR turns off stamping. +Passing NULL will produce undefined results. + |