On Wed, Aug 05, 2020 at 09:03:20AM +0200, Klemens Nanni wrote:
> Add missing TPMR section to ifconfig(8) by moving the commands from
> the driver's manual to it (copy/paste) and document the ioctl(2)
> interface in tpmr(4).
>
> Feedback? OK?
>
>
this is in line with all our other pages, so ok. while you're poking
around in there, the first example in tpmr.4 EXAMPLES would be a whole
lot nicer with -indent on the display. care to fix that too?
thanks,
jmc
> Index: sbin/ifconfig/ifconfig.8
> ===
> RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
> retrieving revision 1.353
> diff -u -p -r1.353 ifconfig.8
> --- sbin/ifconfig/ifconfig.8 26 Jul 2020 18:34:10 - 1.353
> +++ sbin/ifconfig/ifconfig.8 5 Aug 2020 06:48:38 -
> @@ -204,6 +204,7 @@ At least the following devices can be cr
> .Xr svlan 4 ,
> .Xr switch 4 ,
> .Xr tap 4 ,
> +.Xr tpmr 4 ,
> .Xr trunk 4 ,
> .Xr tun 4 ,
> .Xr vether 4 ,
> @@ -830,6 +831,51 @@ If
> is set to zero, then entries will not be expired.
> .It Cm up
> Start the bridge forwarding packets.
> +.El
> +.Sh TPMR
> +.nr nS 1
> +.Bk -words
> +.Nm ifconfig
> +.Ar tpmr-interface
> +.Op Cm add Ar child-iface
> +.Op Cm del Ar child-iface
> +.Op Oo Fl Oc Ns Cm link0
> +.Op Oo Fl Oc Ns Cm link1
> +.Op Oo Fl Oc Ns Cm link2
> +.Ek
> +The following options are available for a
> +.Xr tpmr 4
> +interface:
> +.Bl -tag -width Ds
> +.It Cm add Ar child-iface
> +Add
> +.Ar child-iface
> +as a member.
> +.It Cm del Ar child-iface
> +Remove the member
> +.Ar child-iface .
> +.It Cm link0
> +Disable the filtering of Ethernet frames destined for the TPMR
> +component reserved addresses, as specified by IEEE 802.1Q.
> +.It Cm -link0
> +Enable the filtering of Ethernet frames destined for the TPMR
> +component reserved addresses, as specified by IEEE 802.1Q.
> +This is the default.
> +.It Cm link1
> +Disable the filtering of IPv4 and IPv6 packets with
> +.Xr pf 4 .
> +.It Cm -link1
> +Enable the filtering of IPv4 and IPv6 packets with
> +.Xr pf 4 .
> +Packets will appear to enter or leave the member port interfaces.
> +This is the default.
> +.It Cm link2
> +Disable the filtering of 802.1Q VLAN and QinQ SVLAN packets.
> +.It Cm -link2
> +Enable the filtering of 802.1Q VLAN and QinQ SVLAN packets.
> +.Xr pf 4 .
> +Packets will appear to enter or leave the member port interfaces.
> +This is the default.
> .El
> .Sh CARP
> .nr nS 1
> Index: share/man/man4/tpmr.4
> ===
> RCS file: /cvs/src/share/man/man4/tpmr.4,v
> retrieving revision 1.6
> diff -u -p -r1.6 tpmr.4
> --- share/man/man4/tpmr.4 22 Jul 2020 04:08:46 - 1.6
> +++ share/man/man4/tpmr.4 5 Aug 2020 06:58:58 -
> @@ -40,48 +40,6 @@ command or by setting up a
> .Xr hostname.if 5
> configuration file for
> .Xr netstart 8 .
> -The interface itself can be configured with
> -.Xr ifconfig 8 ;
> -see its manual page for more information.
> -.Pp
> -.Nm
> -interfaces may be configured with
> -.Xr ifconfig 8
> -and
> -.Xr netstart 8
> -using the following options:
> -.Bl -tag -width Ds
> -.It Cm add Ar child-iface
> -Add
> -.Ar child-iface
> -as a member.
> -.It Cm del Ar child-iface
> -Remove the member
> -.Ar child-iface .
> -.It Cm link0
> -Disable the filtering of Ethernet frames destined for the TPMR
> -component reserved addresses, as specified by IEEE 802.1Q.
> -.It Cm -link0
> -Enable the filtering of Ethernet frames destined for the TPMR
> -component reserved addresses, as specified by IEEE 802.1Q.
> -This is the default.
> -.It Cm link1
> -Disable the filtering of IPv4 and IPv6 packets with
> -.Xr pf 4 .
> -.It Cm -link1
> -Enable the filtering of IPv4 and IPv6 packets with
> -.Xr pf 4 .
> -Packets will appear to enter or leave the member port interfaces.
> -This is the default.
> -.It Cm link2
> -Disable the filtering of 802.1Q VLAN and QinQ SVLAN packets.
> -.It Cm -link2
> -Enable the filtering of 802.1Q VLAN and QinQ SVLAN packets.
> -.Xr pf 4 .
> -Packets will appear to enter or leave the member port interfaces.
> -This is the default.
> -.El
> -.\" document the ioctls?
> .Pp
> Other forms of Ethernet bridging are available using the
> .Xr bridge 4
> @@ -92,6 +50,20 @@ using the
> and
> .Xr trunk 4
> drivers.
> +.Sh IOCTLS
> +The following
> +.Xr ioctl 2
> +calls and their structures are commonly use by
> +.Nm
> +and
> +.Xr bridge 4 :
> +.Pp
> +.Bl -bullet -offset indent -compact
> +.It
> +.Dv SIOCBRDGADD
> +.It
> +.Dv SIOCBRDGDEL
> +.El
> .Sh EXAMPLES
> .Nm
> can be used to cross-connect Ethernet devices that support different
>