diff options
Diffstat (limited to 'contrib/ntp/kernel/sys/chudefs.h')
-rw-r--r-- | contrib/ntp/kernel/sys/chudefs.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/ntp/kernel/sys/chudefs.h b/contrib/ntp/kernel/sys/chudefs.h new file mode 100644 index 0000000..f5549f5 --- /dev/null +++ b/contrib/ntp/kernel/sys/chudefs.h @@ -0,0 +1,22 @@ +/* + * Definitions for the CHU line discipline v2.0 + */ + +/* + * The CHU time code consists of 10 BCD digits and is repeated + * twice for a total of 10 characters. A time is taken after + * the arrival of each character. The following structure is + * used to return this stuff. + */ +#define NCHUCHARS (10) + +struct chucode { + u_char codechars[NCHUCHARS]; /* code characters */ + u_char ncodechars; /* number of code characters */ + u_char chutype; /* packet type */ + struct timeval codetimes[NCHUCHARS]; /* arrival times */ +}; + +#define CHU_TIME 0 /* second half is equal to first half */ +#define CHU_YEAR 1 /* second half is one's complement */ + |