ethtool-xujunjie 0.2.5

Linux Ethtool Communication Library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// SPDX-License-Identifier: MIT

use crate::{EthtoolHandle, EthtoolRingGetRequest};

pub struct EthtoolRingHandle(EthtoolHandle);

impl EthtoolRingHandle {
    pub fn new(handle: EthtoolHandle) -> Self {
        EthtoolRingHandle(handle)
    }

    /// Retrieve the ethtool rings of a interface (equivalent to `ethtool -g
    /// eth1`)
    pub fn get(&mut self, iface_name: Option<&str>) -> EthtoolRingGetRequest {
        EthtoolRingGetRequest::new(self.0.clone(), iface_name)
    }
}