Change the default for ntpd back to -s, the bug which triggered this
[dragonfly.git] / contrib / ntp / kernel / sys / parsestreams.h
1 /*
2  * /src/NTP/ntp-4/kernel/sys/parsestreams.h,v 4.4 1998/06/14 21:09:32 kardel RELEASE_19990228_A
3  *
4  * parsestreams.h,v 4.4 1998/06/14 21:09:32 kardel RELEASE_19990228_A
5  *
6  * Copyright (c) 1989-1998 by Frank Kardel
7  * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
8  *                                   
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12  *
13  */
14
15 #if     !(defined(lint) || defined(__GNUC__))
16   static char sysparsehrcsid[] = "parsestreams.h,v 4.4 1998/06/14 21:09:32 kardel RELEASE_19990228_A";
17 #endif
18
19 #undef PARSEKERNEL
20 #if defined(KERNEL) || defined(_KERNEL)
21 #ifndef PARSESTREAM
22 #define PARSESTREAM
23 #endif
24 #endif
25 #if defined(PARSESTREAM) && defined(HAVE_SYS_STREAM_H)
26 #define PARSEKERNEL
27
28 #ifdef HAVE_SYS_TERMIOS_H
29 #include <sys/termios.h>
30 #endif
31
32 #include <sys/ppsclock.h>
33
34 #define NTP_NEED_BOPS
35
36 #if defined(PARSESTREAM) && (defined(_sun) || defined(__sun)) && defined(HAVE_SYS_STREAM_H)
37 /*
38  * Sorry, but in SunOS 4.x AND Solaris 2.x kernels there are no
39  * mem* operations. I don't want them - bcopy, bzero
40  * are fine in the kernel
41  */
42 #undef HAVE_STRING_H    /* don't include that at kernel level - prototype mismatch in Solaris 2.6 */
43 #include "ntp_string.h"
44 #else
45 #include <stdio.h>
46 #endif
47
48 struct parsestream              /* parse module local data */
49 {
50   queue_t       *parse_queue;   /* read stream for this channel */
51   queue_t       *parse_dqueue;  /* driver queue entry (PPS support) */
52   unsigned long  parse_status;  /* operation flags */
53   void          *parse_data;    /* local data space (PPS support) */
54   parse_t        parse_io;      /* io structure */
55   struct ppsclockev parse_ppsclockev; /* copy of last pps event */
56 };
57
58 typedef struct parsestream parsestream_t;
59
60 #define PARSE_ENABLE    0x0001
61
62 /*--------------- debugging support ---------------------------------*/
63
64 #define DD_OPEN    0x00000001
65 #define DD_CLOSE   0x00000002
66 #define DD_RPUT    0x00000004
67 #define DD_WPUT    0x00000008
68 #define DD_RSVC    0x00000010
69 #define DD_PARSE   0x00000020
70 #define DD_INSTALL 0x00000040
71 #define DD_ISR     0x00000080
72 #define DD_RAWDCF  0x00000100
73
74 extern int parsedebug;
75
76 #ifdef DEBUG_PARSE
77
78 #define parseprintf(X, Y) if ((X) & parsedebug) printf Y
79
80 #else
81
82 #define parseprintf(X, Y)
83
84 #endif
85 #endif
86
87 /*
88  * parsestreams.h,v
89  * Revision 4.4  1998/06/14 21:09:32  kardel
90  * Sun acc cleanup
91  *
92  * Revision 4.3  1998/06/13 18:14:32  kardel
93  * make mem*() to b*() mapping magic work on Solaris too
94  *
95  * Revision 4.2  1998/06/13 15:16:22  kardel
96  * fix mem*() to b*() function macro emulation
97  *
98  * Revision 4.1  1998/06/13 11:50:37  kardel
99  * STREAM macro gone in favor of HAVE_SYS_STREAM_H
100  *
101  * Revision 4.0  1998/04/10 19:51:30  kardel
102  * Start 4.0 release version numbering
103  *
104  * Revision 1.2  1998/04/10 19:27:42  kardel
105  * initial NTP VERSION 4 integration of PARSE with GPS166 binary support
106  *
107  */