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