(sb *ipnstate.StatusBuilder)
| 1320 | } |
| 1321 | |
| 1322 | func (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 | |
| 1342 | func (e *userspaceEngine) Ping(ip netip.Addr, pingType tailcfg.PingType, size int, cb func(*ipnstate.PingResult)) { |
| 1343 | res := &ipnstate.PingResult{IP: ip.String()} |
nothing calls this directly
no test coverage detected