ifconfig,route,netstat: s/tableid/rtable/ for consistency

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

ifconfig,route,netstat: s/tableid/rtable/ for consistency

Klemens Nanni-2
Several tools may operate on specific routing tables (or routing domains
in special cases).

With the exception of `tableid' in ifconfig(8), route(8) and netstat(1),
all other manuals denote the respective argument as `rtable'.

Looking for use cases of rdomain(4), `man -k ar~rtable' does not list
those tools, so I'd like to rename arguments from `tableid' to`rtable'.
Looking for `table' obviously shows all of them, but also includes other
(false) positives.

The following diff changes the wording in besaid manuals as well as
route's usage for consistency and to ease searching.

Variable names in code have not been touched.

Feedback?

Index: sbin/ifconfig/ifconfig.8
===================================================================
RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
retrieving revision 1.305
diff -u -p -r1.305 ifconfig.8
--- sbin/ifconfig/ifconfig.8 16 Mar 2018 19:45:13 -0000 1.305
+++ sbin/ifconfig/ifconfig.8 10 Apr 2018 20:42:02 -0000
@@ -1613,7 +1613,7 @@ for a complete list of the available pro
 .Ar tunnel-interface
 .Op Oo Fl Oc Ns Cm keepalive Ar period count
 .Op Oo Fl Oc Ns Cm tunnel Ar src_address dest_address
-.Op Cm tunneldomain Ar tableid
+.Op Cm tunneldomain Ar rtable
 .Op Oo Fl Oc Ns Cm tunneldf
 .Op Cm tunnelttl Ar ttl
 .Op Oo Fl Oc Ns Cm vnetflowid
@@ -1658,13 +1658,13 @@ The optional destination port can be spe
 which further encapsulate the packets in UDP datagrams.
 .It Cm -tunnel
 Remove the source and destination tunnel addresses.
-.It Cm tunneldomain Ar tableid
+.It Cm tunneldomain Ar rtable
 Use routing table
-.Ar tableid
+.Ar rtable
 instead of the default table.
 The tunnel does not need to terminate in the same routing domain as the
 interface itself.
-.Ar tableid
+.Ar rtable
 can be set to any valid routing table ID;
 the corresponding routing domain is derived from this table.
 .It Cm tunneldf
Index: sbin/route/route.8
===================================================================
RCS file: /cvs/src/sbin/route/route.8,v
retrieving revision 1.83
diff -u -p -r1.83 route.8
--- sbin/route/route.8 6 Sep 2017 20:21:22 -0000 1.83
+++ sbin/route/route.8 10 Apr 2018 20:42:02 -0000
@@ -39,7 +39,7 @@
 .Sh SYNOPSIS
 .Nm route
 .Op Fl dnqtv
-.Op Fl T Ar tableid
+.Op Fl T Ar rtable
 .Ar command
 .Oo
 .Op Ar modifiers
@@ -84,7 +84,7 @@ may require correct operation of the net
 to forgo this, especially when attempting to repair networking operations.)
 .It Fl q
 Suppress all output.
-.It Fl T Ar tableid
+.It Fl T Ar rtable
 Select an alternate routing table to modify or query.
 The default is to use the current routing table.
 .It Fl t
@@ -101,18 +101,18 @@ utility provides the following simple co
 .Bl -tag -width Fl
 .It Xo
 .Nm route
-.Op Fl T Ar tableid
+.Op Fl T Ar rtable
 .Cm exec
 .Op Ar command ...
 .Xc
 Execute a command forcing the process and its children to use the
 routing table and appropriate routing domain as specified with the
-.Fl T Ar tableid
+.Fl T Ar rtable
 option.
 .It Xo
 .Nm route
 .Op Fl nqv
-.Op Fl T Ar tableid
+.Op Fl T Ar rtable
 .Cm flush
 .Op Ar modifiers
 .Xc
@@ -130,7 +130,7 @@ modifiers.
 .It Xo
 .Nm route
 .Op Fl nv
-.Op Fl T Ar tableid
+.Op Fl T Ar rtable
 .Cm get
 .Op Ar modifiers
 .Ar address
@@ -160,7 +160,7 @@ are shown.
 .It Xo
 .Nm route
 .Op Fl nv
-.Op Fl T Ar tableid
+.Op Fl T Ar rtable
 .Cm show
 .Op Ar family
 .Op Fl gateway
@@ -194,7 +194,7 @@ have the syntax:
 .It Xo
 .Nm route
 .Op Fl dnqtv
-.Op Fl T Ar tableid
+.Op Fl T Ar rtable
 .Cm add
 .Op Ar modifiers
 .Ar destination gateway
@@ -202,7 +202,7 @@ have the syntax:
 .It Xo
 .Nm route
 .Op Fl dnqtv
-.Op Fl T Ar tableid
+.Op Fl T Ar rtable
 .Cm change
 .Op Ar modifiers
 .Ar destination gateway
@@ -210,7 +210,7 @@ have the syntax:
 .It Xo
 .Nm route
 .Op Fl dnqtv
-.Op Fl T Ar tableid
+.Op Fl T Ar rtable
 .Cm del Ns Op Cm ete
 .Op Ar modifiers
 .Ar destination gateway
Index: usr.bin/netstat/netstat.1
===================================================================
RCS file: /cvs/src/usr.bin/netstat/netstat.1,v
retrieving revision 1.81
diff -u -p -r1.81 netstat.1
--- usr.bin/netstat/netstat.1 12 Aug 2017 03:21:02 -0000 1.81
+++ usr.bin/netstat/netstat.1 10 Apr 2018 20:42:02 -0000
@@ -50,7 +50,7 @@
 .Op Fl p Ar protocol
 .Op Fl M Ar core
 .Op Fl N Ar system
-.Op Fl T Ar tableid
+.Op Fl T Ar rtable
 .Ek
 .Nm netstat
 .Op Fl bdhn
@@ -272,7 +272,7 @@ option, also print routing labels.
 .It Fl s
 Show per-protocol statistics.
 If this option is repeated, counters with a value of zero are suppressed.
-.It Fl T Ar tableid
+.It Fl T Ar rtable
 Select an alternate routing table to query.
 The default is to use the current routing table.
 .It Fl t
Index: route.c
===================================================================
RCS file: /cvs/src/sbin/route/route.c,v
retrieving revision 1.207
diff -u -p -r1.207 route.c
--- route.c 16 Jan 2018 10:33:55 -0000 1.207
+++ route.c 10 Apr 2018 21:06:36 -0000
@@ -131,7 +131,7 @@ usage(char *cp)
  if (cp)
  warnx("botched keyword: %s", cp);
  fprintf(stderr,
-    "usage: %s [-dnqtv] [-T tableid] command [[modifiers] args]\n",
+    "usage: %s [-dnqtv] [-T rtable] command [[modifiers] args]\n",
     __progname);
  fprintf(stderr,
     "commands: add, change, delete, exec, flush, get, monitor, show\n");

Reply | Threaded
Open this post in threaded view
|

Re: ifconfig,route,netstat: s/tableid/rtable/ for consistency

phessler
No, all of these uses are correct as-is.


On 2018 Apr 10 (Tue) at 23:23:24 +0200 (+0200), Klemens Nanni wrote:
:Several tools may operate on specific routing tables (or routing domains
:in special cases).
:
:With the exception of `tableid' in ifconfig(8), route(8) and netstat(1),
:all other manuals denote the respective argument as `rtable'.
:
:Looking for use cases of rdomain(4), `man -k ar~rtable' does not list
:those tools, so I'd like to rename arguments from `tableid' to`rtable'.
:Looking for `table' obviously shows all of them, but also includes other
:(false) positives.
:
:The following diff changes the wording in besaid manuals as well as
:route's usage for consistency and to ease searching.
:
:Variable names in code have not been touched.
:
:Feedback?
:
:Index: sbin/ifconfig/ifconfig.8
:===================================================================
:RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
:retrieving revision 1.305
:diff -u -p -r1.305 ifconfig.8
:--- sbin/ifconfig/ifconfig.8 16 Mar 2018 19:45:13 -0000 1.305
:+++ sbin/ifconfig/ifconfig.8 10 Apr 2018 20:42:02 -0000
:@@ -1613,7 +1613,7 @@ for a complete list of the available pro
: .Ar tunnel-interface
: .Op Oo Fl Oc Ns Cm keepalive Ar period count
: .Op Oo Fl Oc Ns Cm tunnel Ar src_address dest_address
:-.Op Cm tunneldomain Ar tableid
:+.Op Cm tunneldomain Ar rtable
: .Op Oo Fl Oc Ns Cm tunneldf
: .Op Cm tunnelttl Ar ttl
: .Op Oo Fl Oc Ns Cm vnetflowid
:@@ -1658,13 +1658,13 @@ The optional destination port can be spe
: which further encapsulate the packets in UDP datagrams.
: .It Cm -tunnel
: Remove the source and destination tunnel addresses.
:-.It Cm tunneldomain Ar tableid
:+.It Cm tunneldomain Ar rtable
: Use routing table
:-.Ar tableid
:+.Ar rtable
: instead of the default table.
: The tunnel does not need to terminate in the same routing domain as the
: interface itself.
:-.Ar tableid
:+.Ar rtable
: can be set to any valid routing table ID;
: the corresponding routing domain is derived from this table.
: .It Cm tunneldf
:Index: sbin/route/route.8
:===================================================================
:RCS file: /cvs/src/sbin/route/route.8,v
:retrieving revision 1.83
:diff -u -p -r1.83 route.8
:--- sbin/route/route.8 6 Sep 2017 20:21:22 -0000 1.83
:+++ sbin/route/route.8 10 Apr 2018 20:42:02 -0000
:@@ -39,7 +39,7 @@
: .Sh SYNOPSIS
: .Nm route
: .Op Fl dnqtv
:-.Op Fl T Ar tableid
:+.Op Fl T Ar rtable
: .Ar command
: .Oo
: .Op Ar modifiers
:@@ -84,7 +84,7 @@ may require correct operation of the net
: to forgo this, especially when attempting to repair networking operations.)
: .It Fl q
: Suppress all output.
:-.It Fl T Ar tableid
:+.It Fl T Ar rtable
: Select an alternate routing table to modify or query.
: The default is to use the current routing table.
: .It Fl t
:@@ -101,18 +101,18 @@ utility provides the following simple co
: .Bl -tag -width Fl
: .It Xo
: .Nm route
:-.Op Fl T Ar tableid
:+.Op Fl T Ar rtable
: .Cm exec
: .Op Ar command ...
: .Xc
: Execute a command forcing the process and its children to use the
: routing table and appropriate routing domain as specified with the
:-.Fl T Ar tableid
:+.Fl T Ar rtable
: option.
: .It Xo
: .Nm route
: .Op Fl nqv
:-.Op Fl T Ar tableid
:+.Op Fl T Ar rtable
: .Cm flush
: .Op Ar modifiers
: .Xc
:@@ -130,7 +130,7 @@ modifiers.
: .It Xo
: .Nm route
: .Op Fl nv
:-.Op Fl T Ar tableid
:+.Op Fl T Ar rtable
: .Cm get
: .Op Ar modifiers
: .Ar address
:@@ -160,7 +160,7 @@ are shown.
: .It Xo
: .Nm route
: .Op Fl nv
:-.Op Fl T Ar tableid
:+.Op Fl T Ar rtable
: .Cm show
: .Op Ar family
: .Op Fl gateway
:@@ -194,7 +194,7 @@ have the syntax:
: .It Xo
: .Nm route
: .Op Fl dnqtv
:-.Op Fl T Ar tableid
:+.Op Fl T Ar rtable
: .Cm add
: .Op Ar modifiers
: .Ar destination gateway
:@@ -202,7 +202,7 @@ have the syntax:
: .It Xo
: .Nm route
: .Op Fl dnqtv
:-.Op Fl T Ar tableid
:+.Op Fl T Ar rtable
: .Cm change
: .Op Ar modifiers
: .Ar destination gateway
:@@ -210,7 +210,7 @@ have the syntax:
: .It Xo
: .Nm route
: .Op Fl dnqtv
:-.Op Fl T Ar tableid
:+.Op Fl T Ar rtable
: .Cm del Ns Op Cm ete
: .Op Ar modifiers
: .Ar destination gateway
:Index: usr.bin/netstat/netstat.1
:===================================================================
:RCS file: /cvs/src/usr.bin/netstat/netstat.1,v
:retrieving revision 1.81
:diff -u -p -r1.81 netstat.1
:--- usr.bin/netstat/netstat.1 12 Aug 2017 03:21:02 -0000 1.81
:+++ usr.bin/netstat/netstat.1 10 Apr 2018 20:42:02 -0000
:@@ -50,7 +50,7 @@
: .Op Fl p Ar protocol
: .Op Fl M Ar core
: .Op Fl N Ar system
:-.Op Fl T Ar tableid
:+.Op Fl T Ar rtable
: .Ek
: .Nm netstat
: .Op Fl bdhn
:@@ -272,7 +272,7 @@ option, also print routing labels.
: .It Fl s
: Show per-protocol statistics.
: If this option is repeated, counters with a value of zero are suppressed.
:-.It Fl T Ar tableid
:+.It Fl T Ar rtable
: Select an alternate routing table to query.
: The default is to use the current routing table.
: .It Fl t
:Index: route.c
:===================================================================
:RCS file: /cvs/src/sbin/route/route.c,v
:retrieving revision 1.207
:diff -u -p -r1.207 route.c
:--- route.c 16 Jan 2018 10:33:55 -0000 1.207
:+++ route.c 10 Apr 2018 21:06:36 -0000
:@@ -131,7 +131,7 @@ usage(char *cp)
: if (cp)
: warnx("botched keyword: %s", cp);
: fprintf(stderr,
:-    "usage: %s [-dnqtv] [-T tableid] command [[modifiers] args]\n",
:+    "usage: %s [-dnqtv] [-T rtable] command [[modifiers] args]\n",
:    __progname);
: fprintf(stderr,
:    "commands: add, change, delete, exec, flush, get, monitor, show\n");
:

