# 2.11BSD#431 - /usr/src/usr.sbin/ntp/ntp.h

##### Macros

    ALARM             X
    CLOCK_ADJ         X
    CLOCK_COMP        X
    CLOCK_FACTOR      X
    CLOCK_FREQ        X
    CLOCK_MAX         X
    CLOCK_PHASE       X
    CLOCK_TRACK       X
    CLOCK_UPDATE      X
    FD_CLR            X
    FD_ISSET          X
    FD_SET            X
    FD_SETSIZE        X
    FD_ZERO           X
    INFO_QUERY        X
    INFO_REPLY        X
    JAN_1970          X
    LEAPMASK          X
    MAXNETIF          X
    MINUS_SEC         X
    MODEMASK          X
    MODE_BROADCAST    X
    MODE_CLIENT       X
    MODE_RES1         X
    MODE_RES2         X
    MODE_SERVER       X
    MODE_SYM_ACT      X
    MODE_SYM_PAS      X
    MODE_UNSPEC       X
    NBBY              X
    NFDBITS           X
    NO_WARNING        X
    NTPDC_VERSION     X
    NTPDRIFTCOMP      X
    NTPINITFILE       X
    NTPVERSION_1      X
    NTP_INFIN         X
    NTP_MAXAGE        X
    NTP_MAXLIST       X
    NTP_MAXPOLL       X
    NTP_MAXSKW        X
    NTP_MAXSTRA       X
    NTP_MAXWGT        X
    NTP_MINDIST       X
    NTP_MINPOLL       X
    NTP_PORT          X
    NTP_REFMAXSKW     X
    NTP_REFMINDIST    X
    NTP_SELECT        X
    NTP_VERSION       X
    NTP_WINDOW        X
    NTP_WINDOW_SHIFT_MASKX
    PEER_FILTER       X
    PEER_FL_AUTHENABLEX
    PEER_FL_BCAST     X
    PEER_FL_CANDIDATE X
    PEER_FL_CONFIG    X
    PEER_FL_REFCLOCK  X
    PEER_FL_SANE      X
    PEER_FL_SELECTED  X
    PEER_FL_SYNC      X
    PEER_MAXDISP      X
    PEER_SHIFT        X
    PEER_THRESHOLD    X
    PLUS_SEC          X
    PRIM_REF          X
    SHIFT_MASK        X
    STRMCMP           X
    UNSPECIFIED       X
    VERSIONMASK       X
    WAYTOOBIG         X
    XTAL              X
    X_NTP_CANDIDATES  X

