"golang.zx2c4.com/wireguard/ipc/winpipe"
)
-//TODO: replace these with actual standard windows error numbers from the win package
+// TODO: replace these with actual standard windows error numbers from the win package
const (
IpcErrorIO = -int64(5)
IpcErrorProtocol = -int64(71)
}
func (tun *NativeTun) Flush() error {
- //TODO: can flushing be implemented by buffering and using sendmmsg?
+ // TODO: can flushing be implemented by buffering and using sendmmsg?
return nil
}
_TUNSIFPID = 0x2000745f
)
-//TODO: move into x/sys/unix
+// TODO: move into x/sys/unix
const (
SIOCGIFINFO_IN6 = 0xc048696c
SIOCSIFINFO_IN6 = 0xc048696d
}
func (tun *NativeTun) Flush() error {
- //TODO: can flushing be implemented by buffering and using sendmmsg?
+ // TODO: can flushing be implemented by buffering and using sendmmsg?
return nil
}
}
func (tun *NativeTun) Flush() error {
- //TODO: can flushing be implemented by buffering and using sendmmsg?
+ // TODO: can flushing be implemented by buffering and using sendmmsg?
return nil
}
}
func (tun *NativeTun) Flush() error {
- //TODO: can flushing be implemented by buffering and using sendmmsg?
+ // TODO: can flushing be implemented by buffering and using sendmmsg?
return nil
}
return tun.forcedMTU, nil
}
-//TODO: This is a temporary hack. We really need to be monitoring the interface in real time and adapting to MTU changes.
+// TODO: This is a temporary hack. We really need to be monitoring the interface in real time and adapting to MTU changes.
func (tun *NativeTun) ForceMTU(mtu int) {
tun.forcedMTU = mtu
}
continue
}
- //TODO: is there a better way than comparing ifnames?
+ // TODO: is there a better way than comparing ifnames?
// Get interface name.
ifname2, err := wintun.InterfaceName()
if err != nil {
// Search for the driver.
const driverType = setupapi.SPDIT_COMPATDRIVER
- err = devInfoList.BuildDriverInfoList(deviceData, driverType) //TODO: This takes ~510ms
+ err = devInfoList.BuildDriverInfoList(deviceData, driverType) // TODO: This takes ~510ms
if err != nil {
return nil, false, fmt.Errorf("SetupDiBuildDriverInfoList failed: %v", err)
}
driverDate := windows.Filetime{}
driverVersion := uint64(0)
- for index := 0; ; index++ { //TODO: This loop takes ~600ms
+ for index := 0; ; index++ { // TODO: This loop takes ~600ms
// Get a driver from the list.
driverData, err := devInfoList.EnumDriverInfo(deviceData, driverType, index)
if err != nil {
}
// Get interface ID.
- //TODO: Store some ID in the Wintun object such that this call isn't required.
+ // TODO: Store some ID in the Wintun object such that this call isn't required.
wintun2, err := makeWintun(devInfoList, deviceData)
if err != nil {
continue