Sync usage with man page.
[netbsd-mini2440.git] / external / bsd / ntp / dist / ntpq / libntpq_subs.c
blobe16ebaf02094a05c1b81e9ca3e52668936ce5352
1 /* $NetBSD$ */
3 /*****************************************************************************
5 * libntpq_subs.c
7 * This is the second part of the wrapper library for ntpq, the NTP query utility.
8 * This library reuses the sourcecode from ntpq and exports a number
9 * of useful functions in a library that can be linked against applications
10 * that need to query the status of a running ntpd. The whole
11 * communcation is based on mode 6 packets.
13 * This source file exports the (private) functions from ntpq-subs.c
15 ****************************************************************************/
18 #define _LIBNTPQSUBSC
19 #include "ntpq-subs.c"
20 #include "libntpq.h"
22 /* Function Prototypes */
23 int ntpq_dogetassoc(void);
24 char ntpq_decodeaddrtype(sockaddr_u *sock);
25 int ntpq_doquerylist(struct varlist *, int , int , int , u_short *, int *, char **datap );
28 /* the following functions are required internally by a number of libntpq functions
29 * and since they are defined as static in ntpq-subs.c, they need to be exported here
32 int ntpq_dogetassoc(void)
35 if ( dogetassoc(NULL))
37 return numassoc;
38 } else {
39 return 0;
43 char ntpq_decodeaddrtype(sockaddr_u *sock)
45 return decodeaddrtype(sock);
48 int ntpq_doquerylist(struct varlist *vlist, int op, int associd, int auth, u_short *rstatus, int *dsize, char **datap )
50 return doquerylist(vlist, op, associd, auth, rstatus, dsize, &*datap );