4 * ntpq.h - definitions of interest to ntpq
8 #include "ntp_control.h"
9 #include "ntp_string.h"
10 #include "ntp_malloc.h"
13 * Maximum number of arguments
18 * Flags for forming descriptors.
21 * Flags for forming descriptors.
23 #define OPT 0x80 /* this argument is optional, or'd with type */
26 #define NTP_STR 0x1 /* string argument */
27 #define NTP_UINT 0x2 /* unsigned integer */
28 #define NTP_INT 0x3 /* signed integer */
29 #define NTP_ADD 0x4 /* IP network address */
30 #define IP_VERSION 0x5 /* IP version */
33 * Arguments are returned in a union
43 * Structure for passing parsed command line
47 arg_v argval
[MAXARGS
];
52 * ntpdc includes a command parser which could charitably be called
53 * crude. The following structure is used to define the command
57 const char *keyword
; /* command key word */
58 void (*handler
) (struct parse
*, FILE *); /* command handler */
59 u_char arg
[MAXARGS
]; /* descriptors for arguments */
60 const char *desc
[MAXARGS
]; /* descriptions for arguments */
65 * Structure to hold association data
75 * Structure for translation tables between text format
76 * variable indices and text format.
84 extern int interactive
; /* are we prompting? */
85 extern int old_rv
; /* use old rv behavior? --old-rv */
87 extern void asciize (int, char *, FILE *);
88 extern int getnetnum (const char *, sockaddr_u
*, char *, int);
89 extern void sortassoc (void);
90 extern int doquery (int, int, int, int, char *, u_short
*, int *, char **);
91 extern char * nntohost (sockaddr_u
*);
92 extern int decodets (char *, l_fp
*);
93 extern int decodeuint (char *, u_long
*);
94 extern int nextvar (int *, char **, char **, char **);
95 extern int decodetime (char *, l_fp
*);
96 extern void printvars (int, char *, int, int, int, FILE *);
97 extern int decodeint (char *, long *);
98 extern int findvar (char *, struct ctl_var
*, int code
);