mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2026-05-21 13:26:29 +03:00
Rename tuntap package to tun
We haven't had TAP support in ages.
This commit is contained in:
20
src/tun/options.go
Normal file
20
src/tun/options.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package tun
|
||||
|
||||
func (m *TunAdapter) _applyOption(opt SetupOption) {
|
||||
switch v := opt.(type) {
|
||||
case InterfaceName:
|
||||
m.config.name = v
|
||||
case InterfaceMTU:
|
||||
m.config.mtu = v
|
||||
}
|
||||
}
|
||||
|
||||
type SetupOption interface {
|
||||
isSetupOption()
|
||||
}
|
||||
|
||||
type InterfaceName string
|
||||
type InterfaceMTU uint64
|
||||
|
||||
func (a InterfaceName) isSetupOption() {}
|
||||
func (a InterfaceMTU) isSetupOption() {}
|
||||
Reference in New Issue
Block a user