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();
}