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.
19 * Flags for forming descriptors.
21 #define OPT 0x80 /* this argument is optional, or'd with type */
24 #define NTP_STR 0x1 /* string argument */
25 #define NTP_UINT 0x2 /* unsigned integer */
26 #define NTP_INT 0x3 /* signed integer */
27 #define NTP_ADD 0x4 /* IP network address */
28 #define IP_VERSION 0x5 /* IP version */
31 * Arguments are returned in a union
37 struct sockaddr_storage netnum;
41 * Structure for passing parsed command line
45 arg_v argval[MAXARGS];
50 * ntpdc includes a command parser which could charitably be called
51 * crude. The following structure is used to define the command
55 const char *keyword; /* command key word */
56 void (*handler) P((struct parse *, FILE *)); /* command handler */
57 u_char arg[MAXARGS]; /* descriptors for arguments */
58 const char *desc[MAXARGS]; /* descriptions for arguments */
63 * Structure to hold association data
73 * Structure for translation tables between text format
74 * variable indices and text format.
82 extern void asciize P((int, char *, FILE *));
83 extern int getnetnum P((const char *, struct sockaddr_storage *, char *, int));
84 extern void sortassoc P((void));
85 extern int doquery P((int, int, int, int, char *, u_short *, int *, char **));
86 extern char * nntohost P((struct sockaddr_storage *));
87 extern int decodets P((char *, l_fp *));
88 extern int decodeuint P((char *, u_long *));
89 extern int nextvar P((int *, char **, char **, char **));
90 extern int decodetime P((char *, l_fp *));
91 extern void printvars P((int, char *, int, int, FILE *));
92 extern int decodeint P((char *, long *));
93 extern int findvar P((char *, struct ctl_var *, int code));