##### struct's

    filter            X
    info_filter       X
    intf              X
    l_fixedpt         X
    list              X
    ntp_peer          X
    ntpdata           X
    ntpinfo           X
    s_fixedpt         X
    sysdata           X
    xclockinfo        X

       1: /* $Source: /usr/src/new/ntp/ntp.h,v $ $Revision: 3.4.1.8 $ $Date: 95/01/27 17:22:14 $ */
       2:
       3: /*
       4:  *  $Log:	ntp.h,v $
       5:  * Revision 3.4.1.9 2000/04/11 20:55:00 sms
       6:  * Remove short name hacks - 2.11BSD has long variable names.
       7:  *
       8:  * Revision 3.4.1.8  95/01/27  17:20:14  sms
       9:  * Fix name 'struct clockinfo' name collision with sysctl.h by renaming our
      10:  * structure xclockinfo.
      11:  *
      12:  * Revision 3.4.1.7  89/05/18  18:22:14  louie
      13:  * A few extra diddles in ntp.h for the reference clock feature.
      14:  *
      15:  * Revision 3.4.1.6  89/05/03  15:11:06  louie
      16:  * Specify default file for drift value and more peer flag definitions to
      17:  * reflect various stages of clock selection critera.
      18:  *
      19:  * Revision 3.4.1.5  89/04/10  15:55:42  louie
      20:  * Provide default value for number of bits/byte if not defined.  Compute the
      21:  * Window shift mask inside of conditional code on XTAL so we get the correct
      22:  * value if configured without a crystal controled clock (!!)
      23:  *
      24:  * Revision 3.4.1.4  89/03/31  16:34:50  louie
      25:  * Add bit in flags which allow a peer to be synced to.  Changed a char to a bit
      26:  * field so that it is always signed.
      27:  *
      28:  * Revision 3.4.1.3  89/03/29  12:26:18  louie
      29:  * Removed some unused #defines.  Replaced MAXSTRATUM with NTP_INFIN per new
      30:  * spec.  The variable 'mode' in the peer structure has been renamed 'hmode'
      31:  * per the new spec.
      32:  *
      33:  * Revision 3.4.1.2  89/03/22  18:28:18  louie
      34:  * patch3: Use new RCS headers.
      35:  *
      36:  * Revision 3.4.1.1  89/03/20  00:02:53  louie
      37:  * 1
      38:  *
      39:  * Revision 3.4  89/03/17  18:37:00  louie
      40:  * Latest test release.
      41:  *
      42:  * Revision 3.3.1.1  89/03/17  18:23:49  louie
      43:  * Change CLOCK_FACTOR to be a power of 2.
      44:  *
      45:  * Revision 3.3  89/03/15  14:19:36  louie
      46:  * New baseline for next release.
      47:  *
      48:  * Revision 3.2.1.2  89/03/15  13:46:52  louie
      49:  * The version number for that particular flavor of ntpd <--> ntpdc interaction
      50:  * is now defined by NTPDC_VERSION.  The packet format for the ntpdc program
      51:  * has changed slightly to improve robustness when dealing with multiple packets
      52:  * of status data.
      53:  *
      54:  * Revision 3.2.1.1  89/03/09  17:11:24  louie
      55:  * patch1: Updated constants, which were previously in incorrect units.
      56:  *
      57:  * Revision 3.2  89/03/07  18:21:45  louie
      58:  * New version of UNIX NTP daemon and software based on the 6 March 1989
      59:  * draft of the new NTP protocol specification.  This version doesn't
      60:  * implement authentication, and accepts and send only NTP Version 1
      61:  * packets.
      62:  *
      63:  * Revision 3.1.1.1  89/02/15  08:54:42  louie
      64:  * *** empty log message ***
      65:  *
      66:  *
      67:  * Revision 3.1  89/01/30  14:43:07  louie
      68:  * Second UNIX NTP test release.
      69:  *
      70:  * Revision 3.0  88/12/12  16:01:07  louie
      71:  * Test release of new UNIX NTP software.  This version should conform to the
      72:  * revised NTP protocol specification.
      73:  *
      74:  */
      75:
      76: #ifndef FD_SET
      77: #define NFDBITS     32
      78: #define FD_SETSIZE  32
      79: #define FD_SET(n, p)    ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
      80: #define FD_CLR(n, p)    ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
      81: #define FD_ISSET(n, p)  ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
      82: #define FD_ZERO(p)  bzero((char *)(p), sizeof(*(p)))
      83: #endif
      84:
      85: #ifndef NBBY
      86: #define NBBY    8   /* number of bits per byte */
      87: #endif
      88:
      89: #define MAXNETIF    10
      90:
      91: struct intf {
      92:     int fd;
      93:     char *name;
      94:     struct sockaddr_in sin;
      95:     struct sockaddr_in bcast;
      96:     struct sockaddr_in mask;
      97:     int uses;
      98:     int if_flags;
      99: };
     100: extern struct intf addrs[];
     101: extern int nintf;
     102:
     103: /*
     104:  *  Definitions for the masses
     105:  */
     106: #define JAN_1970    2208988800  /* 1970 - 1900 in seconds */
     107:
     108: /*
     109:  *  Daemon specific (ntpd.c)
     110:  */
     111: #define SHIFT_MASK  0xff    /* number of intervals to wait */
     112:
     113: #ifndef WAYTOOBIG
     114: #define WAYTOOBIG   1000.0  /* Too many seconds to correct, something is
     115: 				 * really wrong */
     116: #endif
     117:
     118: #ifndef XTAL
     119: #define XTAL    1   /* crystal controlled clock by default */
     120: #endif
     121:
     122: #ifndef NTPINITFILE
     123: #define NTPINITFILE "/etc/ntp.conf"
     124: #endif
     125: #ifndef NTPDRIFTCOMP
     126: #define NTPDRIFTCOMP    "/etc/ntp.drift"
     127: #endif
     128:
     129: struct list {
     130:     struct ntp_peer *head;
     131:     struct ntp_peer *tail;
     132:     int members;
     133: };
     134:
     135: #define STRMCMP(a, cond, b) \
     136:     (((a) == UNSPECIFIED ? NTP_INFIN+1 : a) cond \
     137:      ((b) == UNSPECIFIED ? NTP_INFIN+1 : (b)))
     138:
     139:
     140: /*
     141:  *  Definitions outlined in the NTP spec
     142:  */
     143: #define NTP_VERSION 1
     144: #define NTP_PORT    123 /* for ref only (see /etc/services) */
     145: #define NTP_INFIN   15
     146: #define NTP_MAXAGE  86400
     147: #define NTP_MAXSKW  0.01    /* seconds */
     148: #define NTP_MINDIST 0.02    /* seconds */
     149: #ifdef  REFCLOCK
     150: #define NTP_REFMAXSKW   0.001   /* seconds (for REFCLOCKs) */
     151: #define NTP_REFMINDIST  0.001   /* seconds (for REFCLOCKs) */
     152: #endif
     153: #define NTP_MINPOLL 6   /* (64) seconds between messages */
     154: #define NTP_MAXPOLL 10  /* (1024) secs to poll */
     155: #define NTP_WINDOW  8   /* size of shift register */
     156: #define NTP_MAXWGT  8   /* maximum allowable dispersion */
     157: #define NTP_MAXLIST 5   /* max size of selection list */
     158: #define NTP_MAXSTRA 2   /* max number of strata in selection list */
     159: #define X_NTP_CANDIDATES 64 /* number of peers to consider when doing
     160: 				   clock selection */
     161: #define NTP_SELECT  0.75    /* weight used to compute dispersion */
     162:
     163: #define PEER_MAXDISP    64.0    /* Maximum dispersion  */
     164: #define PEER_THRESHOLD  0.5 /* dispersion threshold */
     165: #define PEER_FILTER 0.5 /* filter weight */
     166:
     167: #if XTAL == 0
     168: #define PEER_SHIFT  4
     169: #define NTP_WINDOW_SHIFT_MASK 0x0f
     170: #else
     171: #define PEER_SHIFT  8
     172: #define NTP_WINDOW_SHIFT_MASK 0xff
     173: #endif
     174:
     175:
     176: /*
     177:  *  5.1 Uniform Phase Adjustments
     178:  *  Clock parameters
     179:  */
     180: #define CLOCK_UPDATE    8   /* update interval (1<<CLOCK_UPDATE secs) */
     181: #if XTAL
     182: #define CLOCK_ADJ   2   /* adjustment interval (1<<CLOCK_ADJ secs) */
     183: #define CLOCK_PHASE 8   /* phase shift */
     184: #define CLOCK_MAX   0.128   /* maximum aperture (milliseconds) */
     185: #else
     186: #define CLOCK_ADJ   0
     187: #define CLOCK_PHASE 6   /* phase shift */
     188: #define CLOCK_MAX   0.512   /* maximum aperture (milliseconds) */
     189: #endif
     190: #define CLOCK_FREQ  10  /* frequency shift */
     191: #define CLOCK_TRACK 8
     192: #define CLOCK_COMP  4
     193: #define CLOCK_FACTOR    18
     194:
     195: /*
     196:  * Structure definitions for NTP fixed point values
     197:  *
     198:  *    0			  1		      2			  3
     199:  *    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     200:  *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     201:  *   |			       Integer Part			     |
     202:  *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     203:  *   |			       Fraction Part			     |
     204:  *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     205:  *
     206:  *    0			  1		      2			  3
     207:  *    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     208:  *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     209:  *   |		  Integer Part	     |	   Fraction Part	     |
     210:  *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     211: */
     212: struct l_fixedpt {
     213:     u_long int_part;
     214:     u_long fraction;
     215: };
     216:
     217: struct s_fixedpt {
     218:     u_short int_part;
     219:     u_short fraction;
     220: };
     221:
     222: /*  =================  Table 3.3. Packet Variables   ================= */
     223: /*
     224:  *    0			  1		      2			  3
     225:  *    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     226:  *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     227:  *   |LI | VN  | Mode|	  Stratum    |	    Poll     |	 Precision   |
     228:  *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     229:  *   |			   Synchronizing Distance		     |
     230:  *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     231:  *   |			  Synchronizing Dispersion		     |
     232:  *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     233:  *   |			Reference Clock Identifier		     |
     234:  *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     235:  *   |								     |
     236:  *   |		       Reference Timestamp (64 bits)		     |
     237:  *   |								     |
     238:  *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     239:  *   |								     |
     240:  *   |		       Originate Timestamp (64 bits)		     |
     241:  *   |								     |
     242:  *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     243:  *   |								     |
     244:  *   |			Receive Timestamp (64 bits)		     |
     245:  *   |								     |
     246:  *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     247:  *   |								     |
     248:  *   |			Transmit Timestamp (64 bits)		     |
     249:  *   |								     |
     250:  *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     251: */
     252: struct ntpdata {
     253:     u_char status;      /* status of local clock and leap info */
     254:     u_char stratum;     /* Stratum level */
     255:     u_char ppoll;       /* poll value */
     256:     char   precision;
     257:     struct s_fixedpt distance;
     258:     struct s_fixedpt dispersion;
     259:     u_long refid;
     260:     struct l_fixedpt reftime;
     261:     struct l_fixedpt org;
     262:     struct l_fixedpt rec;
     263:     struct l_fixedpt xmt;
     264: };
     265: /*
     266:  *	Leap Second Codes (high order two bits)
     267:  */
     268: #define NO_WARNING  0x00    /* no warning */
     269: #define PLUS_SEC    0x40    /* add a second (61 seconds) */
     270: #define MINUS_SEC   0x80    /* minus a second (59 seconds) */
     271: #define ALARM       0xc0    /* alarm condition (clock unsynchronized) */
     272:
     273: /*
     274:  *	Clock Status Bits that Encode Version
     275:  */
     276: #define NTPVERSION_1    0x08
     277: #define VERSIONMASK 0x38
     278: #define LEAPMASK    0xc0
     279: #define MODEMASK    0x07
     280:
     281: /*
     282:  *	Code values
     283:  */
     284: #define MODE_UNSPEC 0   /* unspecified */
     285: #define MODE_SYM_ACT    1   /* symmetric active */
     286: #define MODE_SYM_PAS    2   /* symmetric passive */
     287: #define MODE_CLIENT 3   /* client */
     288: #define MODE_SERVER 4   /* server */
     289: #define MODE_BROADCAST  5   /* broadcast */
     290: #define MODE_RES1   6   /* reserved */
     291: #define MODE_RES2   7   /* reserved */
     292:
     293: /*
     294:  *	Stratum Definitions
     295:  */
     296: #define UNSPECIFIED 0
     297: #define PRIM_REF    1   /* radio clock */
     298: #define INFO_QUERY  62  /* **** THIS implementation dependent **** */
     299: #define INFO_REPLY  63  /* **** THIS implementation dependent **** */
     300:
     301:
     302: /* =================  table 3.2 Peer Variables	================= */
     303: struct ntp_peer {
     304:     struct ntp_peer *next, *prev;
     305:     struct sockaddr_in src;     /* both peer.srcadr and
     306: 					   peer.srcport */
     307:     int flags;          /* local flags */
     308: #define PEER_FL_CONFIG      1
     309: #define PEER_FL_AUTHENABLE  2
     310: #define PEER_FL_SANE        0x0100  /* sane peer */
     311: #define PEER_FL_CANDIDATE   0x0200  /* candidate peer */
     312: #define PEER_FL_SYNC        0x1000  /* peer can bet sync'd to */
     313: #define PEER_FL_BCAST       0x2000  /* broadcast peer */
     314: #define PEER_FL_REFCLOCK    0x4000  /* peer is a local reference clock */
     315: #define PEER_FL_SELECTED    0x8000  /* actually used by query routine */
     316:
     317:     int sock;           /* index into sockets to derive
     318: 					   peer.dstadr and peer.dstport */
     319:     u_char  leap;           /* receive */
     320:     u_char  hmode;          /* receive */
     321:     u_char  stratum;        /* receive */
     322:     u_char  ppoll;          /* receive */
     323:     u_char  hpoll;          /* poll update */
     324:     short   precision;      /* receive */
     325:     struct  s_fixedpt distance; /* receive */
     326:     struct  s_fixedpt dispersion;   /* receive */
     327:     u_long  refid;          /* receive */
     328:     struct  l_fixedpt reftime;  /* receive */
     329:     struct  l_fixedpt org;      /* receive, clear */
     330:     struct  l_fixedpt rec;      /* receive, clear */
     331:     struct  l_fixedpt xmt;      /* transmit, clear */
     332:     u_long  reach;          /* receive, transmit, clear */
     333:     u_long  valid;          /* packet, transmit, clear */
     334:     u_long  timer;          /* receive, transmit, poll update */
     335:     long    stopwatch;      /* <<local>> for timing */
     336:     /*
     337: 	 * first order offsets
     338: 	 */
     339:     struct  filter {
     340:         short samples;      /* <<local>> */
     341:         double offset[PEER_SHIFT];
     342:         double delay[PEER_SHIFT];
     343:     } filter;           /* filter, clear */
     344:
     345:     double  estdelay;       /* filter */
     346:     double  estoffset;      /* filter */
     347:     double  estdisp;        /* filter */
     348:
     349:     u_long  pkt_sent;       /* <<local>> */
     350:     u_long  pkt_rcvd;       /* <<local>> */
     351:     u_long  pkt_dropped;        /* <<local>> */
     352: };
     353:
     354: /* ================= table 3.1:  System Variables ================= */
     355:
     356: struct sysdata {            /* procedure */
     357:     u_char leap;            /* clock update */
     358:     u_char stratum;         /* clock update */
     359:     short precision;        /* system */
     360:     struct s_fixedpt distance;  /* clock update */
     361:     struct s_fixedpt dispersion;    /* clock update */
     362:     u_long refid;           /* clock update */
     363:     struct l_fixedpt reftime;   /* clock update */
     364:     int hold;           /* clock update */
     365:     struct ntp_peer *peer;      /* selection */
     366:     int maxpeers;           /* <<local>> */
     367:     u_char filler;      /* put here for %&*%$$ SUNs */
     368: };
     369:
     370: #define NTPDC_VERSION   2
     371:
     372: /*
     373:  *  These structures are used to pass information to the ntpdc (control)
     374:  *  program.  They are unique to this implementation and not part of the
     375:  *  NTP specification.
     376:  */
     377: struct xclockinfo {
     378:     u_long net_address;
     379:     u_long my_address;
     380:     u_short port;
     381:     u_short flags;
     382:     u_long pkt_sent;
     383:     u_long pkt_rcvd;
     384:     u_long pkt_dropped;
     385:     u_long timer;
     386:     u_char leap;
     387:     u_char stratum;
     388:     u_char ppoll;
     389:     char   precision;
     390:
     391:     u_char hpoll;
     392:     u_char filler1;
     393:     u_short reach;
     394:
     395:     long    estdisp;            /* scaled by 1000 */
     396:     long    estdelay;           /* in milliseconds */
     397:     long    estoffset;          /* in milliseconds */
     398:     u_long refid;
     399:     struct l_fixedpt reftime;
     400:     struct info_filter {
     401:         short index;
     402:         short filler;
     403:         long offset[PEER_SHIFT];    /* in milliseconds */
     404:         long delay[PEER_SHIFT];     /* in milliseconds */
     405:     } info_filter;
     406: };
     407:
     408: struct ntpinfo {
     409:     u_char version;
     410:     u_char type;        /* request type (stratum in ntp packets) */
     411:     u_char count;       /* number of entries in this packet */
     412:     u_char seq;     /* sequence number of this packet */
     413:
     414:     u_char npkts;       /* total number of packets */
     415:     u_char peers;
     416:     u_char fill3;
     417:     u_char fill4;
     418: };

#### Defined struct's

filter defined in line 339; never used
info_filter defined in line 400; never used
intf defined in line 91; used 4 times

- in line 100(2)
- in /usr/src/usr.sbin/ntp/ntp_sock.c line 61(2)

l_fixedpt defined in line 212; used 36 times

- in line 260-263(8), 328-331(8), 363(2), 399(2)
- in /usr/src/usr.sbin/ntp/ntp.c line 134(2)
- in /usr/src/usr.sbin/ntp/ntpsubs.c line 68(2), 106(2), 162(2), 216(2), 229(2)
- in /usr/src/usr.sbin/ntp/test.c line 93(2), 115(2)

list defined in line 129; used 8 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 151(2)
- in /usr/src/usr.sbin/ntp/ntpd.c line 130(2), 548(2), 611(2)

ntp_peer defined in line 303; used 78 times

- in line 130-131(2), 304(2), 365(2)
- in /usr/src/usr.sbin/ntp/ntp_proto.c line 142(2), 152(2), 172(2), 269(2), 323(2), 346(2), 362(2), 424(2), 430(4), 549(2), 657(2), 723(2), 784(2), 812(2), 870(2), 949-951(4), 1217(2)
- in /usr/src/usr.sbin/ntp/ntpd.c line 444-449(4), 458(2), 465(2), 512(2), 549-551(4), 612(2), 643(2), 721(2), 826(4), 894-895(4), 939-940(4), 1118(2)

