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