|
Packit |
96c956 |
/*
|
|
Packit |
96c956 |
chronyd/chronyc - Programs for keeping computer clocks accurate.
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
**********************************************************************
|
|
Packit |
96c956 |
* Copyright (C) Richard P. Curnow 1997-2002
|
|
Packit |
96c956 |
*
|
|
Packit |
96c956 |
* This program is free software; you can redistribute it and/or modify
|
|
Packit |
96c956 |
* it under the terms of version 2 of the GNU General Public License as
|
|
Packit |
96c956 |
* published by the Free Software Foundation.
|
|
Packit |
96c956 |
*
|
|
Packit |
96c956 |
* This program is distributed in the hope that it will be useful, but
|
|
Packit |
96c956 |
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
96c956 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
96c956 |
* General Public License for more details.
|
|
Packit |
96c956 |
*
|
|
Packit |
96c956 |
* You should have received a copy of the GNU General Public License along
|
|
Packit |
96c956 |
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
Packit |
96c956 |
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
Packit |
96c956 |
*
|
|
Packit |
96c956 |
**********************************************************************
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
=======================================================================
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
Header file for the command parser
|
|
Packit |
96c956 |
*/
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
#ifndef GOT_CMDPARSE_H
|
|
Packit |
96c956 |
#define GOT_CMDPARSE_H
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
#include "srcparams.h"
|
|
Packit |
96c956 |
#include "addressing.h"
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
typedef struct {
|
|
Packit |
96c956 |
char *name;
|
|
Packit |
96c956 |
unsigned short port;
|
|
Packit |
96c956 |
SourceParameters params;
|
|
Packit |
96c956 |
} CPS_NTP_Source;
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
/* Parse a command to add an NTP server or peer */
|
|
Packit |
96c956 |
extern int CPS_ParseNTPSourceAdd(char *line, CPS_NTP_Source *src);
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
/* Parse a command to enable local reference */
|
|
Packit |
96c956 |
extern int CPS_ParseLocal(char *line, int *stratum, int *orphan, double *distance);
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
/* Remove extra white-space and comments */
|
|
Packit |
96c956 |
extern void CPS_NormalizeLine(char *line);
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
/* Terminate first word and return pointer to the next word */
|
|
Packit |
96c956 |
extern char *CPS_SplitWord(char *line);
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
/* Parse a key from keyfile */
|
|
Packit |
96c956 |
extern int CPS_ParseKey(char *line, uint32_t *id, const char **hash, char **key);
|
|
Packit |
96c956 |
|
|
Packit |
96c956 |
#endif /* GOT_CMDPARSE_H */
|