Initial import from FreeBSD RELENG_4:
[games.git] / contrib / ntp / kernel / sys / chudefs.h
1 /*
2  * Definitions for the CHU line discipline v2.0
3  */
4
5 /*
6  * The CHU time code consists of 10 BCD digits and is repeated
7  * twice for a total of 10 characters.  A time is taken after
8  * the arrival of each character.  The following structure is
9  * used to return this stuff.
10  */
11 #define NCHUCHARS       (10)
12
13 struct chucode {
14         u_char codechars[NCHUCHARS];    /* code characters */
15         u_char ncodechars;              /* number of code characters */
16         u_char chutype;                 /* packet type */
17         struct timeval codetimes[NCHUCHARS];    /* arrival times */
18 };
19
20 #define CHU_TIME 0              /* second half is equal to first half */
21 #define CHU_YEAR 1              /* second half is one's complement */
22