Struct aya::programs::SkSkb [−][src]
pub struct SkSkb { /* fields omitted */ }
Expand description
A program used to intercept ingress socket buffers.
SkSkb
programs are attached to socket maps, and can be used to
inspect, redirect or filter incoming packet. See also SockMap
and
SockHash
.
Examples
use std::convert::{TryFrom, TryInto}; use aya::maps::SockMap; use aya::programs::SkSkb; let intercept_ingress = SockMap::try_from(bpf.map_mut("INTERCEPT_INGRESS")?)?; let prog: &mut SkSkb = bpf.program_mut("intercept_ingress_packet")?.try_into()?; prog.load()?; prog.attach(&intercept_ingress)?;
Implementations
Loads the program inside the kernel.
See also Program::load
.
Trait Implementations
type Error = ProgramError
type Error = ProgramError
The type returned in the event of a conversion error.
Auto Trait Implementations
impl !RefUnwindSafe for SkSkb
impl !UnwindSafe for SkSkb