summaryrefslogtreecommitdiffstats
path: root/sbin/ping
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2003-03-11 20:12:39 +0000
committerru <ru@FreeBSD.org>2003-03-11 20:12:39 +0000
commit50bb124650481f6691c1f5432cfe0f713767fe38 (patch)
tree1478468756e01f655ceaaeb94207bca6e891236a /sbin/ping
parentae1157872921ed2a68f19f55b4b87227654512ae (diff)
downloadFreeBSD-src-50bb124650481f6691c1f5432cfe0f713767fe38.zip
FreeBSD-src-50bb124650481f6691c1f5432cfe0f713767fe38.tar.gz
Fix and sync SYNOPSIS and usage().
Prodded by: bde
Diffstat (limited to 'sbin/ping')
-rw-r--r--sbin/ping/ping.844
-rw-r--r--sbin/ping/ping.c24
2 files changed, 44 insertions, 24 deletions
diff --git a/sbin/ping/ping.8 b/sbin/ping/ping.8
index 9941e2f..71fa31a 100644
--- a/sbin/ping/ping.8
+++ b/sbin/ping/ping.8
@@ -42,11 +42,11 @@
packets to network hosts
.Sh SYNOPSIS
.Nm
-.Op Fl AaDdfMnoQqRrv
+.Op Fl AaDdfnoQqRrv
.Op Fl c Ar count
.Op Fl i Ar wait
.Op Fl l Ar preload
-.Op Fl M Ar mask | time
+.Op Fl M Cm mask | time
.Op Fl m Ar ttl
.Op Fl P Ar policy
.Op Fl p Ar pattern
@@ -54,10 +54,22 @@ packets to network hosts
.Op Fl s Ar packetsize
.Op Fl t Ar timeout
.Op Fl z Ar tos
-.Ar host |
-.Op Fl L
-.Op Fl I Ar interface
+.Ar host
+.Nm
+.Op Fl AaDdfLnoQqRrv
+.Op Fl c Ar count
+.Op Fl I Ar iface
+.Op Fl i Ar wait
+.Op Fl l Ar preload
+.Op Fl M Cm mask | time
+.Op Fl m Ar ttl
+.Op Fl P Ar policy
+.Op Fl p Ar pattern
+.Op Fl S Ar src_addr
+.Op Fl s Ar packetsize
.Op Fl T Ar ttl
+.Op Fl t Ar timeout
+.Op Fl z Ar tos
.Ar mcast-group
.Sh DESCRIPTION
The
@@ -130,7 +142,7 @@ Only the super-user 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 interface
+.It Fl I Ar iface
Source multicast packets with the given interface address.
This flag only applies if the ping destination is a multicast address.
.It Fl i Ar wait
@@ -155,14 +167,22 @@ is specified,
sends that many packets as fast as possible before falling into its normal
mode of behavior.
Only the super-user may use this option.
-.It Fl M Ar mask | time
-Use ICMP_MASKREQ or ICMP_TSTAMP instead of ICMP_ECHO. For
-.Ar mask ,
-print the netmask of the remote machine. Set the
+.It Fl M Cm mask | time
+Use
+.Dv ICMP_MASKREQ
+or
+.Dv ICMP_TSTAMP
+instead of
+.Dv ICMP_ECHO .
+For
+.Cm mask ,
+print the netmask of the remote machine.
+Set the
.Va net.inet.icmp.maskrepl
-MIB variable to enable ICMP_MASKREPLY.
+MIB variable to enable
+.Dv ICMP_MASKREPLY .
For
-.Ar time ,
+.Cm time ,
print the origination, reception and transmission timestamps.
.It Fl m Ar ttl
Set the IP Time To Live for outgoing packets.
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c
index 5ea9d53..84129ea 100644
--- a/sbin/ping/ping.c
+++ b/sbin/ping/ping.c
@@ -1579,25 +1579,25 @@ fill(bp, patp)
static void
usage()
{
- (void)fprintf(stderr,
+ (void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n",
+
+"usage: ping [-AaDdfnoQqRrv] [-c count] [-i wait] [-l preload] [-M mask | time]",
+" [-m ttl]"
#ifdef IPSEC
#ifdef IPSEC_POLICY_IPSEC
-"%s\n%s\n%s%s\n%s\n",
-#else
-"%s\n%s\n%s\n%s\n",
+" [-P policy]"
#endif
-#else
-"%s\n%s\n%s\n%s\n",
#endif
-
-"usage: ping [-AaDdfnoQqRrv] [-c count] [-i wait] [-l preload]",
-" [-M mask | time] [-m ttl] [-p pattern] [-S src_addr]",
-" [-s packetsize] [-t timeout] [-z tos]",
+" [-p pattern] [-S src_addr] [-s packetsize]",
+" [-t timeout] [-z tos] host",
+" ping [-AaDdfLnoQqRrv] [-c count] [-I iface] [-i wait] [-l preload]",
+" [-M mask | time] [-m ttl]"
#ifdef IPSEC
#ifdef IPSEC_POLICY_IPSEC
-" [-P policy]",
+" [-P policy]"
#endif
#endif
-" [host | [-L] [-I iface] [-T ttl] mcast-group]");
+" [-p pattern] [-S src_addr]",
+" [-s packetsize] [-T ttl] [-t timeout] [-z tos] mcast-group");
exit(EX_USAGE);
}
OpenPOWER on IntegriCloud