diff options
-rw-r--r-- | dhcpv4/server4/conn_unix.go (renamed from dhcpv4/server4/conn.go) | 2 | ||||
-rw-r--r-- | dhcpv4/server4/conn_windows.go | 11 | ||||
-rw-r--r-- | interfaces/bindtodevice_windows.go | 8 |
3 files changed, 21 insertions, 0 deletions
diff --git a/dhcpv4/server4/conn.go b/dhcpv4/server4/conn_unix.go index 3e49669..da62398 100644 --- a/dhcpv4/server4/conn.go +++ b/dhcpv4/server4/conn_unix.go @@ -1,3 +1,5 @@ +// +build !windows + package server4 import ( diff --git a/dhcpv4/server4/conn_windows.go b/dhcpv4/server4/conn_windows.go new file mode 100644 index 0000000..cbe9d71 --- /dev/null +++ b/dhcpv4/server4/conn_windows.go @@ -0,0 +1,11 @@ +package server4 + +import ( + "errors" + "net" +) + +// NewIPv4UDPConn fails on Windows. Use WithConn() to pass the connection. +func NewIPv4UDPConn(iface string, addr *net.UDPAddr) (*net.UDPConn, error) { + return nil, errors.New("not implemented on Windows") +} diff --git a/interfaces/bindtodevice_windows.go b/interfaces/bindtodevice_windows.go new file mode 100644 index 0000000..6de9b4d --- /dev/null +++ b/interfaces/bindtodevice_windows.go @@ -0,0 +1,8 @@ +package interfaces + +import "errors" + +// BindToInterface fails on Windows. +func BindToInterface(fd int, ifname string) error { + return errors.New("not implemented on Windows") +} |