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§
Sourcefn process_packet<'a>(
&mut self,
port: u16,
pkt: &mut packet_in<'a>,
) -> Vec<(packet_out<'a>, u16)>
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.
Sourcefn add_table_entry(
&mut self,
table_id: &str,
action_id: &str,
keyset_data: &[u8],
parameter_data: &[u8],
priority: u32,
)
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.
Sourcefn remove_table_entry(&mut self, table_id: &str, keyset_data: &[u8])
fn remove_table_entry(&mut self, table_id: &str, keyset_data: &[u8])
Remove an entry from a table identified by table_id.
Sourcefn clear_table_entries(&mut self, table_id: &str) -> bool
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.
Sourcefn get_table_entries(&self, table_id: &str) -> Option<Vec<TableEntry>>
fn get_table_entries(&self, table_id: &str) -> Option<Vec<TableEntry>>
Get all the entries in a table.
Sourcefn get_table_ids(&self) -> Vec<&str>
fn get_table_ids(&self) -> Vec<&str>
Get a list of table ids