2 * ntpdc.h - definitions of interest to ntpdc
6 #include "ntp_request.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 NTP_STR 0x1 /* string argument */
22 #define UINT 0x2 /* unsigned integer */
23 #define INT 0x3 /* signed integer */
24 #define ADD 0x4 /* IP network address */
25 #define IP_VERSION 0x5 /* IP version */
28 * Arguments are returned in a union
34 struct sockaddr_storage netnum;
38 * Structure for passing parsed command line
42 arg_v argval[MAXARGS];
47 * ntpdc includes a command parser which could charitably be called
48 * crude. The following structure is used to define the command
52 const char *keyword; /* command key word */
53 void (*handler) P((struct parse *, FILE *)); /* command handler */
54 u_char arg[MAXARGS]; /* descriptors for arguments */
55 const char *desc[MAXARGS]; /* descriptions for arguments */
60 extern int showhostnames;
63 extern int doquery P((int, int, int, int, int, char *, int *, int *, char **, int, int));
64 extern char * nntohost P((struct sockaddr_storage *));