Annotation of embedaddon/ntp/ntpq/libntpq_subs.c, revision 1.1

1.1     ! misho       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>