#[non_exhaustive]pub enum TcActionAttribute {
Kind(String),
Options(Vec<TcActionOption>),
Index(u32),
Stats(Vec<TcStats2>),
Cookie(Vec<u8>),
InHwCount(u32),
Other(DefaultNla),
}
Expand description
Attributes of a traffic control action.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Kind(String)
The Kind
(general type or class) of the action (e.g. “mirred”,
“nat”).
Options(Vec<TcActionOption>)
Parameters of the action.
Index(u32)
Index of the action.
This is used to identify the action in the kernel.
Each action Kind
has a unique table of actions.
That is, each action Kind
has its own set of Index
values.
If Index
is zero on action creation,
the kernel will assign a unique index to the new action.
The combination of Kind
and Index
can then be used to identify
and interact with the action in the future.
For example, one action can be used by multiple different filters by
referencing the action’s Index
when creating that filter.
Such multiply referenced actions will aggregate their statistics.
The kernel will reject attempts to delete an action if it is in use by a filter. Remove all referencing filters before deleting the action.
Stats(Vec<TcStats2>)
Statistics about the action (e.g., number of bytes and or packets processed).
Cookie(Vec<u8>)
Cookie
is an attribute which is not interpreted by the kernel at
all and may be used to store up to 16 bytes of arbitrary data on
an action in the kernel.
Userspace processes may then use this data to store additional
information about the action or to correlate actions with other
data.
InHwCount(u32)
Number of times the action has been installed in hardware.
Other(DefaultNla)
Other attributes unknown at the time of writing or not yet supported by this library.
Trait Implementations§
source§impl Clone for TcActionAttribute
impl Clone for TcActionAttribute
source§fn clone(&self) -> TcActionAttribute
fn clone(&self) -> TcActionAttribute
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TcActionAttribute
impl Debug for TcActionAttribute
source§impl Nla for TcActionAttribute
impl Nla for TcActionAttribute
source§impl<'a, T, P> ParseableParametrized<NlaBuffer<&'a T>, P> for TcActionAttribute
impl<'a, T, P> ParseableParametrized<NlaBuffer<&'a T>, P> for TcActionAttribute
source§fn parse_with_param(
buf: &NlaBuffer<&'a T>,
kind: P,
) -> Result<Self, DecodeError>
fn parse_with_param( buf: &NlaBuffer<&'a T>, kind: P, ) -> Result<Self, DecodeError>
source§impl PartialEq for TcActionAttribute
impl PartialEq for TcActionAttribute
impl Eq for TcActionAttribute
impl StructuralPartialEq for TcActionAttribute
Auto Trait Implementations§
impl Freeze for TcActionAttribute
impl RefUnwindSafe for TcActionAttribute
impl Send for TcActionAttribute
impl Sync for TcActionAttribute
impl Unpin for TcActionAttribute
impl UnwindSafe for TcActionAttribute
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)