pub struct NxLearn {
pub idle_timeout: u16,
pub hard_timeout: u16,
pub priority: u16,
pub cookie: u64,
pub flags: u16,
pub table_id: u8,
pub fin_idle_timeout: u16,
pub fin_hard_timeout: u16,
pub specs: Vec<LearnSpec>,
}Expand description
NxLearn action (Nicira extension).
The learn action creates flows dynamically based on packet content. This is commonly used for MAC learning in OVS.
Fields§
§idle_timeout: u16Idle timeout for learned flows (0 = no timeout)
hard_timeout: u16Hard timeout for learned flows (0 = no timeout)
priority: u16Priority of learned flows
Cookie for learned flows
flags: u16Learn flags
table_id: u8Table to install learned flows
fin_idle_timeout: u16Idle timeout when FIN received
fin_hard_timeout: u16Hard timeout when FIN received
specs: Vec<LearnSpec>Flow modification specs (match and action specifications)
Implementations§
Source§impl NxLearn
impl NxLearn
Sourcepub fn idle_timeout(self, timeout: u16) -> Self
pub fn idle_timeout(self, timeout: u16) -> Self
Set idle timeout for learned flows.
Sourcepub fn hard_timeout(self, timeout: u16) -> Self
pub fn hard_timeout(self, timeout: u16) -> Self
Set hard timeout for learned flows.
Set cookie for learned flows.
Sourcepub fn match_field(self, src_field: u32, dst_field: u32, n_bits: u16) -> Self
pub fn match_field(self, src_field: u32, dst_field: u32, n_bits: u16) -> Self
Add a spec to match a field from the packet.
Sourcepub fn match_immediate(
self,
dst_field: u32,
value: Vec<u8>,
n_bits: u16,
) -> Self
pub fn match_immediate( self, dst_field: u32, value: Vec<u8>, n_bits: u16, ) -> Self
Add a spec to match an immediate value.
Sourcepub fn load_field(self, src_field: u32, dst_field: u32, n_bits: u16) -> Self
pub fn load_field(self, src_field: u32, dst_field: u32, n_bits: u16) -> Self
Add a spec to load a field from packet into action.
Sourcepub fn load_immediate(self, dst_field: u32, value: Vec<u8>, n_bits: u16) -> Self
pub fn load_immediate(self, dst_field: u32, value: Vec<u8>, n_bits: u16) -> Self
Add a spec to load an immediate value into action.
Sourcepub fn output_field(self, src_field: u32, n_bits: u16) -> Self
pub fn output_field(self, src_field: u32, n_bits: u16) -> Self
Add a spec to output to port from field.