--
This is a country where people are free to practice their religion,
regardless of race, creed, color, obesity, or number of dangling keys...

Reply | Threaded
Open this post in threaded view
|

Re: ifconfig,route,netstat: s/tableid/rtable/ for consistency

Klemens Nanni-2
On Wed, Apr 11, 2018 at 09:28:03AM +0200, Peter Hessler wrote:
> No, all of these uses are correct as-is.
`tableid' surely isn't wrong, but using the argument name across manuals
seems nicer to me.

Or is there any real difference between `tableid' and `rtable' I'm not
aware of?

Reply | Threaded
Open this post in threaded view
|

Re: ifconfig,route,netstat: s/tableid/rtable/ for consistency

phessler
On 2018 Apr 11 (Wed) at 23:01:45 +0200 (+0200), Klemens Nanni wrote:
:On Wed, Apr 11, 2018 at 09:28:03AM +0200, Peter Hessler wrote:
:> No, all of these uses are correct as-is.
:`tableid' surely isn't wrong, but using the argument name across manuals
:seems nicer to me.
:

No, they are different things.  Different names help with the concept.


:Or is there any real difference between `tableid' and `rtable' I'm not
:aware of?
:

rtables are layer 3.

rdomains are layer 2 (aka, arp and ndp lookups).

You can have multiple rtables within an rdomain.  An interface can only
be a member of a single rdomain at a time.

