File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / ntp / ntpq / libntpq_subs.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue May 29 12:08:38 2012 UTC (12 years, 5 months ago) by misho
Branches: ntp, MAIN
CVS tags: v4_2_6p5p0, v4_2_6p5, HEAD
ntp 4.2.6p5

    1: /*****************************************************************************
    2:  *
    3:  *  libntpq_subs.c
    4:  *
    5:  *  This is the second part of the wrapper library for ntpq, the NTP query utility. 
    6:  *  This library reuses the sourcecode from ntpq and exports a number
    7:  *  of useful functions in a library that can be linked against applications
    8:  *  that need to query the status of a running ntpd. The whole 
    9:  *  communcation is based on mode 6 packets.
   10:  *
   11:  *  This source file exports the (private) functions from ntpq-subs.c 
   12:  *
   13:  ****************************************************************************/
   14: 
   15: 
   16: #include "ntpq-subs.c"
   17: #include "libntpq.h"
   18: 
   19: 
   20: /* the following functions are required internally by a number of libntpq functions 
   21:  * and since they are defined as static in ntpq-subs.c, they need to be exported here
   22:  */
   23:  
   24: int ntpq_dogetassoc(void)
   25: {
   26: 	
   27: 	if ( dogetassoc(NULL))
   28: 	{
   29: 		return numassoc;
   30: 	} else {
   31: 		return 0;
   32: 	}
   33: }
   34: 
   35: char ntpq_decodeaddrtype(sockaddr_u *sock)
   36: {
   37: 	return decodeaddrtype(sock);
   38: }
   39: 
   40: int
   41: ntpq_doquerylist(
   42: 	struct ntpq_varlist *vlist,
   43: 	int op,
   44: 	associd_t associd,
   45: 	int auth,
   46: 	u_short *rstatus,
   47: 	int *dsize,
   48: 	const char **datap
   49: 	)
   50: {
   51: 	return doquerylist((struct varlist *)vlist, op, associd, auth,
   52: 			   rstatus, dsize, datap);
   53: }
   54: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>