2 * /src/NTP/ntp-4/kernel/sys/parsestreams.h,v 4.4 1998/06/14 21:09:32 kardel RELEASE_19990228_A
4 * parsestreams.h,v 4.4 1998/06/14 21:09:32 kardel RELEASE_19990228_A
6 * Copyright (c) 1989-1998 by Frank Kardel
7 * Friedrich-Alexander Universität Erlangen-Nürnberg, Germany
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.
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";
20 #if defined(KERNEL) || defined(_KERNEL)
25 #if defined(PARSESTREAM) && defined(HAVE_SYS_STREAM_H)
28 #ifdef HAVE_SYS_TERMIOS_H
29 #include <sys/termios.h>
32 #include <sys/ppsclock.h>
38 #if defined(PARSESTREAM) && (defined(_sun) || defined(__sun)) && defined(HAVE_SYS_STREAM_H)
40 * Sorry, but in SunOS 4.x AND Solaris 2.x kernels there are no
41 * mem* operations. I don't want them - bcopy, bzero
42 * are fine in the kernel
44 #undef HAVE_STRING_H /* don't include that at kernel level - prototype mismatch in Solaris 2.6 */
45 #include "ntp_string.h"
50 struct parsestream /* parse module local data */
52 queue_t *parse_queue; /* read stream for this channel */
53 queue_t *parse_dqueue; /* driver queue entry (PPS support) */
54 unsigned long parse_status; /* operation flags */
55 void *parse_data; /* local data space (PPS support) */
56 parse_t parse_io; /* io structure */
57 struct ppsclockev parse_ppsclockev; /* copy of last pps event */
60 typedef struct parsestream parsestream_t;
62 #define PARSE_ENABLE 0x0001
64 /*--------------- debugging support ---------------------------------*/
66 #define DD_OPEN 0x00000001
67 #define DD_CLOSE 0x00000002
68 #define DD_RPUT 0x00000004
69 #define DD_WPUT 0x00000008
70 #define DD_RSVC 0x00000010
71 #define DD_PARSE 0x00000020
72 #define DD_INSTALL 0x00000040
73 #define DD_ISR 0x00000080
74 #define DD_RAWDCF 0x00000100
76 extern int parsedebug;
80 #define parseprintf(X, Y) if ((X) & parsedebug) printf Y
84 #define parseprintf(X, Y)
91 * Revision 4.4 1998/06/14 21:09:32 kardel
94 * Revision 4.3 1998/06/13 18:14:32 kardel
95 * make mem*() to b*() mapping magic work on Solaris too
97 * Revision 4.2 1998/06/13 15:16:22 kardel
98 * fix mem*() to b*() function macro emulation
100 * Revision 4.1 1998/06/13 11:50:37 kardel
101 * STREAM macro gone in favor of HAVE_SYS_STREAM_H
103 * Revision 4.0 1998/04/10 19:51:30 kardel
104 * Start 4.0 release version numbering
106 * Revision 1.2 1998/04/10 19:27:42 kardel
107 * initial NTP VERSION 4 integration of PARSE with GPS166 binary support