2024-06-03 20:42:06 +00:00
|
|
|
// Copyright (c) Tailscale Inc & AUTHORS
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
|
|
|
//go:build !linux
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
"io"
|
2024-08-09 15:03:58 +00:00
|
|
|
"net/netip"
|
2024-06-03 20:42:06 +00:00
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
2024-08-09 15:03:58 +00:00
|
|
|
func getUDPConnKernelTimestamp() (io.ReadWriteCloser, error) {
|
2024-06-03 20:42:06 +00:00
|
|
|
return nil, errors.New("unimplemented")
|
|
|
|
}
|
|
|
|
|
2024-08-12 20:39:11 +00:00
|
|
|
func measureSTUNRTTKernel(conn io.ReadWriteCloser, hostname string, dst netip.AddrPort) (rtt time.Duration, err error) {
|
2024-06-04 14:26:10 +00:00
|
|
|
return 0, errors.New("unimplemented")
|
2024-06-03 20:42:06 +00:00
|
|
|
}
|
|
|
|
|
2024-08-12 21:09:45 +00:00
|
|
|
func getProtocolSupportInfo(p protocol) protocolSupportInfo {
|
|
|
|
switch p {
|
|
|
|
case protocolSTUN:
|
|
|
|
return protocolSupportInfo{
|
|
|
|
kernelTS: false,
|
|
|
|
userspaceTS: true,
|
|
|
|
stableConn: true,
|
|
|
|
}
|
|
|
|
case protocolHTTPS:
|
|
|
|
return protocolSupportInfo{
|
|
|
|
kernelTS: false,
|
|
|
|
userspaceTS: true,
|
|
|
|
stableConn: true,
|
|
|
|
}
|
|
|
|
case protocolTCP:
|
|
|
|
return protocolSupportInfo{
|
|
|
|
kernelTS: true,
|
|
|
|
userspaceTS: false,
|
|
|
|
stableConn: true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return protocolSupportInfo{}
|
2024-06-03 20:42:06 +00:00
|
|
|
}
|
2024-08-12 20:39:11 +00:00
|
|
|
|
|
|
|
func setSOReuseAddr(fd uintptr) error {
|
|
|
|
return nil
|
|
|
|
}
|