xref: /netbsd-src/external/bsd/ntp/dist/include/ntp_datum.h (revision 76c7fc5f6b13ed0b1508e6b313e88e59977ed78e)
1 /*	$NetBSD: ntp_datum.h,v 1.4 2016/01/08 21:35:35 christos Exp $	*/
2 
3 struct btfp_time                /* Structure for reading 5 time words   */
4                                 /* in one ioctl(2) operation.           */
5 {
6   unsigned short btfp_time[5];  /* Time words 0,1,2,3, and 4. (16bit)*/
7 };
8 
9 /***** Simple ioctl commands *****/
10 
11 #define RUNLOCK   _IO('X',19)                   /* Release Capture Lockout */
12 #define RCR0      _IOR('X',22,unsigned int)     /* Read control register */
13 #define WCR0      _IOW('X',23,unsigned int)     /* Write control register */
14 
15 /***** Compound ioctl commands *****/
16 
17 /* Read all 5 time words in one call.   */
18 #define READTIME        _IOR('X',32,struct btfp_time)
19 #define VMEFD "/dev/btfp0"
20 
21  struct vmedate {               /* structure returned by get_vmetime.c */
22          unsigned short year;
23          unsigned short doy;
24          unsigned short hr;
25          unsigned short mn;
26          unsigned short sec;
27          unsigned long frac;
28          unsigned short status;
29          };
30 
31 #define PRIO    120               /* set the realtime priority */
32 #define NREGS 7                    /* number of registers we will use */
33