EbpfProgramContext

Trait EbpfProgramContext 

Source
pub trait EbpfProgramContext: 'static + Sized {
    type RunContext<'a>;
    type Packet<'a>: Packet + FromBpfValue<Self::RunContext<'a>>;
    type Arg1<'a>: ProgramArgument;
    type Arg2<'a>: ProgramArgument;
    type Arg3<'a>: ProgramArgument;
    type Arg4<'a>: ProgramArgument;
    type Arg5<'a>: ProgramArgument;
    type Map: MapReference;

    // Provided method
    fn struct_mappings() -> StructMappings { ... }
}

Required Associated Types§

Source

type RunContext<'a>

Context for an invocation of an eBPF program.

Source

type Packet<'a>: Packet + FromBpfValue<Self::RunContext<'a>>

Packet used by the program.

Source

type Arg1<'a>: ProgramArgument

Arguments passed to the program

Source

type Arg2<'a>: ProgramArgument

Source

type Arg3<'a>: ProgramArgument

Source

type Arg4<'a>: ProgramArgument

Source

type Arg5<'a>: ProgramArgument

Source

type Map: MapReference

Type used to reference eBPF maps for the lifetime of a program.

Provided Methods§

Source

fn struct_mappings() -> StructMappings

Returns the set of struct mappings that should be applied when linking a program. The default implementation collects mappings from all arguments.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§