5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-10 07:30:27 +00:00
yggdrasil-go/src/yggdrasil/tun_freebsd.go
Neil Alexander 166d25619d 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.
2018-03-04 23:47:01 +00:00

11 lines
209 B
Go

package yggdrasil
func getDefaults() tunDefaultParameters {
return tunDefaultParameters{
maximumIfMTU: 32767,
defaultIfMTU: 32767,
defaultIfName: "/dev/tap0",
defaultIfTAPMode: true,
}
}