From 33fd5b4634a946073930bdfcfd3189bf870e9748 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 9 Oct 2018 18:26:21 +0200 Subject: Update to go modules Signed-off-by: Jason A. Donenfeld --- .../git.zx2c4.com/wireguard-go/tun/api-android.go | 31 ---------------------- 1 file changed, 31 deletions(-) delete mode 100644 app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/tun/api-android.go (limited to 'app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/tun/api-android.go') diff --git a/app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/tun/api-android.go b/app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/tun/api-android.go deleted file mode 100644 index 90986c4d..00000000 --- a/app/tools/libwg-go/src/git.zx2c4.com/wireguard-go/tun/api-android.go +++ /dev/null @@ -1,31 +0,0 @@ -/* SPDX-License-Identifier: Apache-2.0 - * - * Copyright (C) 2017-2018 Jason A. Donenfeld . All Rights Reserved. - */ - -package tun - -import ( - "git.zx2c4.com/wireguard-go/rwcancel" - "os" -) - -func CreateTUNFromFD(tun_fd int) (TUNDevice, string, error) { - tun := &nativeTun{ - fd: os.NewFile(uintptr(tun_fd), "/dev/tun"), - events: make(chan TUNEvent, 5), - errors: make(chan error, 5), - nopi: true, - } - var err error - tun.fdCancel, err = rwcancel.NewRWCancel(tun_fd) - if err != nil { - return nil, "", err - } - name, err := tun.Name() - if err != nil { - tun.fdCancel.Cancel() - return nil, "", err - } - return tun, name, nil -} -- cgit v1.2.3