summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@tailscale.com>2021-05-06 10:23:45 -0700
committerBrad Fitzpatrick <bradfitz@tailscale.com>2021-05-06 10:23:45 -0700
commit3bce8328a2e92d0b74c394e4ebdc2643b45fe793 (patch)
treeabb2f9f53ecef18c0e8b46f83b238d808c89f276
parentb8fb8264a590bfd82dd7c9fc9da58a80ffe24dc6 (diff)
downloadtailscale-bradfitz/ping_notes.tar.xz
tailscale-bradfitz/ping_notes.zip
tailcfg: ping request notes WIPbradfitz/ping_notes
-rw-r--r--tailcfg/tailcfg.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/tailcfg/tailcfg.go b/tailcfg/tailcfg.go
index 1c49a19dd..3a61bd83c 100644
--- a/tailcfg/tailcfg.go
+++ b/tailcfg/tailcfg.go
@@ -884,6 +884,24 @@ type PingRequest struct {
// Log is whether to log about this ping in the success case.
// For failure cases, the client will log regardless.
Log bool `json:",omitempty"`
+
+ Initiator string // admin@email; "system" (for Tailscale)
+ TestIP netaddr.IP
+ Types string // empty means all: TSMP+ICMP+disco
+ StopAfterNDirect int // 1 means stop on 1st direct ping; 4 means 4 direct pings; 0 means do MaxPings and stop
+ MaxPings int // MaxPings total, direct or DERPed
+ PayloadSize int // default: 0 extra bytes
+}
+
+type StreamedPingResult struct {
+ IP netaddr.IP
+ SeqNum int // somewhat redundant with TxID but for clarity
+ SentTo NodeID // for exit/subnet relays
+ TxID string // N hex bytes random
+ Dir string // "in"/"out"
+ Type string // ICMP, disco, TSMP, ...
+ Via string // "direct", "derp-nyc", ...
+ Seconds float64 // for Dir "in" only
}
type MapResponse struct {