3 /*****************************************************************************
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 ****************************************************************************/
19 #include "ntpq-subs.c"
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
))
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
);