]> Cypherpunks.ru repositories - govpn.git/blobdiff - tap_freebsd.go
Raise copyright years
[govpn.git] / tap_freebsd.go
index a9d6ab37d86ec7e63db26879ce8d567d88f4a821..677ba29a696938ad8517f76cfa9cfe1ad309863f 100644 (file)
@@ -1,20 +1,18 @@
 // +build freebsd
 
 /*
-govpn -- high-performance secure virtual private network daemon
-Copyright (C) 2014 Sergey Matveev <stargrave@stargrave.org>
+GoVPN -- simple secure free software virtual private network daemon
+Copyright (C) 2014-2020 Sergey Matveev <stargrave@stargrave.org>
 */
-package main
+
+package govpn
 
 import (
+       "io"
        "os"
        "path"
 )
 
-func NewTAP(ifaceName string) TAP {
-       fd, err := os.OpenFile(path.Join("/dev/", ifaceName), os.O_RDWR, os.ModePerm)
-       if err != nil {
-               panic(err)
-       }
-       return fd
+func newTAPer(ifaceName string) (io.ReadWriter, error) {
+       return os.OpenFile(path.Join("/dev/", ifaceName), os.O_RDWR, os.ModePerm)
 }