2 * ntpq.h - definitions of interest to ntpq
6 #include "ntp_control.h"
7 #include "ntp_string.h"
8 #include "ntp_malloc.h"
11 * Maximum number of arguments
16 * Flags for forming descriptors.
18 #define OPT 0x80 /* this argument is optional, or'd with type */
21 #define STR 0x1 /* string argument */
22 #define UINT 0x2 /* unsigned integer */
23 #define INT 0x3 /* signed integer */
24 #define ADD 0x4 /* IP network address */
27 * Arguments are returned in a union
37 * Structure for passing parsed command line
41 arg_v argval[MAXARGS];
46 * ntpdc includes a command parser which could charitably be called
47 * crude. The following structure is used to define the command
51 const char *keyword; /* command key word */
52 void (*handler) P((struct parse *, FILE *)); /* command handler */
53 u_char arg[MAXARGS]; /* descriptors for arguments */
54 const char *desc[MAXARGS]; /* descriptions for arguments */
59 * Structure to hold association data
69 * Structure for translation tables between text format
70 * variable indices and text format.
78 extern void asciize P((int, char *, FILE *));
79 extern int getnetnum P((const char *, u_int32 *, char *));
80 extern void sortassoc P((void));
81 extern int doquery P((int, int, int, int, char *, u_short *, int *, char **));
82 extern char * nntohost P((u_int32));
83 extern int decodets P((char *, l_fp *));
84 extern int decodeuint P((char *, u_long *));
85 extern int nextvar P((int *, char **, char **, char **));
86 extern int decodetime P((char *, l_fp *));
87 extern void printvars P((int, char *, int, int, FILE *));
88 extern int decodeint P((char *, long *));
89 extern int findvar P((char *, struct ctl_var *));