MCPcopy
hub / github.com/google/gvisor / NextNICID

Method NextNICID

pkg/tcpip/stack/stack.go:470–476  ·  view source on GitHub ↗

NextNICID allocates the next available NIC ID and returns it.

()

Source from the content-addressed store, hash-verified

468
469// NextNICID allocates the next available NIC ID and returns it.
470func (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

Callers 7

ReplaceConfigMethod · 0.95
newVethMethod · 0.80
newBridgeMethod · 0.80
attachOrCreateNICFunction · 0.80
SetNICStackMethod · 0.80
CreateStackMethod · 0.80
CreateLinksAndRoutesMethod · 0.80

Calls 2

NICIDTypeAlias · 0.92
AddMethod · 0.65

Tested by

no test coverage detected