// TUNFlagsToLinux converts a tun.Flags to Linux TUN flags.
TUNFlagsToLinux converts a tun.Flags to Linux TUN flags.
// TUNFlagsToLinux converts a tun . Flags to Linux TUN flags .
func TUNFlagsToLinux(flags tun.Flags) uint16 {
	ret := uint16(linux.IFF_NOFILTER)
	if flags.TAP {
		ret |= linux.IFF_TAP
	}
	if flags.TUN {
		ret |= linux.IFF_TUN
	}
	if flags.NoPacketInfo {
		ret |= linux.IFF_NO_PI
	}
	return ret
}
func TUNFlagsToLinux ( flags tun . Flags ) uint16 { ret := uint16 ( linux . IFF_NOFILTER ) if flags . TAP { ret |= linux . IFF_TAP } if flags . TUN { ret |= linux . IFF_TUN } if flags . NoPacketInfo { ret |= linux . IFF_NO_PI } return ret }
TUNFlagsToLinux converts a tun.Flags to Linux TUN flags.
TUNFlagsToLinux converts a tun . Flags to Linux TUN flags .