Skip to main content

bind_to_device

Function bind_to_device 

Source
pub fn bind_to_device(fd: RawFd, device: &str) -> Result<()>
Expand description

Bind a socket to a specific network interface using SO_BINDTODEVICE.

Requires CAP_NET_RAW or root on Linux.