ethtool/ring/handle.rs
1// SPDX-License-Identifier: MIT
2
3use crate::{EthtoolHandle, EthtoolRingGetRequest};
4
5pub struct EthtoolRingHandle(EthtoolHandle);
6
7impl EthtoolRingHandle {
8 pub fn new(handle: EthtoolHandle) -> Self {
9 EthtoolRingHandle(handle)
10 }
11
12 /// Retrieve the ethtool rings of a interface (equivalent to `ethtool -g
13 /// eth1`)
14 pub fn get(&mut self, iface_name: Option<&str>) -> EthtoolRingGetRequest {
15 EthtoolRingGetRequest::new(self.0.clone(), iface_name)
16 }
17}