From 1f48971a80f48257e478e532f6971d0557026120 Mon Sep 17 00:00:00 2001 From: Matt Layher Date: Mon, 10 Jun 2019 17:33:40 -0400 Subject: tun: remove TUN prefix from types to reduce stutter elsewhere Signed-off-by: Matt Layher --- tun/tun_windows.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tun/tun_windows.go') 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 } -- cgit v1.2.3-59-g8ed1b