| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- // +build !darwin,!linux
- /*
- * Copyright (c) 2017, Psiphon Inc.
- * All rights reserved.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
- package tun
- import (
- "net"
- "os"
- "github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common"
- )
- const (
- DEFAULT_PUBLIC_INTERFACE_NAME = ""
- )
- func IsSupported() bool {
- return false
- }
- func makeDeviceInboundBuffer(_ int) []byte {
- return nil
- }
- func makeDeviceOutboundBuffer(_ int) []byte {
- return nil
- }
- func OpenTunDevice(_ string) (*os.File, string, error) {
- return nil, "", common.ContextError(unsupportedError)
- }
- func (device *Device) readTunPacket() (int, int, error) {
- return 0, 0, common.ContextError(unsupportedError)
- }
- func (device *Device) writeTunPacket(_ []byte) error {
- return common.ContextError(unsupportedError)
- }
- func configureNetworkConfigSubprocessCapabilities() error {
- return common.ContextError(unsupportedError)
- }
- func resetNATTables(_ *ServerConfig, _ net.IP) error {
- return common.ContextError(unsupportedError)
- }
- func configureServerInterface(_ *ServerConfig, _ string) error {
- return common.ContextError(unsupportedError)
- }
- func configureClientInterface(_ *ClientConfig, _ string) error {
- return common.ContextError(unsupportedError)
- }
- func BindToDevice(_ int, _ string) error {
- return common.ContextError(unsupportedError)
- }
- func fixBindToDevice(_ common.Logger, _ bool, _ string) error {
- // Not required
- return nil
- }
- type NonblockingIO struct {
- }
- func NewNonblockingIO(ioFD int) (*NonblockingIO, error) {
- return nil, common.ContextError(unsupportedError)
- }
- func (nio *NonblockingIO) Read(p []byte) (int, error) {
- return 0, common.ContextError(unsupportedError)
- }
- func (nio *NonblockingIO) Write(p []byte) (int, error) {
- return 0, common.ContextError(unsupportedError)
- }
- func (nio *NonblockingIO) IsClosed() bool {
- return false
- }
- func (nio *NonblockingIO) Close() error {
- return common.ContextError(unsupportedError)
- }
|