Fix and sync SYNOPSIS and usage().

Prodded by:	bde
This commit is contained in:
Ruslan Ermilov
2003-03-11 20:12:39 +00:00
parent 8d25e77a0d
commit 1bd10ba2d9
2 changed files with 48 additions and 28 deletions
+33 -13
View File
@@ -42,11 +42,11 @@
packets to network hosts packets to network hosts
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl AaDdfMnoQqRrv .Op Fl AaDdfnoQqRrv
.Op Fl c Ar count .Op Fl c Ar count
.Op Fl i Ar wait .Op Fl i Ar wait
.Op Fl l Ar preload .Op Fl l Ar preload
.Op Fl M Ar mask | time .Op Fl M Cm mask | time
.Op Fl m Ar ttl .Op Fl m Ar ttl
.Op Fl P Ar policy .Op Fl P Ar policy
.Op Fl p Ar pattern .Op Fl p Ar pattern
@@ -54,10 +54,22 @@ packets to network hosts
.Op Fl s Ar packetsize .Op Fl s Ar packetsize
.Op Fl t Ar timeout .Op Fl t Ar timeout
.Op Fl z Ar tos .Op Fl z Ar tos
.Ar host | .Ar host
.Op Fl L .Nm
.Op Fl I Ar interface .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 ttl
.Op Fl t Ar timeout
.Op Fl z Ar tos
.Ar mcast-group .Ar mcast-group
.Sh DESCRIPTION .Sh DESCRIPTION
The The
@@ -130,7 +142,7 @@ Only the super-user may use this option.
.Bf -emphasis .Bf -emphasis
This can be very hard on a network and should be used with caution. This can be very hard on a network and should be used with caution.
.Ef .Ef
.It Fl I Ar interface .It Fl I Ar iface
Source multicast packets with the given interface address. Source multicast packets with the given interface address.
This flag only applies if the ping destination is a multicast address. This flag only applies if the ping destination is a multicast address.
.It Fl i Ar wait .It Fl i Ar wait
@@ -155,14 +167,22 @@ is specified,
sends that many packets as fast as possible before falling into its normal sends that many packets as fast as possible before falling into its normal
mode of behavior. mode of behavior.
Only the super-user may use this option. Only the super-user may use this option.
.It Fl M Ar mask | time .It Fl M Cm mask | time
Use ICMP_MASKREQ or ICMP_TSTAMP instead of ICMP_ECHO. For Use
.Ar mask , .Dv ICMP_MASKREQ
print the netmask of the remote machine. Set the or
.Va net.inet.icmp.maskrepl .Dv ICMP_TSTAMP
MIB variable to enable ICMP_MASKREPLY. instead of
.Dv ICMP_ECHO .
For For
.Ar time , .Cm mask ,
print the netmask of the remote machine.
Set the
.Va net.inet.icmp.maskrepl
MIB variable to enable
.Dv ICMP_MASKREPLY .
For
.Cm time ,
print the origination, reception and transmission timestamps. print the origination, reception and transmission timestamps.
.It Fl m Ar ttl .It Fl m Ar ttl
Set the IP Time To Live for outgoing packets. Set the IP Time To Live for outgoing packets.
+15 -15
View File
@@ -1579,25 +1579,25 @@ fill(bp, patp)
static void static void
usage() usage()
{ {
(void)fprintf(stderr, (void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n",
#ifdef IPSEC
#ifdef IPSEC_POLICY_IPSEC
"%s\n%s\n%s%s\n%s\n",
#else
"%s\n%s\n%s\n%s\n",
#endif
#else
"%s\n%s\n%s\n%s\n",
#endif
"usage: ping [-AaDdfnoQqRrv] [-c count] [-i wait] [-l preload]", "usage: ping [-AaDdfnoQqRrv] [-c count] [-i wait] [-l preload] [-M mask | time]",
" [-M mask | time] [-m ttl] [-p pattern] [-S src_addr]", " [-m ttl]"
" [-s packetsize] [-t timeout] [-z tos]",
#ifdef IPSEC #ifdef IPSEC
#ifdef IPSEC_POLICY_IPSEC #ifdef IPSEC_POLICY_IPSEC
" [-P policy]", " [-P policy]"
#endif #endif
#endif #endif
" [host | [-L] [-I iface] [-T ttl] mcast-group]"); " [-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]"
#endif
#endif
" [-p pattern] [-S src_addr]",
" [-s packetsize] [-T ttl] [-t timeout] [-z tos] mcast-group");
exit(EX_USAGE); exit(EX_USAGE);
} }