On Tue, Jul 26, 2022 at 12:44:20PM +0100, Stuart Henderson wrote:
> I tried looking for a command to do this and completely failed
> hence the ugly ps command. Do we want something like this?
I think it's useful. There's also netstat(1)' -R but that just dumps
everything without indication where the current process is.
> Index: route.8
> ===================================================================
> RCS file: /cvs/src/sbin/route/route.8,v
> retrieving revision 1.103
> diff -u -p -r1.103 route.8
> --- route.8 31 Mar 2022 17:27:20 -0000 1.103
> +++ route.8 26 Jul 2022 11:41:41 -0000
> @@ -102,6 +102,8 @@ Execute a command forcing the process an
> routing table and appropriate routing domain as specified with the
> .Fl T Ar rtable
> option.
> +The current routing table can be displayed with
> +.Xr id 1 .
Perhaps put this under the -T rtable description? There you'll spot it
earlier and every route command suports [-T rtable].
> .It Xo
> .Nm route
> .Op Fl nqv
> @@ -625,6 +627,7 @@ to create the new entry.
> .El
> .Sh SEE ALSO
> .Xr netstat 1 ,
> +.Xr getrtable 2 ,
I don't think this is warranted.
> .Xr gethostbyname 3 ,
> .Xr netintro 4 ,
> .Xr route 4 ,
rtable(4) has a bunch of examples but also lacks id -R and is not
referenced where one might find it useful:
$ man -k xr~'^(rdomain|rtable)'
pair(4) - virtual Ethernet interface pair
route(4) - kernel packet forwarding database
wg(4) - WireGuard pseudo-device
bgpd.conf(5) - Border Gateway Protocol daemon configuration file
sshd_config(5) - OpenSSH daemon configuration file
ifconfig(8) - configure network interface parameters
route, rt_setgate, rtdeletemsg, rtredirect(9) - kernel routing interface
rtalloc, rtalloc_mpath, rtfree, rtisvalid, rtref(9) - routing entry
interface
So instead maybe point at rtable(4) from here (and show id -R there)?