ifconfig.8 Ar/Cm typo

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

ifconfig.8 Ar/Cm typo

Matthew Martin
A rule on a bridge interface that uses arp or rarp may be followed with
a literal "request" or "reply" (cf. sbin/ifconfig/brconfig.c L1041 and
1048), so the Ar macro is incorrect as it's argument is not
a placeholder.

Aside: Is there a rule for when to list alternatives with foo | bar or
foo Ns | Ns bar? in/out, arp/rarp, and request/reply are all the former
sans-Ns; however, block/pass uses the Ns macro.


diff --git ifconfig.8 ifconfig.8
index c522491ad45..2d1d2eb1974 100644
--- ifconfig.8
+++ ifconfig.8
@@ -751,7 +751,7 @@ like a hub or a wireless network.
 .Bk -words
 .Op Cm tag Ar tagname
 .Oo
-.Cm arp | rarp Op Ar request | reply
+.Cm arp | rarp Op Cm request | reply
 .Op Cm sha Ar lladdr
 .Op Cm spa Ar ipaddr
 .Op Cm tha Ar lladdr

Reply | Threaded
Open this post in threaded view
|

Re: ifconfig.8 Ar/Cm typo

Jason McIntyre-2
On Sat, Jun 27, 2020 at 02:48:18AM -0500, Matthew Martin wrote:
> A rule on a bridge interface that uses arp or rarp may be followed with
> a literal "request" or "reply" (cf. sbin/ifconfig/brconfig.c L1041 and
> 1048), so the Ar macro is incorrect as it's argument is not
> a placeholder.
>

right/

> Aside: Is there a rule for when to list alternatives with foo | bar or
> foo Ns | Ns bar? in/out, arp/rarp, and request/reply are all the former
> sans-Ns; however, block/pass uses the Ns macro.
>

normally we just use arg1 | arg2, but sometimes this becomes ambiguous:

        rule block | pass [in | out]

do "in" and "out" go with both "block" and "pass", or just "pass"? so
sometimes we scrunch them up to make it clearer:

        rule block|pass [in | out]

hence the need for Ns.

i just committed your diff, but it needed a little more:

Index: ifconfig.8
===================================================================
RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
retrieving revision 1.350
diff -u -r1.350 ifconfig.8
--- ifconfig.8 24 Jun 2020 17:40:10 -0000 1.350
+++ ifconfig.8 27 Jun 2020 15:31:01 -0000
@@ -751,7 +751,7 @@
 .Bk -words
 .Op Cm tag Ar tagname
 .Oo
-.Cm arp | rarp Op Ar request | reply
+.Cm arp | rarp Op Cm request | reply
 .Op Cm sha Ar lladdr
 .Op Cm spa Ar ipaddr
 .Op Cm tha Ar lladdr
@@ -779,9 +779,9 @@
 keyword for regular packets and
 .Cm rarp
 for reverse arp.
-.Ar request
+.Cm request
 and
-.Ar reply
+.Cm reply
 limit matches to requests or replies.
 The source and target host addresses can be matched with the
 .Cm sha

thanks for the diff!
jmc