Struct redbpf::SocketFilter [−][src]
pub struct SocketFilter { /* fields omitted */ }
Expand description
Type to work with socket filters
.
Implementations
Attach the socket filter program.
Attach the socket filter program to the given network interface.
Example
use redbpf::Module;
let mut module = Module::parse(&std::fs::read("file.elf").unwrap()).unwrap();
for sf in module.socket_filters_mut() {
sf.attach_socket_filter("eth0").unwrap();
}
Auto Trait Implementations
impl RefUnwindSafe for SocketFilter
impl Send for SocketFilter
impl Sync for SocketFilter
impl Unpin for SocketFilter
impl UnwindSafe for SocketFilter
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