diff options
Diffstat (limited to 'usr.sbin/xntpd/ntptrace')
-rw-r--r-- | usr.sbin/xntpd/ntptrace/ntptrace.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/usr.sbin/xntpd/ntptrace/ntptrace.c b/usr.sbin/xntpd/ntptrace/ntptrace.c index b4c5c57..206c738 100644 --- a/usr.sbin/xntpd/ntptrace/ntptrace.c +++ b/usr.sbin/xntpd/ntptrace/ntptrace.c @@ -159,7 +159,7 @@ main(argc, argv) default: break; } - + if (errflg || (argc - ntp_optind) > 1) { (void) fprintf(stderr, "usage: %s [-vnd] [-r retries] [-t timeout] [server]\n", @@ -186,7 +186,7 @@ main(argc, argv) firstserver = addservbyname(argv[ntp_optind]); else firstserver = addservbyname("localhost"); - + if (firstserver == NULL) { /* a message has already been printed */ exit(2); @@ -196,7 +196,7 @@ main(argc, argv) * Initialize the time of day routines and the I/O subsystem */ setup_io(); - + DoTrace(firstserver); exit(0); @@ -291,7 +291,7 @@ register struct server *server; timeout.tv_sec = sys_timeout; timeout.tv_usec = 0; n = select(fd+1, &fds, (fd_set *)0, (fd_set *)0, &timeout); - + if (n == 0) { /* timed out */ if (debug) printf("timeout\n"); @@ -302,7 +302,7 @@ register struct server *server; return(0); } get_systime(&ts); - + if (free_recvbufs == 0) { syslog(LOG_ERR, "no buffers"); exit(1); @@ -335,7 +335,7 @@ register struct server *server; status = ReceiveBuf(server, rb); freerecvbuf(rb); - + return(status); } } @@ -357,7 +357,7 @@ ReceiveBuf(server, rbufp) l_fp ci; struct server *nextserver; struct in_addr nextia; - + if (debug) { printf("ReceiveBuf(%s, ", ntoa(&server->srcadr)); @@ -401,7 +401,7 @@ ReceiveBuf(server, rbufp) PKT_MODE(rpkt->li_vn_mode), rpkt->stratum); return(0); } - + /* * Decode the org timestamp and make sure we're getting a response * to our last request. @@ -412,7 +412,7 @@ ReceiveBuf(server, rbufp) printf("receive: pkt.org and peer.xmt differ\n"); return(0); } - + /* * Looks good. Record info from the packet. */ @@ -504,7 +504,7 @@ struct in_addr *iap; server->srcadr.sin_port = htons(NTP_PORT); sys_servers[sys_numservers++] = server; - + return(server); } /* @@ -653,7 +653,7 @@ decodeipaddr(num, ipaddr) *ipaddr <<= 8; *ipaddr += temp; } - + if (i < 4) return 0; *ipaddr = htonl(*ipaddr); @@ -694,7 +694,7 @@ printserver(pp, fp) pp->stratum, pp->precision, pp->leap & 0x2 ? '1' : '0', pp->leap & 0x1 ? '1' : '0'); - + (void) fprintf(fp, "refid "); printrefid(fp, pp); @@ -708,7 +708,7 @@ printserver(pp, fp) fptoa(pp->rootdelay, 5), ufptoa(pp->rootdispersion, 5)); (void) fprintf(fp, ", synch dist %s\n", ufptoa(synchdist, 5)); - + (void) fprintf(fp, "reference time: %s\n", prettydate(&pp->reftime)); (void) fprintf(fp, "originate timestamp: %s\n", |