ntpdata defined in line 252; used 28 times

- in /usr/src/usr.sbin/ntp/ntp.c line 135-136(4)
- in /usr/src/usr.sbin/ntp/ntp_proto.c line 175-176(4), 322(2), 358(2), 547(2)
- in /usr/src/usr.sbin/ntp/ntpd.c line 158(2), 176(2), 464(2), 1113(2)
- in /usr/src/usr.sbin/ntp/ntpdc.c line 263(4), 293(2)

ntpinfo defined in line 408; used 8 times

- in /usr/src/usr.sbin/ntp/ntpd.c line 1117(4)
- in /usr/src/usr.sbin/ntp/ntpdc.c line 187(4)

s_fixedpt defined in line 217; used 18 times

- in line 257-258(4), 325-326(4), 360-361(4)
- in /usr/src/usr.sbin/ntp/ntpsubs.c line 143(2), 187(2)
- in /usr/src/usr.sbin/ntp/test.c line 95(2)

sysdata defined in line 356; used 6 times

- in /usr/src/usr.sbin/ntp/ntp_adjust.c line 94(2)
- in /usr/src/usr.sbin/ntp/ntp_proto.c line 150(2)
- in /usr/src/usr.sbin/ntp/ntpd.c line 159(2)

xclockinfo defined in line 377; used 14 times

