Pipeline

Trait Pipeline 

Source
pub trait Pipeline: Send {
    // Required methods
    fn process_packet<'a>(
        &mut self,
        port: u16,
        pkt: &mut packet_in<'a>,
    ) -> Vec<(packet_out<'a>, u16)>;
    fn add_table_entry(
        &mut self,
        table_id: &str,
        action_id: &str,
        keyset_data: &[u8],
        parameter_data: &[u8],
        priority: u32,
    );
    fn remove_table_entry(&mut self, table_id: &str, keyset_data: &[u8]);
    fn clear_table_entries(&mut self, table_id: &str) -> bool;
    fn get_table_entries(&self, table_id: &str) -> Option<Vec<TableEntry>>;
    fn get_table_ids(&self) -> Vec<&str>;
}

Required Methods§

Source

fn process_packet<'a>( &mut self, port: u16, pkt: &mut packet_in<'a>, ) -> Vec<(packet_out<'a>, u16)>

Process an input packet and produce a set of output packets.

Source

fn add_table_entry( &mut self, table_id: &str, action_id: &str, keyset_data: &[u8], parameter_data: &[u8], priority: u32, )

Add an entry to a table identified by table_id.

Source

fn remove_table_entry(&mut self, table_id: &str, keyset_data: &[u8])

Remove an entry from a table identified by table_id.

Source

fn clear_table_entries(&mut self, table_id: &str) -> bool

Remove all entries from a table identified by table_id.

Returns true if the table was cleared, or false if table_id maps to no table in this pipeline. This return type distinguishes an unknown table from an already-empty one, like Pipeline::get_table_entries does with None.

Source

fn get_table_entries(&self, table_id: &str) -> Option<Vec<TableEntry>>

Get all the entries in a table.

Source

fn get_table_ids(&self) -> Vec<&str>

Get a list of table ids

Implementors§