2019-01-02 18:05:54 +00:00
|
|
|
// +build mobile
|
|
|
|
|
2019-03-28 00:30:25 +00:00
|
|
|
package tuntap
|
2019-01-02 18:05:54 +00:00
|
|
|
|
|
|
|
// This is to catch unsupported platforms
|
|
|
|
// If your platform supports tun devices, you could try configuring it manually
|
|
|
|
|
|
|
|
// Creates the TUN/TAP adapter, if supported by the Water library. Note that
|
|
|
|
// no guarantees are made at this point on an unsupported platform.
|
2019-03-28 00:30:25 +00:00
|
|
|
func (tun *TunAdapter) setup(ifname string, iftapmode bool, addr string, mtu int) error {
|
2019-01-02 18:05:54 +00:00
|
|
|
tun.mtu = getSupportedMTU(mtu)
|
|
|
|
return tun.setupAddress(addr)
|
|
|
|
}
|
|
|
|
|
|
|
|
// We don't know how to set the IPv6 address on an unknown platform, therefore
|
|
|
|
// write about it to stdout and don't try to do anything further.
|
2019-03-28 00:30:25 +00:00
|
|
|
func (tun *TunAdapter) setupAddress(addr string) error {
|
2019-01-02 18:05:54 +00:00
|
|
|
return nil
|
|
|
|
}
|