MCPcopy Index your code
hub / github.com/google/gvisor / SingleNICInfo

Method SingleNICInfo

pkg/tcpip/stack/stack.go:1273–1282  ·  view source on GitHub ↗

SingleNICInfo returns the NICInfo for the given NICID.

(id tcpip.NICID)

Source from the content-addressed store, hash-verified

1271
1272// SingleNICInfo returns the NICInfo for the given NICID.
1273func (s *Stack) SingleNICInfo(id tcpip.NICID) (*NICInfo, bool) {
1274 s.mu.RLock()
1275 defer s.mu.RUnlock()
1276
1277 if nic, ok := s.nics[id]; !ok {
1278 return nil, false
1279 } else {
1280 return s.nicInfo(nic, id), true
1281 }
1282}
1283
1284// NICInfo returns a map of NICIDs to their associated information.
1285func (s *Stack) NICInfo() map[tcpip.NICID]NICInfo {

Callers 3

sendChangeEventMethod · 0.80
RemoveInterfaceMethod · 0.80
setLinkLockedMethod · 0.80

Calls 3

nicInfoMethod · 0.95
RLockMethod · 0.45
RUnlockMethod · 0.45

Tested by

no test coverage detected