| /netbsd/src/external/bsd/ntp/dist/tests/libntp/ |
| D | lfpfunc.c | 31 int l_fp_scmp(const l_fp first, const l_fp second); 32 int l_fp_ucmp(const l_fp first, l_fp second); 33 l_fp l_fp_init(int32 i, u_int32 f); 34 l_fp l_fp_add(const l_fp first, const l_fp second); 35 l_fp l_fp_subtract(const l_fp first, const l_fp second); 36 l_fp l_fp_negate(const l_fp first); 37 l_fp l_fp_abs(const l_fp first); 38 int l_fp_signum(const l_fp first); 39 double l_fp_convert_to_double(const l_fp first); 40 l_fp l_fp_init_from_double( double rhs); [all …]
|
| D | strtolfp.c | 31 static const char* fmtLFP(const l_fp *e, const l_fp *a) in fmtLFP() 43 l_fp expected = {{500},0}; in test_PositiveInteger() 44 l_fp actual, actual_ms; in test_PositiveInteger() 57 l_fp expected; in test_NegativeInteger() 61 l_fp actual, actual_ms; in test_NegativeInteger() 74 l_fp expected = {{500}, HALF}; in test_PositiveFraction() 75 l_fp actual, actual_ms; in test_PositiveFraction() 88 l_fp expected; in test_NegativeFraction() 92 l_fp actual, actual_ms; in test_NegativeFraction() 105 l_fp expected = {{300}, QUARTER_PROMILLE_APPRX}; in test_PositiveMsFraction() [all …]
|
| D | hextolfp.c | 22 l_fp actual; in test_PositiveInteger() 24 l_fp expected = {{4096}, 0}; /* 16^3, no fraction part. */ in test_PositiveInteger() 33 l_fp actual; in test_NegativeInteger() 35 l_fp expected = {{-1}, 0}; in test_NegativeInteger() 44 l_fp actual; in test_PositiveFraction() 46 l_fp expected = {{8192}, HALF}; in test_PositiveFraction() 55 l_fp actual; in test_NegativeFraction() 57 l_fp expected = {{-1}, QUARTER}; /* -1 + 0.25 */ in test_NegativeFraction() 66 l_fp actual; in test_IllegalNumberOfInteger() 74 l_fp actual; in test_IllegalChar()
|
| D | lfptostr.c | 50 l_fp test = {{200}, 0}; /* exact 200.0000000000 */ in test_PositiveInteger() 58 l_fp test = {{-100}, 0}; /* -100 */ in test_NegativeInteger() 66 l_fp test = {{200}, ONE_FOURTH}; /* 200.25 */ in test_PositiveIntegerWithFraction() 74 l_fp test = {{-100}, ONE_FOURTH}; /* -99.75 */ in test_NegativeIntegerWithFraction() 82 l_fp test = {{10}, ONE_FOURTH}; /* 10.25 */ in test_RoundingDownToInteger() 90 l_fp test = {{10}, HALF}; /* 10.5 */ in test_RoundingMiddleToInteger() 98 l_fp test = {{5}, THREE_FOURTH}; /* 5.75 */ in test_RoundingUpToInteger() 106 l_fp test = {{8}, ONE_FOURTH}; /* 8.25 */ in test_SingleDecimal() 114 l_fp test = {{1}, HALF_PROMILLE_UP}; /* slightly more than 1.0005 */ in test_MillisecondsRoundingUp() 124 l_fp test = {{1}, HALF_PROMILLE_DOWN}; /* slightly less than 1.0005 */ in test_MillisecondsRoundingDown() [all …]
|
| D | timevalops.c | 34 l_fp l_fp_init(int32 i, u_int32 f); 36 bool AssertFpClose(const l_fp m, const l_fp n, const l_fp limit); 101 l_fp 104 l_fp temp; in l_fp_init() 132 AssertFpClose(const l_fp m, const l_fp n, const l_fp limit) in AssertFpClose() 134 l_fp diff; in AssertFpClose() 613 l_fp lfpClose = l_fp_init(0, 1); in test_ToLFPbittest() 618 l_fp E = l_fp_init(1, my_tick_to_tsf(i)); in test_ToLFPbittest() 619 l_fp r; in test_ToLFPbittest() 632 l_fp lfpClose = l_fp_init(0, 1); in test_ToLFPrelPos() [all …]
|
| D | timespecops.c | 70 l_fp l_fp_init(int32 i, u_int32 f); 71 bool AssertFpClose(const l_fp m, const l_fp n, const l_fp limit); 109 l_fp 112 l_fp temp; in l_fp_init() 122 AssertFpClose(const l_fp m, const l_fp n, const l_fp limit) in AssertFpClose() 124 l_fp diff; in AssertFpClose() 613 l_fp lfpClose = l_fp_init(0, 1); in test_ToLFPbittest() 618 l_fp E= l_fp_init(1, my_tick_to_tsf(i)); in test_ToLFPbittest() 619 l_fp r; in test_ToLFPbittest() 636 l_fp E = l_fp_init(1, fdata[i].frac); in test_ToLFPrelPos() [all …]
|
| D | tvtots.c | 20 l_fp expected = {{500}, 0}; in test_Seconds() 21 l_fp actual; in test_Seconds() 38 l_fp expected = {{0}, HALF_PROMILLE_UP}; in test_MicrosecondsRounded() 39 l_fp actual; in test_MicrosecondsRounded() 52 const l_fp expected = {{10}, HALF}; /* 0.5 exact */ in test_MicrosecondsExact() 53 l_fp actual; in test_MicrosecondsExact()
|
| D | buftvtots.c | 27 const l_fp expected = {{0 + JAN_1970}, 0}; in test_ZeroBuffer() 29 l_fp actual; in test_ZeroBuffer() 46 const l_fp expected = {{5 + JAN_1970}, HALF}; in test_IntegerAndFractionalBuffer() 48 l_fp actual; in test_IntegerAndFractionalBuffer() 73 l_fp actual; in test_IllegalMicroseconds() 92 l_fp actual; in test_AlwaysFalseOnWindows()
|
| D | refidsmear.c | 37 void ltor(l_fp l, char *er); 52 l_fp l; in rtol() 75 l_fp l; in rtoltor() 100 ltor(l_fp l, char *er) in ltor()
|
| /netbsd/src/external/bsd/ntp/dist/include/ |
| D | mbg_gps166.h | 522 typedef l_fp XYZ[N_XYZ]; 544 typedef l_fp LLA[N_LLA]; 837 l_fp A0; ///< +- Clock Correction Coefficient 0 [sec] 838 l_fp A1; ///< +- Clock Correction Coefficient 1 [sec/sec] 880 l_fp sqrt_A; ///< Square Root of semi-major Axis [sqrt(m)] 881 l_fp e; ///< Eccentricity [---] 882 l_fp M0; ///< +- Mean Anomaly at Ref. Time [rad] 883 l_fp omega; ///< +- Argument of Perigee [rad] 884 l_fp OMEGA0; ///< +- Longit. of Asc. Node of orbit plane [rad] 885 l_fp OMEGADOT; ///< +- Rate of Right Ascension [rad/sec] [all …]
|
| D | ntp_calgps.h | 67 gpscal_add_offset(TGpsDatum *datum, l_fp offset); 70 gpscal_from_calendar_ex(TcCivilDate*, l_fp fofs, int/*BOOL*/ warp); 73 gpscal_from_calendar(TcCivilDate *pCiv, l_fp fofs) { in gpscal_from_calendar() 78 gpscal_from_gpsweek(uint16_t w, int32_t s, l_fp fofs); 81 gpscal_from_weektime1(int32_t wsecs, l_fp fofs, l_fp pivot); 84 gpscal_from_weektime2(int32_t wsecs, l_fp fofs, TcGpsDatum *pivot); 92 extern l_fp 105 gpsntp_add_offset(TNtpDatum *datum, l_fp offset); 108 gpsntp_from_calendar_ex(TcCivilDate*, l_fp fofs, int/*BOOL*/ warp); 111 gpsntp_from_calendar(TcCivilDate * pCiv, l_fp fofs) { in gpsntp_from_calendar() [all …]
|
| D | ntp_refclock.h | 125 l_fp times[NCLKBUGTIMES]; /* real times */ 167 l_fp lastref; /* reference timestamp */ 168 l_fp lastrec; /* receive timestamp */ 233 extern void refclock_process_offset(struct refclockproc *, l_fp, 234 l_fp, double); 238 extern int refclock_gtlin (struct recvbuf *, char *, int, l_fp *); 239 extern int refclock_gtraw (struct recvbuf *, char *, int, l_fp *); 261 const struct refclock_atom*, l_fp *rcvtime ,
|
| D | ntp_request.h | 163 l_fp tstamp; /* time stamp, for authentication */ 173 l_fp tstamp; /* time stamp, for authentication */ 383 l_fp offset; /* peer.estoffset */ 421 l_fp reftime; /* peer.reftime */ 422 l_fp org; /* peer.org */ 423 l_fp rec; /* peer.rec */ 424 l_fp xmt; /* peer.xmt */ 426 l_fp filtoffset[NTP_SHIFT]; /* offset shift register */ 430 l_fp offset; /* peer.estoffset */ 486 l_fp last_offset; [all …]
|
| D | timespecops.h | 197 extern l_fp tspec_intv_to_lfp(struct timespec x); 200 static inline l_fp 205 l_fp y; in tspec_stamp_to_lfp() 214 extern struct timespec lfp_intv_to_tspec(l_fp x); 215 extern struct timespec lfp_uintv_to_tspec(l_fp x); 222 extern struct timespec lfp_stamp_to_tspec(l_fp x, const time_t *pivot);
|
| D | ntp.h | 307 l_fp reftime; /* update epoch */ 362 l_fp rec; /* receive time stamp */ 363 l_fp xmt; /* transmit time stamp */ 364 l_fp dst; /* destination timestamp */ 365 l_fp aorg; /* origin timestamp */ 366 l_fp borg; /* alternate origin timestamp */ 367 l_fp bxmt; /* most recent broadcast transmit timestamp */ 368 l_fp nonce; /* Value of nonce we sent as the xmt stamp */ 560 l_fp reftime; /* last update time */ 561 l_fp org; /* originate time stamp */ [all …]
|
| D | timevalops.h | 350 static inline l_fp 356 l_fp y; in tval_intv_to_lfp() 366 static inline l_fp 371 l_fp y; in tval_stamp_to_lfp() 382 l_fp x in lfp_intv_to_tval() 386 l_fp absx; in lfp_intv_to_tval() 407 l_fp x in lfp_uintv_to_tval() 425 l_fp x, in lfp_stamp_to_tval()
|
| D | ntp_fp.h | 38 } l_fp; typedef 352 extern int atolfp (const char *, l_fp *); 353 extern int buftvtots (const char *, l_fp *); 356 extern int hextolfp (const char *, l_fp *); 357 extern void gpstolfp (u_int, u_int, unsigned long, l_fp *); 358 extern int mstolfp (const char *, l_fp *); 359 extern char * prettydate (l_fp *); 360 extern char * gmprettydate (l_fp *); 361 extern char * uglydate (l_fp *); 366 extern void get_systime (l_fp *);
|
| /netbsd/src/external/bsd/ntp/dist/libntp/ |
| D | ntp_calgps.c | 32 l_fp 34 l_fp lfp, in ntpfp_with_fudge() 38 l_fp fpo; in ntpfp_with_fudge() 107 l_fp offset in gpsntp_add_offset() 125 l_fp offset in gpscal_add_offset() 192 l_fp fofs, in _gpsntp_from_daytime() 229 l_fp fofs, in gpsntp_from_daytime2_ex() 249 l_fp fofs, in gpsntp_from_daytime1_ex() 250 l_fp pivot, in gpsntp_from_daytime1_ex() 273 l_fp fofs, in gpsntp_from_calendar_ex() [all …]
|
| D | timespecops.c | 152 l_fp 158 l_fp y; in tspec_intv_to_lfp() 170 l_fp x in lfp_intv_to_tspec() 174 l_fp absx; in lfp_intv_to_tspec() 195 l_fp x in lfp_uintv_to_tspec() 213 l_fp x, in lfp_stamp_to_tspec()
|
| /netbsd/src/external/bsd/ntp/dist/sntp/ |
| D | networking.h | 64 l_fp reftime; 99 l_fp rec; /* receive time stamp */ 100 l_fp xmt; /* transmit time stamp */ 101 l_fp dst; /* destination timestamp */ 102 l_fp aorg; /* origin timestamp */ 103 l_fp borg; /* alternate origin timestamp */
|
| /netbsd/src/external/bsd/ntp/dist/ntpdate/ |
| D | ntpdate.h | 29 l_fp reftime; /* time of peer's last update */ 37 l_fp filter_offset[NTP_SHIFT]; /* offset part of shift register */ 40 l_fp org; /* peer's originate time stamp */ 41 l_fp xmt; /* transmit time stamp */ 44 l_fp offset; /* filter estimated clock offset */
|
| /netbsd/src/external/bsd/ntp/dist/ntpd/ |
| D | refclock_msfees.c | 245 l_fp reftime; /* reference time */ 246 l_fp lastsampletime; /* time as in txt from last EES msg */ 247 l_fp arrvtime; /* Time at which pkt arrived */ 248 l_fp codeoffsets[NCODES]; /* the time of arrival of 232 codes */ 249 l_fp offset; /* chosen offset (for clkbug) */ 250 l_fp lowoffset; /* lowest sample offset (for clkbug) */ 251 l_fp highoffset; /* highest " " (for clkbug) */ 278 l_fp last_l; /* last time stamp */ 314 static l_fp inherent_delay[MAXUNITS]; /* when time stamp is taken */ 315 static l_fp fudgefactor[MAXUNITS]; /* fudgetime1 */ [all …]
|
| D | ntp_util.c | 370 l_fp now; in stats_config() 592 l_fp now; in record_peer_stats() 634 l_fp now; in record_loop_stats() 668 l_fp now; in record_clock_stats() 726 l_fp *t1, /* originate timestamp */ in record_raw_stats() 727 l_fp *t2, /* receive timestamp */ in record_raw_stats() 728 l_fp *t3, /* transmit timestamp */ in record_raw_stats() 729 l_fp *t4, /* destination timestamp */ in record_raw_stats() 743 l_fp now; in record_raw_stats() 804 l_fp now; in record_sys_stats() [all …]
|
| /netbsd/src/external/bsd/ntp/dist/sntp/tests/ |
| D | packetHandling.c | 18 int LfpEquality(const l_fp expected, const l_fp actual); 40 const l_fp expected, in LfpEquality() 41 const l_fp actual in LfpEquality() 53 l_fp expected_xmt, actual_xmt; in test_GenerateUnauthenticatedPacket() 84 l_fp expected_xmt, actual_xmt; in test_GenerateAuthenticatedPacket() 141 l_fp reftime, tmp; in test_OffsetCalculationPositiveOffset() 187 l_fp reftime, tmp; in test_OffsetCalculationNegativeOffset() 318 l_fp now; in test_HandleCorrectPacket()
|
| D | utilities.c | 160 l_fp test; in test_PktOutput() 176 l_fp test; in test_LfpOutputBinaryFormat() 180 l_fp network; in test_LfpOutputBinaryFormat() 194 l_fp test; in test_LfpOutputDecimalFormat() 198 l_fp network; in test_LfpOutputDecimalFormat()
|