From nobody Mon Jan 2 01:38:30 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nldml0LYlz2lMH2; Mon, 2 Jan 2023 01:38:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nldmk62Bxz4QN9; Mon, 2 Jan 2023 01:38:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672623510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xUvnBIt3QT/QHtDJdH0/sfRWKsw7HGDv5WQaXqIovMQ=; b=KTKDgVznJb71aA98NL/gc5QnnDzujo3lh5pNMC9Wr/uHbOz5gt9+4w3ucv4WP36VURaEwr /sZ4SbTxvnqxqtdB+MsQuKB3A9sVBNc5NGvGc5AmtQzg8EQk6LP/I7X3dfV4nOHE0RN+XO 9xkb/Fb4L9yu2HrEWIzOjMtOJbS3a4imyGyEAXQjUL3lk27YCO6XN2r9cQzDBuL6jC4UUm /G0K1czqToYudK1wOlxF7H6rIvaossmQG/jnpqwwfSia30+WnMhCce4Mynqkb4I8YdB4A6 R46KCuTACLBpoGG3UV4mDW+WnWuX/pzUrhD4UMETxq3JyrPgIaTLgC4Vyu1f9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672623510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xUvnBIt3QT/QHtDJdH0/sfRWKsw7HGDv5WQaXqIovMQ=; b=QNpmKhcxlWnbnGIOwQz1/d+OcIUmoqUihL8AU7kK2pmvR1T2Eb7PdbyPQXg4I9f0ua5EPh VsdhYImaBPmWEFrsqAuM0tJkn+QGqZaTuUFI/ec7SJUeMGoR8V+xAsXm2fw227yY3d1dsf ligAotiROwscQAPzr9GHEKYLZ2+ZQVNj6kWG2YanAosxDEAqEzTDyfqX63WojdGqoi/hF9 UP0ruXHAIPjUPoldsqWQ9DsEVueF8yEE6wGInfR8yZB3VkecovFtJpQtY8TCA/zhBg7v3y JoyqcEXucpE2nsNSAwmD6OYd2BZnRfubJoZWDAOsIgoM8ZQMqh53pEEv4Yom3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1672623510; a=rsa-sha256; cv=none; b=eHeSuf254vlxNo5RQR30gusByUwlbTAHsBEt9iBOzo79uT/oKIZufDK6xCRf8GmEfCOfat a18iBgfz7VAWE1AVYacF9GjZSRBJYqIY3UJnHWrBQEzeIYUSIQXvyaJRqjcOS8w2cEX1a3 R/3rUkwo1E45WB3Q35SG0bbBzMJ7v9g+OpbOE77qPUOqaE8Yoq9aI7UuAFqQ7JXTCupgZv iU+Lu4PBiWAUuCpWJapVwQAjxeSKi15yDfwln0xkv3yQKI5Av3sTU69uZ+Q8AtZGg8UliA 9JJKCsqgzy/WQ3U0rD8zoKHZULIbHmlhhrecxiiJp3H6HNdHegzmpXrjEZ5ZtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nldmk54jCzpxp; Mon, 2 Jan 2023 01:38:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3021cUAO061487; Mon, 2 Jan 2023 01:38:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3021cUkL061486; Mon, 2 Jan 2023 01:38:30 GMT (envelope-from git) Date: Mon, 2 Jan 2023 01:38:30 GMT Message-Id: <202301020138.3021cUkL061486@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 8eb4df948711 - main - ping(8): man page cleanup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8eb4df948711166a438f4111f7069a412d1456bd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=8eb4df948711166a438f4111f7069a412d1456bd commit 8eb4df948711166a438f4111f7069a412d1456bd Author: Jose Luis Duran AuthorDate: 2022-11-20 02:56:49 +0000 Commit: Alan Somers CommitDate: 2023-01-02 00:48:25 +0000 ping(8): man page cleanup * Appease mandoc -T lint and igor * Use example.com for documentation * Update the IPv4 TTL section. Update the IPv4 TTL section specifically for FreeBSD. FreeBSD changed the default TTL to 64 in 5639e86bdd7ea151958776264bf5a67e60a54d68. NetBSD and OpenBSD still use 255. Remove some references of extinct operating systems. Reviewed by: gbe (manpages), asomers MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/630 --- sbin/ping/ping.8 | 144 +++++++++++++++++++++++++++---------------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/sbin/ping/ping.8 b/sbin/ping/ping.8 index cd9c020382da..87e300240d25 100644 --- a/sbin/ping/ping.8 +++ b/sbin/ping/ping.8 @@ -28,15 +28,15 @@ .\" @(#)ping.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd November 26, 2020 +.Dd November 20, 2022 .Dt PING 8 .Os .Sh NAME .Nm ping .Nd send -.Tn ICMP +ICMP or -.Tn ICMPv6 ECHO_REQUEST +ICMPv6 ECHO_REQUEST packets to network hosts .Sh SYNOPSIS .Nm @@ -101,19 +101,21 @@ packets to network hosts The .Nm utility invoked with an IPv4 target -.Ns ( Ar IPv4-host No or Ar IPv4-mcast-group Ns ) +.Ar ( IPv4-host +or +.Ar IPv4-mcast-group ) uses the -.Tn ICMP +ICMP .No protocol Ap s mandatory -.Tn ECHO_REQUEST +ECHO_REQUEST datagram to elicit an -.Tn ICMP ECHO_RESPONSE +ICMP ECHO_RESPONSE from a host or gateway. -.Tn ECHO_REQUEST +ECHO_REQUEST datagrams .Pq Dq pings have an IP and -.Tn ICMP +ICMP header, followed by a .Dq struct timeval and then an arbitrary number of @@ -121,24 +123,26 @@ and then an arbitrary number of bytes used to fill out the packet. .Pp When invoked with an IPv6 target -.Ns ( Ar IPv6-host Ns ) Ns , +.Ar ( IPv6-host ) , it uses the -.Tn ICMPv6 +ICMPv6 protocol's mandatory -.Tn ICMP6_ECHO_REQUEST +ICMP6_ECHO_REQUEST datagram to elicit an -.Tn ICMP6_ECHO_REPLY -.Ns . -.Tn ICMP6_ECHO_REQUEST +ICMP6_ECHO_REPLY. +ICMP6_ECHO_REQUEST datagrams have an IPv6 header and -.Tn ICMPv6 +ICMPv6 header formatted as documented in RFC 2463. .Pp -When invoked with a hostname, the version to which the target is resolved first is used. -In that case, the options and arguments used must be valid for the specific IP version, otherwise +When invoked with a hostname, the version to which the target is resolved first +is used. +In that case, the options and arguments used must be valid for the specific IP +version, otherwise .Nm exits with an error. -If the target is resolved to both IPv4 and IPv6, the specific IP version can be requested by +If the target is resolved to both IPv4 and IPv6, the specific IP version can be +requested by .Fl 4 or .Fl 6 @@ -150,11 +154,11 @@ as .Bl -tag -width indent .It Fl .\& Ns Ar chars By default, for every -.Tn ECHO_REQUEST +ECHO_REQUEST sent, a period .Dq .\& is printed, while for every -.Tn ECHO_REPLY +ECHO_REPLY received, a backspace is printed. This option takes an optional string argument listing characters that will be printed one by one in the provided order @@ -167,7 +171,7 @@ ping -.0123456789 freebsd.org .It Fl A Audible. Output a bell -.Tn ( ASCII +(ASCII 0x07) character when no packet is received before the next packet is transmitted. @@ -177,7 +181,7 @@ if the maximum number of unreceived packets has increased. .It Fl a Audible. Include a bell -.Tn ( ASCII +(ASCII 0x07) character in the output when any packet is received. .It Fl C Ar pcp @@ -187,7 +191,7 @@ Add an 802.1p Ethernet Priority Code Point when sending a packet. Stop after sending (and receiving) .Ar count -.Tn ECHO_RESPONSE +ECHO_RESPONSE packets. If this option is not specified, .Nm @@ -210,9 +214,9 @@ whichever is more. Implies .Fl .\& to print a period for every -.Tn ECHO_REQUEST +ECHO_REQUEST sent and a backspace for every -.Tn ECHO_REPLY +ECHO_REPLY received. This provides a rapid display of how many packets are being dropped. Only the super-user may use this option. @@ -233,9 +237,9 @@ This flag applies only if the ping target is a multicast address. .Pp For an IPv6 target, .Ar iface -is a name of an interface (e.g. `em0') from which the packets will be sent. -This flag applies if the ping target is a multicast address, or link-local/site-local -unicast address. +is a name of an interface (e.g., `em0') from which the packets will be sent. +This flag applies if the ping target is a multicast address, or +link-local/site-local unicast address. .It Fl i Ar wait Wait .Ar wait @@ -304,10 +308,10 @@ the sending node, and must be numeric. .It Fl s Ar packetsize Specify the number of data bytes to be sent. The default is 56, which translates into 64 -.Tn ICMP +ICMP data bytes when combined with the 8 bytes of -.Tn ICMP +ICMP header data. .Pp For IPv4, only the super-user may specify values more than default. @@ -321,9 +325,9 @@ Specify a timeout, in seconds, before ping exits regardless of how many packets have been received. .It Fl v Verbose output. -.Tn ICMP +ICMP packets other than -.Tn ECHO_RESPONSE +ECHO_RESPONSE that are received are listed. .It Fl W Ar waittime Time in milliseconds to wait for a reply for each packet sent. @@ -336,17 +340,17 @@ considered as replied when calculating statistics. Use IPv4 regardless of how the target is resolved. .It Fl G Ar sweepmaxsize Specify the maximum size of -.Tn ICMP +ICMP payload when sending sweeping pings. This option is required for ping sweeps. .It Fl g Ar sweepminsize Specify the size of -.Tn ICMP +ICMP payload to start with when sending sweeping pings. The default value is 0. .It Fl h Ar sweepincrsize Specify the number of bytes to increment the size of -.Tn ICMP +ICMP payload after each sweep when sending sweeping pings. The default value is 1. @@ -396,9 +400,9 @@ messages. .It Fl R Record route. Includes the -.Tn RECORD_ROUTE +RECORD_ROUTE option in the -.Tn ECHO_REQUEST +ECHO_REQUEST packet and displays the route buffer on returned packets. Note that the IP header is only large enough for nine such routes; @@ -410,7 +414,7 @@ If more routes come back than should, such as due to an illegal spoofed packet, ping will print the route list and then truncate it at the correct spot. Many hosts ignore or discard the -.Tn RECORD_ROUTE +RECORD_ROUTE option. .It Fl r Bypass the normal routing tables and send directly to a host on an attached @@ -575,21 +579,21 @@ during normal operations or from automated scripts. .Sh ICMP PACKET DETAILS An IP header without options is 20 bytes. An -.Tn ICMP -.Tn ECHO_REQUEST +ICMP +ECHO_REQUEST packet contains an additional 8 bytes worth of -.Tn ICMP +ICMP header followed by an arbitrary amount of data. When a .Ar packetsize is given, this indicated the size of this extra piece of data (the default is 56). Thus the amount of data received inside of an IP packet of type -.Tn ICMP -.Tn ECHO_REPLY +ICMP +ECHO_REPLY will always be 8 bytes more than the requested data space (the -.Tn ICMP +ICMP header). .Pp If the data space is at least eight bytes large, @@ -648,33 +652,29 @@ option of .Nm . .Sh IPv4 TTL DETAILS The -.Tn TTL +TTL value of an IP packet represents the maximum number of IP routers that the packet can go through before being thrown away. In current practice you can expect each router in the Internet to decrement the -.Tn TTL +TTL field by exactly one. .Pp The -.Tn TCP/IP +TCP/IP specification recommends setting the -.Tn TTL +TTL field for -.Tn IP -packets to 64, but many systems use smaller values -.No ( Bx 4.3 -uses 30, -.Bx 4.2 -used 15). +IP +packets to 64. .Pp -The maximum possible value of this field is 255, and most +The maximum possible value of this field is 255, and some .Ux systems set the -.Tn TTL +TTL field of -.Tn ICMP ECHO_REQUEST +ICMP ECHO_REQUEST packets to 255. This is why you will find you can .Dq ping @@ -688,7 +688,7 @@ In normal operation prints the ttl value from the packet it receives. When a remote system receives a ping packet, it can do one of three things with the -.Tn TTL +TTL field in its response: .Bl -bullet .It @@ -698,16 +698,16 @@ systems did before the .Bx 4.3 tahoe release. In this case the -.Tn TTL +TTL value in the received packet will be 255 minus the number of routers in the round-trip path. .It -Set it to 255; this is what current -.Bx +Set it to 64; this is what current +.Fx systems do. In this case the -.Tn TTL -value in the received packet will be 255 minus the +TTL +value in the received packet will be 64 minus the number of routers in the path .Em from the remote system @@ -718,9 +718,9 @@ host. .It Set it to some other value. Some machines use the same value for -.Tn ICMP +ICMP packets that they use for -.Tn TCP +TCP packets, for example either 30 or 60. Others may use completely wild values. .El @@ -739,9 +739,9 @@ An error occurred. .El .Sh EXAMPLES The following will send ICMPv6 echo request to -.Li dst.foo.com . +.Li dst.example.com . .Bd -literal -offset indent -ping -6 -n dst.foo.com +ping -6 -n dst.example.com .Ed .Pp The following will probe hostnames for all nodes on the network link attached to @@ -756,9 +756,9 @@ ping -6 -y ff02::1%wi0 .Ed .Pp The following will probe addresses assigned to the destination node, -.Li dst.foo.com . +.Li dst.example.com . .Bd -literal -offset indent -ping -6 -k agl dst.foo.com +ping -6 -k agl dst.example.com .Ed .Sh SEE ALSO .Xr netstat 1 , @@ -813,11 +813,11 @@ while at the US Army Ballistics Research Laboratory. .Sh BUGS Many Hosts and Gateways ignore the IPv4 -.Tn RECORD_ROUTE +RECORD_ROUTE option. .Pp The maximum IP header length is too small for options like -.Tn RECORD_ROUTE +RECORD_ROUTE to be completely useful. .No There Ap s not much that can be done about this, however.