MCPcopy Index your code
hub / github.com/tailscale/tailscale / UpdateStatus

Method UpdateStatus

wgengine/userspace.go:1322–1340  ·  view source on GitHub ↗
(sb *ipnstate.StatusBuilder)

Source from the content-addressed store, hash-verified

1320}
1321
1322func (e *userspaceEngine) UpdateStatus(sb *ipnstate.StatusBuilder) {
1323 st, err := e.getStatus()
1324 if err != nil {
1325 e.logf("wgengine: getStatus: %v", err)
1326 return
1327 }
1328 if sb.WantPeers {
1329 for _, ps := range st.Peers {
1330 sb.AddPeer(ps.NodeKey, &ipnstate.PeerStatus{
1331 RxBytes: int64(ps.RxBytes),
1332 TxBytes: int64(ps.TxBytes),
1333 LastHandshake: ps.LastHandshake,
1334 InEngine: true,
1335 })
1336 }
1337 }
1338
1339 e.magicConn.UpdateStatus(sb)
1340}
1341
1342func (e *userspaceEngine) Ping(ip netip.Addr, pingType tailcfg.PingType, size int, cb func(*ipnstate.PingResult)) {
1343 res := &ipnstate.PingResult{IP: ip.String()}

Callers

nothing calls this directly

Calls 4

getStatusMethod · 0.95
AddPeerMethod · 0.80
UpdateStatusMethod · 0.65
logfMethod · 0.45

Tested by

no test coverage detected