Rename tuntap package to tun

We haven't had TAP support in ages.
This commit is contained in:
Neil Alexander 2022-09-24 14:41:47 +01:00
parent 217ac39e77
commit 01c44a087b
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
18 changed files with 31 additions and 36 deletions

20
src/tun/options.go Normal file
View 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() {}