summaryrefslogtreecommitdiffhomepage
path: root/tun/wintun/nci/nci_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'tun/wintun/nci/nci_windows.go')
-rw-r--r--tun/wintun/nci/nci_windows.go28
1 files changed, 0 insertions, 28 deletions
diff --git a/tun/wintun/nci/nci_windows.go b/tun/wintun/nci/nci_windows.go
deleted file mode 100644
index dc9733c..0000000
--- a/tun/wintun/nci/nci_windows.go
+++ /dev/null
@@ -1,28 +0,0 @@
-/* SPDX-License-Identifier: MIT
- *
- * Copyright (C) 2020 WireGuard LLC. All Rights Reserved.
- */
-
-package nci
-
-import "golang.org/x/sys/windows"
-
-//sys nciSetConnectionName(guid *windows.GUID, newName *uint16) (ret error) = nci.NciSetConnectionName
-//sys nciGetConnectionName(guid *windows.GUID, destName *uint16, inDestNameBytes uint32, outDestNameBytes *uint32) (ret error) = nci.NciGetConnectionName
-
-func SetConnectionName(guid *windows.GUID, newName string) error {
- newName16, err := windows.UTF16PtrFromString(newName)
- if err != nil {
- return err
- }
- return nciSetConnectionName(guid, newName16)
-}
-
-func ConnectionName(guid *windows.GUID) (string, error) {
- var name [0x400]uint16
- err := nciGetConnectionName(guid, &name[0], uint32(len(name)*2), nil)
- if err != nil {
- return "", err
- }
- return windows.UTF16ToString(name[:]), nil
-}