open_packet_socket

Function open_packet_socket 

Source
pub fn open_packet_socket(ifindex: i32, protocol: u16) -> Result<OwnedFd>
Expand description

Create an AF_PACKET + SOCK_DGRAM socket bound to ifindex, filtering only frames with ethertype protocol. Returns a non-blocking OwnedFd.