pub struct NetClsController { /* private fields */ }
Expand description
A controller that allows controlling the net_cls
subsystem of a Cgroup.
In esssence, using the net_cls
controller, one can attach a custom class to the network
packets emitted by the control group’s tasks. This can then later be used in iptables to have
custom firewall rules, QoS, etc.
Implementations§
Trait Implementations§
Source§impl Clone for NetClsController
impl Clone for NetClsController
Source§fn clone(&self) -> NetClsController
fn clone(&self) -> NetClsController
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for NetClsController
impl Debug for NetClsController
Source§impl<'a> From<&'a Subsystem> for &'a NetClsController
impl<'a> From<&'a Subsystem> for &'a NetClsController
Source§fn from(sub: &'a Subsystem) -> &'a NetClsController
fn from(sub: &'a Subsystem) -> &'a NetClsController
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for NetClsController
impl RefUnwindSafe for NetClsController
impl Send for NetClsController
impl Sync for NetClsController
impl Unpin for NetClsController
impl UnwindSafe for NetClsController
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Controller for Twhere
T: ControllerInternal,
impl<T> Controller for Twhere
T: ControllerInternal,
Source§fn apply(&self, res: &Resources) -> Result<(), Error>
fn apply(&self, res: &Resources) -> Result<(), Error>
Apply a set of resources to the Controller, invoking its internal functions to pass the kernel the information.
Source§fn add_task_by_tgid(&self, pid: &CgroupPid) -> Result<(), Error>
fn add_task_by_tgid(&self, pid: &CgroupPid) -> Result<(), Error>
Attach a task to this controller by thread group id.