From 1fdf7b19a3b7237ad7e63ae3e08d77686649ec0e Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Mon, 4 Mar 2019 14:27:16 +0100 Subject: wintun: Resolve some of golint warnings Signed-off-by: Simon Rozman --- tun/tun_windows.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tun/tun_windows.go') diff --git a/tun/tun_windows.go b/tun/tun_windows.go index e2752db..4c48af5 100644 --- a/tun/tun_windows.go +++ b/tun/tun_windows.go @@ -52,6 +52,10 @@ func packetAlign(size uint32) uint32 { return (size + (packetExchangeAlignment - 1)) &^ (packetExchangeAlignment - 1) } +// +// 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) { // Does an interface with this name already exist? wt, err := wintun.GetInterface(ifname, 0) @@ -351,6 +355,9 @@ func (tun *NativeTun) Write(buff []byte, offset int) (int, error) { return len(buff) - offset, tun.flush() } +// +// GUID returns Windows adapter instance ID. +// func (tun *NativeTun) GUID() windows.GUID { return *(*windows.GUID)(tun.wt) } -- cgit v1.2.3-59-g8ed1b