aboutsummaryrefslogtreecommitdiffstats
path: root/tun/tun_windows.go
diff options
context:
space:
mode:
authorMatt Layher <mdlayher@gmail.com>2019-06-10 17:33:40 -0400
committerJason A. Donenfeld <Jason@zx2c4.com>2019-06-14 18:35:57 +0200
commit1f48971a80f48257e478e532f6971d0557026120 (patch)
treecd2a3b83a1b3d5e09d5e8283c61d29537f0cbf3e /tun/tun_windows.go
parentdevice: update transfer counters correctly (diff)
downloadwireguard-go-1f48971a80f48257e478e532f6971d0557026120.tar.xz
wireguard-go-1f48971a80f48257e478e532f6971d0557026120.zip
tun: remove TUN prefix from types to reduce stutter elsewhere
Signed-off-by: Matt Layher <mdlayher@gmail.com>
Diffstat (limited to 'tun/tun_windows.go')
-rw-r--r--tun/tun_windows.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/tun/tun_windows.go b/tun/tun_windows.go
index 4850bb5..b88129d 100644
--- a/tun/tun_windows.go
+++ b/tun/tun_windows.go
@@ -46,7 +46,7 @@ type NativeTun struct {
close bool
rdBuff *exchgBufRead
wrBuff *exchgBufWrite
- events chan TUNEvent
+ events chan Event
errors chan error
forcedMTU int
}
@@ -59,7 +59,7 @@ func packetAlign(size uint32) uint32 {
// CreateTUN creates a Wintun adapter with the given name. Should a Wintun
// adapter with the same name exist, it is reused.
//
-func CreateTUN(ifname string) (TUNDevice, error) {
+func CreateTUN(ifname string) (Device, error) {
return CreateTUNWithRequestedGUID(ifname, nil)
}
@@ -67,7 +67,7 @@ func CreateTUN(ifname string) (TUNDevice, error) {
// CreateTUNWithRequestedGUID creates a Wintun adapter with the given name and
// a requested GUID. Should a Wintun adapter with the same name exist, it is reused.
//
-func CreateTUNWithRequestedGUID(ifname string, requestedGUID *windows.GUID) (TUNDevice, error) {
+func CreateTUNWithRequestedGUID(ifname string, requestedGUID *windows.GUID) (Device, error) {
var err error
var wt *wintun.Wintun
@@ -97,7 +97,7 @@ func CreateTUNWithRequestedGUID(ifname string, requestedGUID *windows.GUID) (TUN
wt: wt,
rdBuff: &exchgBufRead{},
wrBuff: &exchgBufWrite{},
- events: make(chan TUNEvent, 10),
+ events: make(chan Event, 10),
errors: make(chan error, 1),
forcedMTU: 1500,
}, nil
@@ -202,7 +202,7 @@ func (tun *NativeTun) File() *os.File {
return nil
}
-func (tun *NativeTun) Events() chan TUNEvent {
+func (tun *NativeTun) Events() chan Event {
return tun.events
}