diff options
Diffstat (limited to 'interfaces/bindtodevice_linux.go')
-rw-r--r-- | interfaces/bindtodevice_linux.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/interfaces/bindtodevice_linux.go b/interfaces/bindtodevice_linux.go new file mode 100644 index 0000000..52c7177 --- /dev/null +++ b/interfaces/bindtodevice_linux.go @@ -0,0 +1,9 @@ +// +build linux + +package interfaces + +import "golang.org/x/sys/unix" + +func BindToInterface(fd int, ifname string) error { + return unix.BindToDevice(fd, ifname) +} |