NextNICID allocates the next available NIC ID and returns it.
()
| 468 | |
| 469 | // NextNICID allocates the next available NIC ID and returns it. |
| 470 | func (s *Stack) NextNICID() tcpip.NICID { |
| 471 | next := s.nicIDGen.Add(1) |
| 472 | if next < 0 { |
| 473 | panic("NICID overflow") |
| 474 | } |
| 475 | return tcpip.NICID(next) |
| 476 | } |
| 477 | |
| 478 | // SetNetworkProtocolOption allows configuring individual protocol level |
| 479 | // options. This method returns an error if the protocol is not supported or |
no test coverage detected