--
Just about every computer on the market today runs Unix, except the Mac
(and nobody cares about it).
                -- Bill Joy 6/21/85

Reply | Threaded
Open this post in threaded view
|

Re: ifconfig,route,netstat: s/tableid/rtable/ for consistency

Alexander Bluhm
On Thu, Apr 12, 2018 at 10:07:58AM +0200, Peter Hessler wrote:
> :Or is there any real difference between `tableid' and `rtable' I'm not
> :aware of?
> :
>
> rtables are layer 3.
>
> rdomains are layer 2 (aka, arp and ndp lookups).

The question was not about rtables vs rdomains.

It is about tableid vs rtable.

bluhm

Reply | Threaded
Open this post in threaded view
|

Re: ifconfig,route,netstat: s/tableid/rtable/ for consistency

Klemens Nanni-2
In reply to this post by phessler
On Thu, Apr 12, 2018 at 10:07:58AM +0200, Peter Hessler wrote:

> On 2018 Apr 11 (Wed) at 23:01:45 +0200 (+0200), Klemens Nanni wrote:
> :On Wed, Apr 11, 2018 at 09:28:03AM +0200, Peter Hessler wrote:
> :> No, all of these uses are correct as-is.
> :`tableid' surely isn't wrong, but using the argument name across manuals
> :seems nicer to me.
> :
>
> No, they are different things.  Different names help with the concept.
>
>
> :Or is there any real difference between `tableid' and `rtable' I'm not
> :aware of?
> :
>
> rtables are layer 3.
>
> rdomains are layer 2 (aka, arp and ndp lookups).
>
> You can have multiple rtables within an rdomain.  An interface can only
> be a member of a single rdomain at a time.
Maybe my first mail wasn't clear enough: I'm talking about routing
*tables* only.