- in /usr/src/usr.sbin/ntp/ntpd.c line 1119(2), 1133(2), 1181(2)
- in /usr/src/usr.sbin/ntp/ntpdc.c line 188(2), 244(2), 306(2), 352(2)

#### Defined macros

ALARM defined in line 271; used 5 times

- in /usr/src/usr.sbin/ntp/ntp.c line 332
- in /usr/src/usr.sbin/ntp/ntp_proto.c line 337, 765, 1258
- in /usr/src/usr.sbin/ntp/ntpd.c line 689

CLOCK_ADJ defined in line 186; used 11 times

- in /usr/src/usr.sbin/ntp/ntp_adjust.c line 247
- in /usr/src/usr.sbin/ntp/ntpd.c line 362, 653-656(2), 671, 680, 686-690(2), 908, 950, 956

CLOCK_COMP defined in line 192; used 1 times

- in /usr/src/usr.sbin/ntp/ntp_adjust.c line 187

CLOCK_FACTOR defined in line 193; used 1 times

- in /usr/src/usr.sbin/ntp/ntp_adjust.c line 188

CLOCK_FREQ defined in line 190; used 1 times

- in /usr/src/usr.sbin/ntp/ntp_adjust.c line 268

CLOCK_MAX defined in line 188; used 2 times

