Struct redbpf::StreamParser [−][src]
pub struct StreamParser { /* fields omitted */ }
Expand description
Type to work with stream_parser
BPF programs.
Implementations
Attach sock_map
to stream parser BPF program.
Example
use redbpf::{load::Loader, SockMap};
let loaded = Loader::load(b"echo.elf").expect("error loading BPF program");
let mut echo_sockmap = SockMap::new(loaded.map("echo_sockmap").expect("sockmap not found")).unwrap();
loaded.stream_parsers().next().unwrap().attach_sockmap(&echo_sockmap).expect("Attaching sockmap failed");
Auto Trait Implementations
impl RefUnwindSafe for StreamParser
impl Send for StreamParser
impl Sync for StreamParser
impl Unpin for StreamParser
impl UnwindSafe for StreamParser
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more