]>
git.ipfire.org Git - thirdparty/chrony.git/blob - privops.h
2 chronyd/chronyc - Programs for keeping computer clocks accurate.
4 **********************************************************************
5 * Copyright (C) Bryan Christianson 2015
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.
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.
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.
20 **********************************************************************
22 =======================================================================
24 Perform privileged operations over a unix socket to a privileged fork.
31 #ifdef PRIVOPS_ADJUSTTIME
32 int PRV_AdjustTime(const struct timeval
*delta
, struct timeval
*olddelta
);
34 #define PRV_AdjustTime adjtime
37 #ifdef PRIVOPS_ADJUSTTIMEX
38 int PRV_AdjustTimex(struct timex
*txc
);
40 #define PRV_AdjustTimex ntp_adjtime
43 #ifdef PRIVOPS_SETTIME
44 int PRV_SetTime(const struct timeval
*tp
, const struct timezone
*tzp
);
46 #define PRV_SetTime settimeofday
49 #ifdef PRIVOPS_BINDSOCKET
50 int PRV_BindSocket(int sock
, struct sockaddr
*address
, socklen_t address_len
);
52 #define PRV_BindSocket bind
55 #ifdef PRIVOPS_NAME2IPADDRESS
56 int PRV_Name2IPAddress(const char *name
, IPAddr
*ip_addrs
, int max_addrs
);
58 #define PRV_Name2IPAddress DNS_Name2IPAddress
61 #ifdef PRIVOPS_RELOADDNS
62 void PRV_ReloadDNS(void);
64 #define PRV_ReloadDNS DNS_Reload
68 void PRV_Initialise(void);
69 void PRV_StartHelper(void);
70 void PRV_Finalise(void);
72 #define PRV_Initialise()
73 #define PRV_StartHelper()
74 #define PRV_Finalise()