- in /usr/src/usr.sbin/ntp/ntp_adjust.c line 150(2)

CLOCK_PHASE defined in line 187; used 1 times

- in /usr/src/usr.sbin/ntp/ntp_adjust.c line 258

CLOCK_TRACK defined in line 191; used 1 times

- in /usr/src/usr.sbin/ntp/ntp_adjust.c line 204

CLOCK_UPDATE defined in line 180; never used
FD_CLR defined in line 80; never used
FD_ISSET defined in line 81; used 2 times

- in /usr/src/usr.sbin/ntp/ntpd.c line 372, 393

FD_SET defined in line 79; used 5 times

- in line 76
- in /usr/src/usr.sbin/ntp/ntp.c line 203
- in /usr/src/usr.sbin/ntp/ntpd.c line 339
- in /usr/src/usr.sbin/ntp/ntpdc.c line 202, 220

FD_SETSIZE defined in line 78; used 3 times

- in /usr/src/usr.sbin/ntp/ntp.c line 224
- in /usr/src/usr.sbin/ntp/ntpd.c line 371
- in /usr/src/usr.sbin/ntp/ntpdc.c line 209

FD_ZERO defined in line 82; used 3 times

- in /usr/src/usr.sbin/ntp/ntp.c line 202
- in /usr/src/usr.sbin/ntp/ntpd.c line 337
- in /usr/src/usr.sbin/ntp/ntpdc.c line 201

INFO_QUERY defined in line 298; used 3 times

- in /usr/src/usr.sbin/ntp/ntpd.c line 421, 1123
- in /usr/src/usr.sbin/ntp/ntpdc.c line 288

INFO_REPLY defined in line 299; used 4 times

- in /usr/src/usr.sbin/ntp/ntpd.c line 422, 1126, 1179
- in /usr/src/usr.sbin/ntp/ntpdc.c line 222

JAN_1970 defined in line 106; used 8 times

