From owner-dev-commits-src-all@freebsd.org Sat Apr 17 19:24:54 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F253A5E0859; Sat, 17 Apr 2021 19:24:54 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FN31f6cMPz3GN7; Sat, 17 Apr 2021 19:24:54 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from localhost (p200300d5d70db00b945495925251c283.dip0.t-ipconnect.de [IPv6:2003:d5:d70d:b00b:9454:9592:5251:c283]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 662E9C47D; Sat, 17 Apr 2021 19:24:54 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Sat, 17 Apr 2021 21:24:53 +0200 From: Gordon Bergling To: rgrimes@freebsd.org Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: bc54f5f1cd5c - main - route(8): Add an example how to print the routing tables Message-ID: References: <202104141031.13EAVO9b042570@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202104141031.13EAVO9b042570@gndrsh.dnsmgr.net> X-Url: X-Operating-System: FreeBSD 12.2-STABLE amd64 X-Host-Uptime: 9:21PM up 3 days, 3:41, 4 users, load averages: 0.22, 0.24, 0.24 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2021 19:24:55 -0000 On Wed, Apr 14, 2021 at 03:31:24AM -0700, Rodney W. Grimes wrote: > > On Tue, Apr 13, 2021 at 03:36:14AM -0700, Rodney W. Grimes wrote: > > > > The branch main has been updated by gbe (doc committer): > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=bc54f5f1cd5c01aa5f941234034839fb0b8f54ed > > > > > > > > commit bc54f5f1cd5c01aa5f941234034839fb0b8f54ed > > > > Author: Gordon Bergling > > > > AuthorDate: 2021-04-13 04:44:04 +0000 > > > > Commit: Gordon Bergling > > > > CommitDate: 2021-04-13 04:45:22 +0000 > > > > > > > > route(8): Add an example how to print the routing tables > > > > > > > > The manual page currently doesn't show an example how to print > > > > the routing table, so add one and .Xr netstat while here. > > > > > > Because the route command does not print the routing table. > > > > > > Manual pages should have examples of how to use that command, > > > not examples of how to do associated things that are done > > > using another command. > > > > > > The add of xref to netstat is long overdue. > > > > I know that examples in man pages should be specific for the command > > the man page is for, but I think we could make an exception for netstat at > > this point, because many people, who are looking for such an information > > are coming from the Windows world, where the route command has a print > > option. > > Perhaps add in description of "route get": > To print the complete routing table refer to the netstat(8) -r flag. I am currently working on a 'route show' implementation for FreeBSD. NetBSD and OpenBSD have this functionality already implemented. I would update the man page after I have finished the implementation and the review process through phabricator. --Gordon > > > > PR: 231579 > > > > Reported by: Pekka J?rvinen > > > > Reviewed by: debdrup > > > > MFC after: 5 days > > > > Differential Revision: https://reviews.freebsd.org/D29702 > > > > --- > > > > sbin/route/route.8 | 7 ++++++- > > > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/sbin/route/route.8 b/sbin/route/route.8 > > > > index 6f34795ce883..c353bfb73d62 100644 > > > > --- a/sbin/route/route.8 > > > > +++ b/sbin/route/route.8 > > > > @@ -28,7 +28,7 @@ > > > > .\" @(#)route.8 8.3 (Berkeley) 3/19/94 > > > > .\" $FreeBSD$ > > > > .\" > > > > -.Dd January 9, 2019 > > > > +.Dd April 11, 2021 > > > > .Dt ROUTE 8 > > > > .Os > > > > .Sh NAME > > > > @@ -453,6 +453,10 @@ Delete a static route from the routing table: > > > > Remove all routes from the routing table: > > > > .Pp > > > > .Dl route flush > > > > +.Pp > > > > +List all routing tables: > > > > +.Pp > > > > +.Dl netstat -r > > > > .Sh DIAGNOSTICS > > > > .Bl -diag > > > > .It "add [host \&| network ] %s: gateway %s flags %x" > > > > @@ -493,6 +497,7 @@ The next-hop gateway should be reachable through a different route. > > > > .El > > > > .Sh SEE ALSO > > > > .\".Xr esis 4 , > > > > +.Xr netstat 1 , > > > > .Xr netintro 4 , > > > > .Xr route 4 , > > > > .Xr arp 8 , > > > > > > > > > > -- > > > Rod Grimes rgrimes@freebsd.org > > > > -- > > > > -- > Rod Grimes rgrimes@freebsd.org --