]>
git.ipfire.org Git - thirdparty/chrony.git/blob - cmdparse.h
2 chronyd/chronyc - Programs for keeping computer clocks accurate.
4 **********************************************************************
5 * Copyright (C) Richard P. Curnow 1997-2002
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 Header file for the command parser
27 #ifndef GOT_CMDPARSE_H
28 #define GOT_CMDPARSE_H
30 #include "srcparams.h"
31 #include "addressing.h"
36 SourceParameters params
;
39 /* Parse a command to add an NTP server or peer */
40 extern int CPS_ParseNTPSourceAdd(char *line
, CPS_NTP_Source
*src
);
42 /* Parse a command to enable local reference */
43 extern int CPS_ParseLocal(char *line
, int *stratum
, int *orphan
, double *distance
);
45 /* Remove extra white-space and comments */
46 extern void CPS_NormalizeLine(char *line
);
48 /* Terminate first word and return pointer to the next word */
49 extern char *CPS_SplitWord(char *line
);
51 /* Parse a key from keyfile */
52 extern int CPS_ParseKey(char *line
, uint32_t *id
, const char **type
, char **key
);
54 #endif /* GOT_CMDPARSE_H */