- in /usr/src/usr.sbin/ntp/ntp.c line 279, 285, 291, 297, 308, 320
- in /usr/src/usr.sbin/ntp/ntpsubs.c line 222, 232

LEAPMASK defined in line 278; used 4 times

- in /usr/src/usr.sbin/ntp/ntp.c line 253, 332
- in /usr/src/usr.sbin/ntp/ntp_proto.c line 562
- in /usr/src/usr.sbin/ntp/ntpd.c line 472

MAXNETIF defined in line 89; never used
MINUS_SEC defined in line 270; never used
MODEMASK defined in line 279; used 3 times

- in /usr/src/usr.sbin/ntp/ntp.c line 255
- in /usr/src/usr.sbin/ntp/ntp_proto.c line 384
- in /usr/src/usr.sbin/ntp/ntpd.c line 473

MODE_BROADCAST defined in line 289; used 3 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 488, 497
- in /usr/src/usr.sbin/ntp/ntpd.c line 834

MODE_CLIENT defined in line 287; used 5 times

- in /usr/src/usr.sbin/ntp/ntp.c line 193
- in /usr/src/usr.sbin/ntp/ntp_proto.c line 406-409(2)
- in /usr/src/usr.sbin/ntp/ntpd.c line 846, 954

MODE_RES1 defined in line 290; never used
MODE_RES2 defined in line 291; never used
MODE_SERVER defined in line 288; used 1 times

- in /usr/src/usr.sbin/ntp/ntpd.c line 670

MODE_SYM_ACT defined in line 285; used 6 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 404, 488, 497
- in /usr/src/usr.sbin/ntp/ntpd.c line 844, 906, 948

MODE_SYM_PAS defined in line 286; used 5 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 418, 439
- in /usr/src/usr.sbin/ntp/ntpd.c line 522, 848, 960

MODE_UNSPEC defined in line 284; never used
NBBY defined in line 86; used 3 times

- in line 85
- in /usr/src/usr.sbin/ntp/ntp_proto.c line 610, 1104

NFDBITS defined in line 77; used 6 times

- in line 79-81(6)

NO_WARNING defined in line 268; used 1 times

- in /usr/src/usr.sbin/ntp/ntp.c line 193

NTPDC_VERSION defined in line 370; used 3 times

- in /usr/src/usr.sbin/ntp/ntpd.c line 1125
- in /usr/src/usr.sbin/ntp/ntpdc.c line 225-227(2)

NTPDRIFTCOMP defined in line 126; used 2 times

- in line 125
- in /usr/src/usr.sbin/ntp/ntpd.c line 138

NTPINITFILE defined in line 123; used 2 times

- in line 122
- in /usr/src/usr.sbin/ntp/ntpd.c line 137

NTPVERSION_1 defined in line 276; used 4 times

- in /usr/src/usr.sbin/ntp/ntp.c line 193
- in /usr/src/usr.sbin/ntp/ntp_proto.c line 179
- in /usr/src/usr.sbin/ntp/ntpd.c line 432
- in /usr/src/usr.sbin/ntp/ntpdc.c line 287

NTP_INFIN defined in line 145; used 3 times

- in line 136-137(2)
- in /usr/src/usr.sbin/ntp/ntp_proto.c line 1229

NTP_MAXAGE defined in line 146; used 5 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 1260
- in /usr/src/usr.sbin/ntp/ntpd.c line 687-697(4)

NTP_MAXLIST defined in line 157; used 2 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 1034-1035(2)

NTP_MAXPOLL defined in line 154; used 3 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 310, 817, 824

NTP_MAXSKW defined in line 147; used 3 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 606-608(2), 1102

NTP_MAXSTRA defined in line 158; used 1 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 1045

NTP_MAXWGT defined in line 156; used 2 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 1248-1249(2)

NTP_MINDIST defined in line 148; used 2 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 619-622(2)

NTP_MINPOLL defined in line 153; used 14 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 247, 307-311(2), 664, 741, 793, 802-805(2), 817-829(4)
- in /usr/src/usr.sbin/ntp/ntpd.c line 524-526(2)

NTP_PORT defined in line 144; used 7 times

- in /usr/src/usr.sbin/ntp/ntp.c line 153-154(2)
- in /usr/src/usr.sbin/ntp/ntpd.c line 314-315(2), 935
- in /usr/src/usr.sbin/ntp/ntpdc.c line 283-284(2)

NTP_REFMAXSKW defined in line 150; used 1 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 608

NTP_REFMINDIST defined in line 151; used 1 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 622

NTP_SELECT defined in line 161; used 1 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 1096

NTP_VERSION defined in line 143; never used
NTP_WINDOW defined in line 155; used 2 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 795
- in /usr/src/usr.sbin/ntp/ntpd.c line 534

NTP_WINDOW_SHIFT_MASK defined in line 172; used 3 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 225, 275
- in /usr/src/usr.sbin/ntp/ntpd.c line 1154

PEER_FILTER defined in line 165; used 1 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 936

PEER_FL_AUTHENABLE defined in line 309; used 2 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 191, 482

PEER_FL_BCAST defined in line 313; used 3 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 208, 472
- in /usr/src/usr.sbin/ntp/ntpd.c line 833

PEER_FL_CANDIDATE defined in line 311; used 4 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 966, 1089, 1148
- in /usr/src/usr.sbin/ntp/ntpdc.c line 328

PEER_FL_CONFIG defined in line 308; used 7 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 278, 505, 513, 519
- in /usr/src/usr.sbin/ntp/ntpd.c line 905, 945
- in /usr/src/usr.sbin/ntp/ntpdc.c line 324

PEER_FL_REFCLOCK defined in line 314; used 8 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 208, 218, 608, 621, 680, 828
- in /usr/src/usr.sbin/ntp/ntpd.c line 905, 1211

PEER_FL_SANE defined in line 310; used 3 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 966-971(2)
- in /usr/src/usr.sbin/ntp/ntpdc.c line 326

PEER_FL_SELECTED defined in line 315; used 2 times

- in /usr/src/usr.sbin/ntp/ntpd.c line 1144
- in /usr/src/usr.sbin/ntp/ntpdc.c line 330

PEER_FL_SYNC defined in line 312; used 6 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 451, 1225
- in /usr/src/usr.sbin/ntp/ntpd.c line 909, 951, 957-961(2)

PEER_MAXDISP defined in line 163; used 5 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 794, 927-932(3)
- in /usr/src/usr.sbin/ntp/ntpd.c line 527

PEER_SHIFT defined in line 171; used 19 times

- in line 341-342(2), 403-404(2)
- in /usr/src/usr.sbin/ntp/ntp_proto.c line 741, 873-882(4), 925
- in /usr/src/usr.sbin/ntp/ntpd.c line 1163
- in /usr/src/usr.sbin/ntp/ntpdc.c line 309(2), 315, 356-360(3), 392-396(2)

PEER_THRESHOLD defined in line 164; used 1 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 313

PLUS_SEC defined in line 269; never used
PRIM_REF defined in line 297; never used
SHIFT_MASK defined in line 111; used 2 times

- in /usr/src/usr.sbin/ntp/ntpdc.c line 348, 372

STRMCMP defined in line 135; used 2 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 506, 520

UNSPECIFIED defined in line 296; used 3 times

- in line 136-137(2)
- in /usr/src/usr.sbin/ntp/ntp.c line 194

VERSIONMASK defined in line 277; used 3 times

- in /usr/src/usr.sbin/ntp/ntp.c line 254
- in /usr/src/usr.sbin/ntp/ntpd.c line 432, 472

WAYTOOBIG defined in line 114; used 3 times

- in line 113
- in /usr/src/usr.sbin/ntp/ntp.c line 327
- in /usr/src/usr.sbin/ntp/ntpd.c line 155

XTAL defined in line 119; used 4 times

- in line 118, 167, 181
- in /usr/src/usr.sbin/ntp/ntp_proto.c line 819

X_NTP_CANDIDATES defined in line 159; used 2 times

- in /usr/src/usr.sbin/ntp/ntp_proto.c line 954, 962

#### Usage of this include

ntp.h used 8 times

- in /usr/src/usr.sbin/ntp/ntp.c line 102
- in /usr/src/usr.sbin/ntp/ntp_adjust.c line 85
- in /usr/src/usr.sbin/ntp/ntp_proto.c line 138
- in /usr/src/usr.sbin/ntp/ntp_sock.c line 58
- in /usr/src/usr.sbin/ntp/ntpd.c line 121
- in /usr/src/usr.sbin/ntp/ntpdc.c line 92
- in /usr/src/usr.sbin/ntp/ntpsubs.c line 56
- in /usr/src/usr.sbin/ntp/test.c line 62

Last modified: 2000-04-12 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 2500 |