Permalink
Browse files

OpenBSD 2.7

  • Loading branch information...
1 parent 9ef8886 commit 46afb65b2d7a734d503a7ed93d7b0e0c620167c2 itojun committed Aug 18, 2000
Showing with 18 additions and 17 deletions.
  1. +16 −13 openbsd/sbin/ping/ping.8
  2. +2 −4 openbsd/sbin/ping/ping.c
View
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ping.8,v 1.19 1999/07/18 16:21:55 hugh Exp $
+.\" $OpenBSD: ping.8,v 1.22 2000/04/15 11:45:58 aaron Exp $
.\" $NetBSD: ping.8,v 1.10 1995/12/31 04:55:35 ghudson Exp $
.\"
.\" Copyright (c) 1985, 1991, 1993
@@ -102,20 +102,19 @@ is printed, while for every
.Tn ECHO_REPLY
received a backspace is printed.
This provides a rapid display of how many packets are being dropped.
-Only the super-user may use this option.
+Only the superuser may use this option.
.Bf -emphasis
This can be very hard on a network and should be used with caution.
.Ef
.It Fl I Ar ifaddr
-Specify the interface to transmit from on machines with multiple
-interfaces. For unicast and multicast pings.
+Specify the interface to transmit from on machines with multiple interfaces.
+For unicast and multicast pings.
.It Fl i Ar wait
Wait
.Ar wait
-seconds
-between sending each packet .
+seconds between sending each packet.
The default is to wait for one second between each packet.
-The wait time may be fractional, but only the super-user may specify
+The wait time may be fractional, but only the superuser may specify
a value less than one second.
This option is incompatible with the
.Fl f
@@ -126,7 +125,8 @@ If
is specified,
.Nm
sends that many packets as fast as possible before falling into its normal
-mode of behavior. Only root may set a preload value.
+mode of behavior.
+Only root may set a preload value.
.It Fl n
Numeric output only.
No attempt will be made to lookup symbolic names for host addresses.
@@ -155,8 +155,8 @@ Note that the IP header is only large enough for nine such routes.
If more routes come back than should, such as due to an illegal spoofed
packet,
.Nm
-will print the route list and then truncate it at the correct
-spot. Many hosts ignore or discard this option.
+will print the route list and then truncate it at the correct spot.
+Many hosts ignore or discard this option.
.It Fl r
Bypass the normal routing tables and send directly to a host on an attached
network.
@@ -171,7 +171,8 @@ The default is 56, which translates into 64
data bytes when combined
with the 8 bytes of
.Tn ICMP
-header data. If the
+header data.
+If the
.Fl D
or
.Fl T
@@ -192,7 +193,8 @@ packets other than
that are received are listed.
.It Fl w Ar maxwait
Specifies the number of seconds to wait for a response to a packet
-before transmitting the next one. The default is 10.
+before transmitting the next one.
+The default is 10.
.El
.Pp
In addition, the following option may be used for multicast pings:
@@ -212,7 +214,8 @@ Round trip times and packet loss statistics are computed.
If duplicate packets are received, they are not included in the packet
loss calculation, although the round trip time of these packets is used
in calculating the minimum/average/maximum round trip time numbers and
-the standard deviation. When the specified number of packets have been
+the standard deviation.
+When the specified number of packets have been
sent (and received), or if the program is terminated with a
.Dv SIGINT ,
a brief summary is displayed.
View
@@ -1,4 +1,4 @@
-/* $OpenBSD: ping.c,v 1.40 1999/10/12 18:10:16 hugh Exp $ */
+/* $OpenBSD: ping.c,v 1.41 2000/01/22 20:25:04 deraadt Exp $ */
/* $NetBSD: ping.c,v 1.20 1995/08/11 22:37:58 cgd Exp $ */
/*
@@ -47,7 +47,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93";
#else
-static char rcsid[] = "$OpenBSD: ping.c,v 1.40 1999/10/12 18:10:16 hugh Exp $";
+static char rcsid[] = "$OpenBSD: ping.c,v 1.41 2000/01/22 20:25:04 deraadt Exp $";
#endif
#endif /* not lint */
@@ -187,8 +187,6 @@ main(argc, argv)
int argc;
char **argv;
{
- extern int errno, optind;
- extern char *optarg;
struct timeval timeout;
struct hostent *hp;
struct sockaddr_in *to;

0 comments on commit 46afb65

Please sign in to comment.