📄 12
字号:
! static u_long timepacket(); /* * strings support usually not in kernel - duplicated, but what the heck--- 73,83 ---- extern clockformat_t *clockformats[]; extern unsigned short nformats; ! static int Strlen P((char *));! static int Strcmp P((char *, char *));! static int timedout P((parse_t *, timestamp_t *));! static int setup_bitmaps P((parse_t *, unsigned int, unsigned int));! static u_long timepacket P((parse_t *)); /* * strings support usually not in kernel - duplicated, but what the heck****************** 160,167 **** static int setup_bitmaps(parseio, low, high) register parse_t *parseio;! register unsigned short low;! register unsigned short high; { register unsigned short i; register int f = 0;--- 164,171 ---- static int setup_bitmaps(parseio, low, high) register parse_t *parseio;! register unsigned int low;! register unsigned int high; { register unsigned short i; register int f = 0;****************** 834,843 **** */ /*ARGSUSED*/ void! syn_simple(parseio, ts, format, why) register parse_t *parseio; register timestamp_t *ts;! register struct format *format; register u_long why; { parseio->parse_dtime.parse_stime = *ts;--- 838,847 ---- */ /*ARGSUSED*/ void! syn_simple(parseio, ts, vf, why) register parse_t *parseio; register timestamp_t *ts;! register void *vf; register u_long why; { parseio->parse_dtime.parse_stime = *ts;diff -rc old/usr.sbin/xntp/xntpd/refclock_arc.c new/usr.sbin/xntp/xntpd/refclock_arc.c*** old/usr.sbin/xntp/xntpd/refclock_arc.c Mon Aug 10 17:42:52 1998--- new/usr.sbin/xntp/xntpd/refclock_arc.c Mon Aug 10 17:24:54 1998****************** 446,452 **** #define OPEN_FLAGS (O_RDWR) #endif - /* * Imported from ntp_timer module */--- 446,451 ----****************** 511,516 ****--- 510,518 ---- static void dummy_event_handler P((struct peer *)); static void arc_event_handler P((struct peer *));+ static int space_left P((struct arcunit *));+ static int send_slow P((struct arcunit *, int, char *));+ #define QUALITY_UNKNOWN -1 /* Indicates unknown clock quality. */ #define MIN_CLOCK_QUALITY 0 /* Min quality clock will return. */diff -rc old/usr.sbin/xntp/xntpd/refclock_atom.c new/usr.sbin/xntp/xntpd/refclock_atom.c*** old/usr.sbin/xntp/xntpd/refclock_atom.c Mon Aug 10 17:42:53 1998--- new/usr.sbin/xntp/xntpd/refclock_atom.c Mon Aug 10 17:23:26 1998****************** 111,117 ****--- 111,119 ---- /* * Imported from ntp_loopfilter module */+ #ifndef PPSX extern int fdpps; /* pps file descriptor */+ #endif /* PPSX */ extern int pps_update; /* prefer peer valid update */ /******************* 144,149 ****--- 146,152 ---- #ifdef PPS static void atom_pps P((struct peer *)); #endif /* PPS */+ static int atom_cmpl_fp P((const void *, const void *)); /* * Transfer vector****************** 262,267 ****--- 265,271 ---- pp = peer->procptr; up = (struct atomunit *)pp->unitptr;+ #ifdef DEBUG if (debug > 2) printf("pps_sample: pollcnt %d\n", up->pollcnt);****************** 371,378 **** &pp->lastrec); #ifdef DEBUG if (debug > 2)! printf("atom_receive: pollcnt %d, lastrec %ld\n",! up->pollcnt, pp->lastrec); #endif /*--- 375,382 ---- &pp->lastrec); #ifdef DEBUG if (debug > 2)! printf("atom_receive: pollcnt %d, lastrec %d\n",! up->pollcnt, pp->lastrec.l_ui); #endif /*diff -rc old/usr.sbin/xntp/xntpd/refclock_heath.c new/usr.sbin/xntp/xntpd/refclock_heath.c*** old/usr.sbin/xntp/xntpd/refclock_heath.c Mon Aug 10 17:42:53 1998--- new/usr.sbin/xntp/xntpd/refclock_heath.c Mon Aug 10 17:22:05 1998****************** 133,138 ****--- 133,140 ---- static void heath_shutdown P((int, struct peer *)); static void heath_receive P((struct recvbuf *)); static void heath_poll P((int, struct peer *));+ static int comparetm P((struct tm *, struct tm *));+ static time_t invert P((struct tm *, struct tm *(*)(const time_t *))); /* * Transfer vector****************** 180,193 **** return 0; } ! static long invert(x, func) struct tm *x;! struct tm *(*func)(); { struct tm *y; int result;! long trial; long lower=0L; long upper=(long)((unsigned long)(~lower) >> 1); --- 182,195 ---- return 0; } ! static time_t invert(x, func) struct tm *x;! struct tm *(*func) P((const time_t *)); { struct tm *y; int result;! time_t trial; long lower=0L; long upper=(long)((unsigned long)(~lower) >> 1); diff -rc old/usr.sbin/xntp/xntpd/refclock_parse.c new/usr.sbin/xntp/xntpd/refclock_parse.c*** old/usr.sbin/xntp/xntpd/refclock_parse.c Mon Aug 10 17:42:53 1998--- new/usr.sbin/xntp/xntpd/refclock_parse.c Mon Aug 10 17:21:33 1998****************** 193,211 **** ** function vector for dynamically binding io handling mechanism **/ typedef struct bind { char *bd_description; /* name of type of binding */! int (*bd_init)(); /* initialize */! void (*bd_end)(); /* end */! int (*bd_setcs)(); /* set character size */! int (*bd_disable)(); /* disable */! int (*bd_enable)(); /* enable */! int (*bd_getfmt)(); /* get format */! int (*bd_setfmt)(); /* setfmt */! int (*bd_timecode)(); /* get time code */! void (*bd_receive)(); /* receive operation */! void (*bd_poll)(); /* poll operation */ } bind_t; #define PARSE_END(_X_) (*(_X_)->binding->bd_end)(_X_)--- 193,222 ---- ** function vector for dynamically binding io handling mechanism **/ + struct parseunit; typedef struct bind { char *bd_description; /* name of type of binding */! int (*bd_init) /* initialize */! P((struct parseunit *));! void (*bd_end) /* end */! P((struct parseunit *));! int (*bd_setcs) /* set character size */! P((struct parseunit *, parsectl_t *));! int (*bd_disable) /* disable */! P((struct parseunit *));! int (*bd_enable) /* enable */! P((struct parseunit *));! int (*bd_getfmt) /* get format */! P((struct parseunit *, parsectl_t *));! int (*bd_setfmt) /* setfmt */! P((struct parseunit *, parsectl_t *));! int (*bd_timecode) /* get time code */! P((struct parseunit *, parsectl_t *));! void (*bd_receive) /* receive operation */! P((struct recvbuf *));! void (*bd_poll) /* poll operation */! P((struct parseunit *)); } bind_t; #define PARSE_END(_X_) (*(_X_)->binding->bd_end)(_X_)****************** 397,406 **** } poll_info_t; #define NO_CL_FLAGS 0! #define NO_POLL (void (*)())0! #define NO_INIT (int (*)())0! #define NO_END (void (*)())0! #define NO_EVENT (void (*)())0 #define NO_DATA (void *)0 #define NO_FORMAT "" #define NO_PPSDELAY 0--- 408,417 ---- } poll_info_t; #define NO_CL_FLAGS 0! #define NO_POLL (void (*) P((struct parseunit *)))0! #define NO_INIT (int (*) P((struct parseunit *)))0! #define NO_END (void (*) P((struct parseunit *)))0! #define NO_EVENT (void (*) P((struct parseunit *, int)))0 #define NO_DATA (void *)0 #define NO_FORMAT "" #define NO_PPSDELAY 0****************** 764,773 **** static struct parse_clockinfo { u_long cl_flags; /* operation flags (io modes) */! void (*cl_poll)(); /* active poll routine */! int (*cl_init)(); /* active poll init routine */! void (*cl_event)(); /* special event handling (e.g. reset clock) */! void (*cl_end)(); /* active poll end routine */ void *cl_data; /* local data area for "poll" mechanism */ u_fp cl_rootdelay; /* rootdelay */ u_long cl_basedelay; /* current offset - unsigned l_fp fractional part */--- 775,788 ---- static struct parse_clockinfo { u_long cl_flags; /* operation flags (io modes) */! void (*cl_poll) /* active poll routine */! P((struct parseunit *));! int (*cl_init) /* active poll init routine */! P((struct parseunit *));! void (*cl_event) /* special event handling (e.g. reset clock) */! P((struct parseunit *, int));! void (*cl_end) /* active poll end routine */! P((struct parseunit *)); void *cl_data; /* local data area for "poll" mechanism */ u_fp cl_rootdelay; /* rootdelay */ u_long cl_basedelay; /* current offset - unsigned l_fp fractional part */****************** 1261,1266 ****--- 1276,1290 ---- static void local_receive P((struct recvbuf *)); static void local_poll P((struct parseunit *)); + static bind_t *init_iobinding P((struct parseunit *));+ static char *parsestate P((u_long, char *));+ static char *parsestatus P((u_long, char *));+ static char *clockstatus P((u_long));+ static char *mkascii P((char *, long, char *, long));+ static void parse_statistics P((struct parseunit *));+ static void cparse_statistics P((struct peer *));+ + static bind_t io_bindings[] = { #ifdef STREAM****************** 4095,4101 **** u_char *txt; /* pointer to actual data buffer */ }; ! void sendcmd(buf, c) struct txbuf *buf; u_char c;--- 4119,4133 ---- u_char *txt; /* pointer to actual data buffer */ }; ! static void sendcmd P((struct txbuf *, u_char));! static void sendbyte P((struct txbuf *, u_char));! static void sendetx P((struct txbuf *, struct parseunit *));! #if 0! static void sendint P((struct txbuf *, int));! #endif! static void sendflt P((struct txbuf *, double));! ! static void sendcmd(buf, c) struct txbuf *buf; u_char c;****************** 4105,4111 **** buf->idx = 2; } ! void sendbyte(buf, b) struct txbuf *buf; u_char b; {--- 4137,4144 ---- buf->idx = 2; } ! static void! sendbyte(buf, b) struct txbuf *buf; u_char b; {****************** 4114,4120 **** buf->txt[buf->idx++] = b; } ! void sendetx(buf, parse) struct txbuf *buf; struct parseunit *parse;--- 4147,4153 ---- buf->txt[buf->idx++] = b; } ! static void sendetx(buf, parse) struct txbuf *buf; struct parseunit *parse;****************** 4133,4139 **** } } ! void sendint(buf, a) struct txbuf *buf; int a;--- 4166,4173 ---- } } ! #if 0! static void sendint(buf, a) struct txbuf *buf; int a;****************** 4142,4149 **** sendbyte(buf, (a>>8) & 0xff); sendbyte(buf, a & 0xff); } ! void sendflt(buf, a) struct txbuf *buf; float a;--- 4176,4184 ---- sendbyte(buf, (a>>8) & 0xff); sendbyte(buf, a & 0xff); }+ #endif ! static void sendflt(buf, a) struct txbuf *buf; float a;diff -rc old/usr.sbin/xntp/xntpdc/ntpdc.c new/usr.sbin/xntp/xntpdc/ntpdc.c*** old/usr.sbin/xntp/xntpdc/ntpdc.c Mon Aug 10 17:42:54 1998--- new/usr.sbin/xntp/xntpdc/ntpdc.c Mon Aug 10 17:31:01 1998****************** 239,245 ****--- 239,248 ---- int debug; #ifdef NO_MAIN_ALLOWED+ void xntpdcmain P((int, char *[])); CALL(xntpdc,"xntpdc",xntpdcmain);+ #else+ int main P((int, char *[])); #endif #ifdef SYS_VXWORKS****************** 260,272 **** /* * main - parse arguments and handle options */! #if !defined(VMS)! void! #endif /* VMS */! #ifndef NO_MAIN_ALLOWED! main #else! xntpdcmain #endif (argc, argv) int argc;--- 263,272 ---- /* * main - parse arguments and handle options */! #ifdef NO_MAIN_ALLOWED! void xntpdcmain #else! int main #endif (argc, argv) int argc;****************** 286,292 **** #endif progname = argv[0];! while ((c = ntp_getopt(argc, argv, "c:dilnps")) != EOF) switch (c) { case 'c': ADDCMD(ntp_optarg);--- 286,292 ---- #endif progname = argv[0];! while ((c = ntp_getopt(argc, argv, "c:dilnps")) != -1) switch (c) { case 'c': ADDCMD(ntp_optarg);diff -rc old/usr.sbin/xntp/xntpdc/ntpdc_ops.c new/usr.sbin/xntp/xntpdc/ntpdc_ops.c*** old/usr.sbin/xntp/xntpdc/ntpdc_ops.c Mon Aug 10 17:42:54 1998--- new/usr.sbin/xntp/xntpdc/ntpdc_ops.c Mon Aug 10 17:29:52 1998****************** 27,32 ****--- 27,33 ---- static void peers P((struct parse *, FILE *)); static void dmpeers P((struct parse *, FILE *)); static void dopeers P((struct parse *, FILE *, int));+ static char *refid_string P((u_int32, int)); static void printpeer P((struct info_peer *, FILE *)); static void showpeer P((struct parse *, FILE *)); static void peerstats P((struct parse *, FILE *));****************** 71,76 ****--- 72,78 ---- static void fudge P((struct parse *, FILE *)); static void clkbug P((struct parse *, FILE *)); static void kerninfo P((struct parse *, FILE *));+ /* * Commands we understand. Ntpdc imports this.Only in new/usr.sbin/xntp/xntpdc: obj.i386
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -