measure.c (8857) | measure.c (30642) |
---|---|
1/*- 2 * Copyright (c) 1985, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 18 unchanged lines hidden (view full) --- 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint | 1/*- 2 * Copyright (c) 1985, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 18 unchanged lines hidden (view full) --- 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint |
35#if 0 |
|
35static char sccsid[] = "@(#)measure.c 8.1 (Berkeley) 6/6/93"; | 36static char sccsid[] = "@(#)measure.c 8.1 (Berkeley) 6/6/93"; |
37#endif 38static const char rcsid[] = 39 "$Id$"; |
|
36#endif /* not lint */ 37 | 40#endif /* not lint */ 41 |
38#ifdef sgi 39#ident "$Revision: 1.2 $" 40#endif 41 | |
42#include "globals.h" 43#include <netinet/in_systm.h> 44#include <netinet/ip.h> 45#include <netinet/ip_icmp.h> 46 47#define MSEC_DAY (SECDAY*1000) 48 49#define PACKET_IN 1024 --- 219 unchanged lines hidden (view full) --- 269 if (trace) { 270 fprintf(fd, 271 "measured delta %4d, %d trials to %-15s %s\n", 272 measure_delta, trials, 273 inet_ntoa(addr->sin_addr), hname); 274 } 275 } else if (print) { 276 if (errno != 0) | 42#include "globals.h" 43#include <netinet/in_systm.h> 44#include <netinet/ip.h> 45#include <netinet/ip_icmp.h> 46 47#define MSEC_DAY (SECDAY*1000) 48 49#define PACKET_IN 1024 --- 219 unchanged lines hidden (view full) --- 269 if (trace) { 270 fprintf(fd, 271 "measured delta %4d, %d trials to %-15s %s\n", 272 measure_delta, trials, 273 inet_ntoa(addr->sin_addr), hname); 274 } 275 } else if (print) { 276 if (errno != 0) |
277 fprintf(stderr, "measure %s: %s\n", hname, 278 strerror(errno)); | 277 warn("measure %s", hname); |
279 } else { 280 if (errno != 0) { 281 syslog(LOG_ERR, "measure %s: %m", hname); 282 } else { 283 syslog(LOG_ERR, "measure: %s did not respond", hname); 284 } 285 if (trace) { 286 fprintf(fd, --- 67 unchanged lines hidden --- | 278 } else { 279 if (errno != 0) { 280 syslog(LOG_ERR, "measure %s: %m", hname); 281 } else { 282 syslog(LOG_ERR, "measure: %s did not respond", hname); 283 } 284 if (trace) { 285 fprintf(fd, --- 67 unchanged lines hidden --- |