SingleNICInfo returns the NICInfo for the given NICID.
(id tcpip.NICID)
| 1271 | |
| 1272 | // SingleNICInfo returns the NICInfo for the given NICID. |
| 1273 | func (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. |
| 1285 | func (s *Stack) NICInfo() map[tcpip.NICID]NICInfo { |
no test coverage detected