1 /* $NetBSD: ntpdc.h,v 1.2 2003/12/04 16:23:38 drochner Exp $ */
4 * ntpdc.h - definitions of interest to ntpdc
8 #include "ntp_request.h"
9 #include "ntp_string.h"
10 #include "ntp_malloc.h"
13 * Maximum number of arguments
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 struct - no
32 * union space saving is attempted.
39 struct sockaddr_storage netnum
;
43 * Structure for passing parsed command line
47 arg_v argval
[MAXARGS
+ MOREARGS
];
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
) P((struct parse
*, FILE *)); /* command handler */
59 u_char arg
[MAXARGS
]; /* descriptors for arguments */
60 const char *desc
[MAXARGS
]; /* descriptions for arguments */
65 extern int showhostnames
;
68 extern int doquery
P((int, int, int, int, int, char *, int *, int *, char **, int, int));
69 extern char * nntohost
P((struct sockaddr_storage
*));