[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Bridge Port with DHCP
From: |
Shaofeng Cen |
Subject: |
Re: [lwip-users] Bridge Port with DHCP |
Date: |
Mon, 13 Dec 2021 17:48:46 +0800 |
Thanks for your reply!
I just wonder that how could I use lwip bridge to forward network frames to
different destinations.
For example, a vm using bridge network running on a host machine.
In linux, bridge and tap device is needed to create a bridge network
environment, the network frames will be switched to different tap device by
filtering MAC address and notify vm to process these network frames by
virtio-net.
So with lwip, the bridge can help me judge the MAC address, however every
network frame still goes into bridge’s input func (usually tcpip_input).
If I use tapif in lwip-contrib, I should netif_add a netif port and the port’s
state should be the ptr of tapif structure. But after I call bridgeif_add_port,
the input func of netif port will be changed to bridgeif_input or
bridge_tcpip_input.
If I want to attach a lwip tap device to lwip bridge, what should I do?