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 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. Normally
there will be a single output packet. However, if the pipeline sets
egress_metadata_t.broadcast
there may be multiple 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 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