Attempt to support NetBSD

This code actually consolidates a lot of the BSD code together, and even setting the interface MTU with SIOCSIFMTU seems to work fine.

What doesn't work though is setting the interface address using SIOCSIFADDR_IN6, which I attempted to plagiarise from the Darwin code.

As a fallback, ifconfig is used, which solves the problem enough to get it working.
This commit is contained in:
Neil Alexander 2018-03-04 23:47:01 +00:00
parent b30b6022a8
commit 166d25619d
5 changed files with 106 additions and 111 deletions

View file

@ -1,4 +1,4 @@
// +build !linux,!darwin,!windows,!openbsd,!freebsd
// +build !linux,!darwin,!windows,!openbsd,!freebsd,!netbsd
package yggdrasil