From d4666bc14118b32cc22ad68da36dbde8e3a93374 Mon Sep 17 00:00:00 2001 From: Andrea Barberio Date: Wed, 7 Feb 2018 18:23:47 +0000 Subject: Added OS-specific implementations for binding to a network device --- dhcpv4/bindtodevice_linux.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 dhcpv4/bindtodevice_linux.go (limited to 'dhcpv4/bindtodevice_linux.go') diff --git a/dhcpv4/bindtodevice_linux.go b/dhcpv4/bindtodevice_linux.go new file mode 100644 index 0000000..957744a --- /dev/null +++ b/dhcpv4/bindtodevice_linux.go @@ -0,0 +1,11 @@ +// +build linux + +package dhcpv4 + +import ( + "syscall" +) + +func BindToInterface(fd int, ifname string) error { + return syscall.BindToDevice(fd, ifname) +} -- cgit v1.2.3