@@ -30,7 +30,7 @@ use crate::devices::virtio::iovec::{
3030 IoVecBuffer , IoVecBufferMut , IoVecError , ParsedDescriptorChain ,
3131} ;
3232use crate :: devices:: virtio:: net:: metrics:: { NetDeviceMetrics , NetMetricsPerDevice } ;
33- use crate :: devices:: virtio:: net:: tap:: { NetDevBackend , SocketBacked , Tap } ;
33+ use crate :: devices:: virtio:: net:: tap:: { NetDevBackend , PasstBackend , Tap } ;
3434use crate :: devices:: virtio:: net:: {
3535 MAX_BUFFER_SIZE , NET_QUEUE_SIZES , NetError , NetQueue , RX_INDEX , TX_INDEX , generated,
3636} ;
@@ -65,8 +65,8 @@ const fn frame_hdr_len() -> usize {
6565#[ derive( Debug , Clone , Serialize , Deserialize , Eq , PartialEq ) ]
6666#[ serde( rename_all = "snake_case" ) ]
6767pub enum NetDevBackendType {
68- Socket ( String ) , // the string denotes the socket path
69- Tap ( String ) , // denotes the tap device name
68+ Passt ( String ) , // the string denotes the socket path
69+ Tap ( String ) , // denotes the tap device name
7070}
7171
7272// Frames being sent/received through the network device model have a VNET header. This
@@ -342,9 +342,9 @@ impl Net {
342342 let vnet_hdr_size = i32:: try_from ( vnet_hdr_len ( ) ) . unwrap ( ) ;
343343 let backend: Box < dyn NetDevBackend > = match backend_type {
344344 // ammar: use something other than io error as the return of socket backend creation
345- NetDevBackendType :: Socket ( path) => {
345+ NetDevBackendType :: Passt ( path) => {
346346 // id is passed as the socket path in the case of socket backend
347- Box :: new ( SocketBacked :: new ( path) . map_err ( |_| NetError :: SocketOpen ( ) ) ?)
347+ Box :: new ( PasstBackend :: new ( path) . map_err ( |_| NetError :: SocketOpen ( ) ) ?)
348348 }
349349 NetDevBackendType :: Tap ( tap_if_name) => {
350350 let mut tap = Tap :: open_named ( & tap_if_name) . map_err ( NetError :: TapOpen ) ?;
0 commit comments