Trait portus::DatapathTrait

source ·
pub trait DatapathTrait {
    // Required methods
    fn get_sock_id(&self) -> u32;
    fn set_program(
        &mut self,
        program_name: &'static str,
        fields: Option<&[(&str, u32)]>
    ) -> Result<Scope>;
    fn update_field(&self, sc: &Scope, update: &[(&str, u32)]) -> Result<()>;
}
Expand description

A collection of methods to interact with the datapath.

Required Methods§

source

fn get_sock_id(&self) -> u32

source

fn set_program( &mut self, program_name: &'static str, fields: Option<&[(&str, u32)]> ) -> Result<Scope>

Tell datapath to use a preinstalled program.

source

fn update_field(&self, sc: &Scope, update: &[(&str, u32)]) -> Result<()>

Update the value of a register in an already-installed fold function.

Implementors§