shithub: riscv

Download patch

ref: da32d98fb211e126b5c183b294e8b7d68060c541
parent: 2379dd799b4883e83239f70815fefec8407d4264
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Jul 16 12:37:30 EDT 2023

ethermultilink(8): add manpage with example

--- /dev/null
+++ b/sys/man/8/ethermultilink
@@ -1,0 +1,46 @@
+.TH ETHERMULTILINK 8
+.SH NAME
+ethermultilink \- switch between multiple interfaces on a bridge
+.SH SYNOPSIS
+.B ethermultilink
+.I primary
+.I secondary
+[
+.I secondary
+]...
+.B > /net/bridge0/ctl
+.SH DESCRIPTION
+Ethermultilink takes a
+.I primary
+ethernet interface and a list of
+.I secondary
+interfaces in increasing priority order.
+It outputs
+.IR bridge (4)
+commands that add the
+.I primary
+and the highest priority link-active
+.I secondary
+interface to the bridge.
+The link status of all the secondary interfaces
+is checked once per second and the commands to
+change the active secondary are output as needed.
+.SH EXAMPLE
+.EX
+# make the bridge
+bind -a '#B' /net
+# mount the ethernet
+bind -a '#l0' /net
+# mount the wifi
+bind -a '#l1' /net
+# create the new virtual interface with same mac as wifi
+bind -a '#l2:sink ea='^`{cat /net/ether1/addr}
+# roam between wifi and ethernet
+ethermultilink /net/ether2 /net/ether1 /net/ether0 > /net/bridge0/ctl
+# use the new virtual interface...
+ip/ipconfig ether /net/ether2
+.EE
+.SH SOURCE
+.B /rc/bin/ethermultilink
+.SH "SEE ALSO"
+.IR bridge (4).