diff options
author | Guillaume Rose <guillaume.rose@gmail.com> | 2021-06-08 01:53:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-08 09:53:46 +0100 |
commit | 465dd6c35f6c983206a5bc21fbfff4819ce21eb0 (patch) | |
tree | b1ecb516857e5162249184d59fd65e5015785cc9 /dhcpv4 | |
parent | fb4eaaa00ad29a188328380690494d9267dc1ccc (diff) |
Make server4 package compile on Windows (#428)
Diffstat (limited to 'dhcpv4')
-rw-r--r-- | dhcpv4/server4/conn_unix.go (renamed from dhcpv4/server4/conn.go) | 2 | ||||
-rw-r--r-- | dhcpv4/server4/conn_windows.go | 11 |
2 files changed, 13 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") +} |