]> Cypherpunks.ru repositories - govpn.git/blob - src/cypherpunks.ru/govpn/tap_freebsd.go
tap_freebsd is too small for licensing
[govpn.git] / src / cypherpunks.ru / govpn / tap_freebsd.go
1 // +build freebsd
2
3 /*
4 GoVPN -- simple secure free software virtual private network daemon
5 Copyright (C) 2014-2017 Sergey Matveev <stargrave@stargrave.org>
6 */
7
8 package govpn
9
10 import (
11         "io"
12         "os"
13         "path"
14
15         "github.com/pkg/errors"
16 )
17
18 func newTAPer(ifaceName string) (io.ReadWriteCloser, error) {
19         output, err := os.OpenFile(path.Join("/dev/", ifaceName), os.O_RDWR, os.ModePerm)
20         return output, errors.Wrap(err, "os.OpenFile")
21 }