Skip to main content

attach

Function attach 

Source
fn attach(socket: &Socket, prog: &mut [sock_filter]) -> Result<()>
Expand description

Attach a cBPF program to a socket via SO_ATTACH_FILTER. The kernel copies the program during the call, so prog need only remain valid for the duration of this function.