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§
Sourcetype RunContext<'a>
type RunContext<'a>
Context for an invocation of an eBPF program.
Sourcetype Packet<'a>: Packet + FromBpfValue<Self::RunContext<'a>>
type Packet<'a>: Packet + FromBpfValue<Self::RunContext<'a>>
Packet used by the program.
Sourcetype Arg1<'a>: ProgramArgument
type Arg1<'a>: ProgramArgument
Arguments passed to the program
type Arg2<'a>: ProgramArgument
type Arg3<'a>: ProgramArgument
type Arg4<'a>: ProgramArgument
type Arg5<'a>: ProgramArgument
Sourcetype Map: MapReference
type Map: MapReference
Type used to reference eBPF maps for the lifetime of a program.
Provided Methods§
Sourcefn struct_mappings() -> StructMappings
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.