This PR refactors the existing TAP-based network device implementation without affecting the current functionality. It separates network client handling to support multiple backends, allowing the use of the -netdev flag to specify the client type, defaulting to TAP if not provided. Support for other backends is yet to be implemented.
Additionally, packet transfer functions are now designed to be specific to each network client, making the system more modular and extensible for future development.
Verification of existing functionality (in privileged mode):
Open TAP device and run simulator
sudo make check
Configure the IP address for tap0 and enable it on the host side:
sudo ip addr add 192.168.10.1/24 dev tap0
sudo ip link set tap0 up
Enable eth0 and set its IP address:
ip l set eth0 up
ip a add 192.168.10.2/24 dev eth0
This PR refactors the existing TAP-based network device implementation without affecting the current functionality. It separates network client handling to support multiple backends, allowing the use of the
-netdev
flag to specify the client type, defaulting to TAP if not provided. Support for other backends is yet to be implemented.Additionally, packet transfer functions are now designed to be specific to each network client, making the system more modular and extensible for future development.
Verification of existing functionality (in privileged mode):
tap0
and enable it on the host side:eth0
and set its IP address: