1
0
mirror of https://git.zx2c4.com/wireguard-go synced 2024-11-15 01:05:15 +01:00

global: fixup TODO comment spacing

This commit is contained in:
Jason A. Donenfeld 2019-06-06 23:00:15 +02:00
parent 6d8b68c8f3
commit eaf17becfa
7 changed files with 11 additions and 11 deletions

View File

@ -11,7 +11,7 @@ import (
"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)

View File

@ -286,7 +286,7 @@ func (tun *NativeTun) Write(buff []byte, offset int) (int, error) {
}
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
}

View File

@ -26,7 +26,7 @@ const (
_TUNSIFPID = 0x2000745f
)
//TODO: move into x/sys/unix
// TODO: move into x/sys/unix
const (
SIOCGIFINFO_IN6 = 0xc048696c
SIOCSIFINFO_IN6 = 0xc048696d
@ -467,7 +467,7 @@ func (tun *NativeTun) Write(buff []byte, offset int) (int, error) {
}
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
}

View File

@ -320,7 +320,7 @@ func (tun *NativeTun) Write(buff []byte, offset int) (int, error) {
}
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
}

View File

@ -239,7 +239,7 @@ func (tun *NativeTun) Write(buff []byte, offset int) (int, error) {
}
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
}

View File

@ -218,7 +218,7 @@ func (tun *NativeTun) MTU() (int, error) {
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
}

View File

@ -122,7 +122,7 @@ func GetInterface(ifname string, hwndParent uintptr) (*Wintun, error) {
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 {
@ -225,7 +225,7 @@ func CreateInterface(description string, hwndParent uintptr) (*Wintun, bool, err
// 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)
}
@ -233,7 +233,7 @@ func CreateInterface(description string, hwndParent uintptr) (*Wintun, bool, 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 {
@ -572,7 +572,7 @@ func (wintun *Wintun) deviceData(hwndParent uintptr) (setupapi.DevInfo, *setupap
}
// 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