mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
src: Add vhost-user-net backend
Create vhost-user-net backend with Tap interface, to offload network transaction from cloud-hypervisor. The goal is to provide flexibility about the backend being in use, but also more security as it will allow users to isolate the backend with different security profiles since it will run as a dedicated process on the host. Signed-off-by: Cathy Zhang <cathy.zhang@intel.com> Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
d724511a91
commit
f6d1a9d9b8
@@ -49,6 +49,15 @@ impl PartialEq for Tap {
|
||||
}
|
||||
}
|
||||
|
||||
impl std::clone::Clone for Tap {
|
||||
fn clone(&self) -> Self {
|
||||
Tap {
|
||||
tap_file: self.tap_file.try_clone().unwrap(),
|
||||
if_name: self.if_name,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Returns a byte vector representing the contents of a null terminated C string which
|
||||
// contains if_name.
|
||||
fn build_terminated_if_name(if_name: &str) -> Result<Vec<u8>> {
|
||||
|
||||
Reference in New Issue
Block a user