1 /*
2   chronyd/chronyc - Programs for keeping computer clocks accurate.
3 
4  **********************************************************************
5  * Copyright (C) Richard P. Curnow  1997-2002
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of version 2 of the GNU General Public License as
9  * published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19  *
20  **********************************************************************
21 
22   =======================================================================
23 
24   The header file for the linux driver
25   */
26 
27 #ifndef GOT_SYS_LINUX_H
28 #define GOT_SYS_LINUX_H
29 
30 #include "sys.h"
31 
32 extern void SYS_Linux_Initialise(void);
33 
34 extern void SYS_Linux_Finalise(void);
35 
36 extern void SYS_Linux_DropRoot(uid_t uid, gid_t gid, SYS_ProcessContext context, int clock_control);
37 
38 extern void SYS_Linux_EnableSystemCallFilter(int level, SYS_ProcessContext context);
39 
40 extern int SYS_Linux_CheckKernelVersion(int req_major, int req_minor);
41 
42 extern int SYS_Linux_OpenPHC(const char *path, int phc_index);
43 
44 extern int SYS_Linux_GetPHCSample(int fd, int nocrossts, double precision, int *reading_mode,
45                                   struct timespec *phc_ts, struct timespec *sys_ts, double *err);
46 
47 extern int SYS_Linux_SetPHCExtTimestamping(int fd, int pin, int channel,
48                                            int rising, int falling, int enable);
49 
50 extern int SYS_Linux_ReadPHCExtTimestamp(int fd, struct timespec *phc_ts, int *channel);
51 
52 #endif  /* GOT_SYS_LINUX_H */
53