1 2 3 4 5 6 7 8 9
// +build linux package interfaces import "golang.org/x/sys/unix" func BindToInterface(fd int, ifname string) error { return unix.BindToDevice(fd, ifname) }