1 /* 2 chronyd/chronyc - Programs for keeping computer clocks accurate. 3 4 ********************************************************************** 5 * Copyright (C) Miroslav Lichvar 2016 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 This is the header file for the Linux-specific NTP socket I/O bits. 25 */ 26 27 #ifndef GOT_NTP_IO_LINUX_H 28 #define GOT_NTP_IO_LINUX_H 29 30 #include "socket.h" 31 32 extern void NIO_Linux_Initialise(void); 33 34 extern void NIO_Linux_Finalise(void); 35 36 extern int NIO_Linux_SetTimestampSocketOptions(int sock_fd, int client_only, int *events); 37 38 extern int NIO_Linux_ProcessEvent(int sock_fd, int event); 39 40 extern int NIO_Linux_ProcessMessage(SCK_Message *message, NTP_Local_Address *local_addr, 41 NTP_Local_Timestamp *local_ts, int event); 42 43 extern void NIO_Linux_RequestTxTimestamp(SCK_Message *message, int sock_fd); 44 45 extern void NIO_Linux_NotifySocketClosing(int sock_fd); 46 47 #endif 48