This commit is contained in:
Neil Alexander 2022-10-02 13:20:39 +01:00
parent 962665189c
commit 69632bacb5
9 changed files with 25 additions and 87 deletions

View file

@ -14,9 +14,9 @@ import (
"golang.zx2c4.com/wireguard/tun"
"github.com/yggdrasil-network/yggdrasil-go/src/address"
"github.com/yggdrasil-network/yggdrasil-go/src/core"
"github.com/yggdrasil-network/yggdrasil-go/src/defaults"
"github.com/yggdrasil-network/yggdrasil-go/src/ipv6rwc"
"github.com/yggdrasil-network/yggdrasil-go/src/util"
)
type MTU uint16
@ -27,7 +27,7 @@ type MTU uint16
// calling yggdrasil.Start().
type TunAdapter struct {
rwc *ipv6rwc.ReadWriteCloser
log util.Logger
log core.Logger
addr address.Address
subnet address.Subnet
mtu uint64
@ -90,7 +90,7 @@ func MaximumMTU() uint64 {
// Init initialises the TUN module. You must have acquired a Listener from
// the Yggdrasil core before this point and it must not be in use elsewhere.
func New(rwc *ipv6rwc.ReadWriteCloser, log util.Logger, opts ...SetupOption) (*TunAdapter, error) {
func New(rwc *ipv6rwc.ReadWriteCloser, log core.Logger, opts ...SetupOption) (*TunAdapter, error) {
tun := &TunAdapter{
rwc: rwc,
log: log,