net/packet, wgengine/{filter,tstun}: add TSMP ping

Fixes #1467

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2021-03-23 15:16:15 -07:00
committed by Brad Fitzpatrick
parent 4b77eca2de
commit 2384c112c9
13 changed files with 247 additions and 18 deletions

View File

@@ -407,10 +407,18 @@ type PingResult struct {
Err string
LatencySeconds float64
Endpoint string // ip:port if direct UDP was used
// Endpoint is the ip:port if direct UDP was used.
// It is not currently set for TSMP pings.
Endpoint string
DERPRegionID int // non-zero if DERP was used
DERPRegionCode string // three-letter airport/region code if DERP was used
// DERPRegionID is non-zero DERP region ID if DERP was used.
// It is not currently set for TSMP pings.
DERPRegionID int
// DERPRegionCode is the three-letter region code
// corresponding to DERPRegionID.
// It is not currently set for TSMP pings.
DERPRegionCode string
// TODO(bradfitz): details like whether port mapping was used on either side? (Once supported)
}