Specifically, how they are referred to as `rtable' and `tableid' across
different manual pages.

I propose to use `rtable' exclusively to ease searching and improve
consistency as that's the wording already used across the majority of
manuals including rtabe(4) and pf.conf(5) for example.

Reply | Threaded
Open this post in threaded view
|

Re: ifconfig,route,netstat: s/tableid/rtable/ for consistency

Stuart Henderson
On 2018/04/13 14:38, Klemens Nanni wrote:
> I propose to use `rtable' exclusively to ease searching and improve
> consistency as that's the wording already used across the majority of
> manuals including rtabe(4) and pf.conf(5) for example.

There's not a lot in it, but tableid is slightly more common (and to
my eye, looks a bit nicer as a description of an argument..) - changing
from one to the other mostly feels like deckchair-rearranging though.

There is a related problem that I noticed from looking at this though,
sshd_config uses "rdomain" where it's actually talking about an rtable.

Reply | Threaded
Open this post in threaded view
|

Re: ifconfig,route,netstat: s/tableid/rtable/ for consistency

Theo de Raadt-2
In reply to this post by Klemens Nanni-2
>On 2018/04/13 14:38, Klemens Nanni wrote:
>> I propose to use `rtable' exclusively to ease searching and improve
>> consistency as that's the wording already used across the majority of
>> manuals including rtabe(4) and pf.conf(5) for example.
>
>There's not a lot in it, but tableid is slightly more common (and to
>my eye, looks a bit nicer as a description of an argument..) - changing
>from one to the other mostly feels like deckchair-rearranging though.
>
>There is a related problem that I noticed from looking at this though,
>sshd_config uses "rdomain" where it's actually talking about an rtable.

I think it should be rtable or rdomain in every specific place.  You
are suggesting a rtable field name is tableid.  Is a rdomain field
now name rdomainid?  Doesn't make sense to me.  The concept should be
the field name, and use one name rather than two, giving people the
least amount of variation.

Reply | Threaded
Open this post in threaded view
|

Re: ifconfig,route,netstat: s/tableid/rtable/ for consistency

Klemens Nanni-2
In reply to this post by Klemens Nanni-2
On Fri, Apr 13, 2018 at 02:38:07PM +0200, Klemens Nanni wrote:

> On Thu, Apr 12, 2018 at 10:07:58AM +0200, Peter Hessler wrote:
> > On 2018 Apr 11 (Wed) at 23:01:45 +0200 (+0200), Klemens Nanni wrote:
> > :On Wed, Apr 11, 2018 at 09:28:03AM +0200, Peter Hessler wrote:
> > :> No, all of these uses are correct as-is.
> > :`tableid' surely isn't wrong, but using the argument name across manuals
> > :seems nicer to me.
> > :
> >
> > No, they are different things.  Different names help with the concept.
> >
> >
> > :Or is there any real difference between `tableid' and `rtable' I'm not
> > :aware of?
> > :
> >
> > rtables are layer 3.
> >
> > rdomains are layer 2 (aka, arp and ndp lookups).
> >
> > You can have multiple rtables within an rdomain.  An interface can only
> > be a member of a single rdomain at a time.
> Maybe my first mail wasn't clear enough: I'm talking about routing
> *tables* only.
>
> Specifically, how they are referred to as `rtable' and `tableid' across
> different manual pages.
>
> I propose to use `rtable' exclusively to ease searching and improve
> consistency as that's the wording already used across the majority of
> manuals including rtabe(4) and pf.conf(5) for example.
Ping.

Further feedback? Objections? OK?