bridge
Network Bridge
A simple test of a system with multiple networks. It simply echoes all UDP
packets received on network 1
and network 2
to network 2
and network 1
,
respectively. Interface 1
and interface may or may not lie on the same
network.
CONFIG_EXAMPLES_BRIDGE
– Enables the simple UDP bridge test.
There identical configurations for each of the two networks, NETn
where n
refers to the network being configured n={1,2}
. Let m
refer to the other
network.
CONFIG_EXAMPLES_BRIDGE_NETn_IFNAME
– The register name of the networkn
device. Must match the previously registered driver name and must not be the same as other network device name,CONFIG_EXAMPLES_BRIDGE_NETm_IFNAME
.CONFIG_EXAMPLES_BRIDGE_NETn_RECVPORT
– Networkn
listen port number.CONFIG_EXAMPLES_BRIDGE_NETn_SNDPORT
– Network2
send port number.CONFIG_EXAMPLES_BRIDGE_NETn_IOBUFIZE
– Size of the networkn
UDP send/receive I/O buffer.CONFIG_EXAMPLES_BRIDGE_NETn_STACKSIZE
– Networkn
daemon stacksize.CONFIG_EXAMPLES_BRIDGE_NETn_PRIORITY
– Networkn
daemon task priority.
If used as a NSH add-on, then it is assumed that initialization of both networks was performed externally prior to the time that this test was started. Otherwise, the following options are available:
CONFIG_EXAMPLES_BRIDGE_NETn_NOMAC
– Select of the networkn
hardware does not have a built-in MAC address. If selected, the MAC address. provided byCONFIG_EXAMPLES_BRIDGE_NETn_MACADDR
will be used to assign the MAC address to the network n device.CONFIG_EXAMPLES_BRIDGE_NETn_DHCPC
– Use DHCP Client to get the network n IP address.CONFIG_EXAMPLES_BRIDGE_NETn_IPADDR
– IfCONFIG_EXAMPLES_BRIDGE_NETn_DHCPC
is not selected, then this is the fixed IP address for networkn
.CONFIG_EXAMPLES_BRIDGE_NETn_DRIPADDR
– Networkn
default router IP address (Gateway).CONFIG_EXAMPLES_BRIDGE_NETn_NETMASK
– Networkn
mask.