ntpq.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright (c) 1996 by Sun Microsystems, Inc.
* All Rights Reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* ntpq.h - definitions of interest to ntpq
*/
#include "ntp_fp.h"
#include "ntp.h"
#include "ntp_control.h"
#include "ntp_string.h"
#include "ntp_malloc.h"
/*
* Maximum number of arguments
*/
#define MAXARGS 4
/*
* Flags for forming descriptors.
*/
#define NO 0x0
/*
* Arguments are returned in a union
*/
typedef union {
char *string;
long ival;
} arg_v;
/*
* Structure for passing parsed command line
*/
struct parse {
const char *keyword;
int nargs;
};
/*
* xntpdc includes a command parser which could charitably be called
* crude. The following structure is used to define the command
* syntax.
*/
struct xcmd {
const char *keyword; /* command key word */
const char *comment;
};
/*
* Structure to hold association data
*/
struct association {
};
#define MAXASSOC 1024
/*
* Structure for translation tables between text format
* variable indices and text format.
*/
struct ctl_var {
const char *text;
};
extern void sortassoc P((void));
extern int decodeuint P((char *, u_long *));
extern int nextvar P((int *, char **, char **, char **));
extern int decodetime P((char *, l_fp *));
extern int decodeint P((char *, long *));