Skip to content

Commit

Permalink
feat: get wintun adapter index from Queue
Browse files Browse the repository at this point in the history
  • Loading branch information
zonyitoo committed Feb 19, 2024
1 parent e762c41 commit e97c2f8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/platform/windows/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,14 @@ impl Queue {
},
}
}

/// Returns the Win32 interface index of this adapter.
pub fn get_adapter_index(&self) -> io::Result<u32> {
match self.session.get_adapter().get_adapter_index() {
Ok(i) => Ok(i),
Err(e) => Err(io::Error::new(io::ErrorKind::Other, e)),
}
}
}

impl Read for Queue {
Expand Down

0 comments on commit e97c2f8

Please sign in to comment.