MCPcopy Create free account
hub / github.com/google/gvisor / CreateNIC

Method CreateNIC

pkg/tcpip/stack/stack.go:980–982  ·  view source on GitHub ↗

CreateNIC creates a NIC with the provided id and LinkEndpoint and calls LinkEndpoint.Attach to bind ep with a NetworkDispatcher.

(id tcpip.NICID, ep LinkEndpoint)

Source from the content-addressed store, hash-verified

978// CreateNIC creates a NIC with the provided id and LinkEndpoint and calls
979// LinkEndpoint.Attach to bind ep with a NetworkDispatcher.
980func (s *Stack) CreateNIC(id tcpip.NICID, ep LinkEndpoint) tcpip.Error {
981 return s.CreateNICWithOptions(id, ep, NICOptions{})
982}
983
984// GetLinkEndpointByName gets the link endpoint specified by name.
985func (s *Stack) GetLinkEndpointByName(name string) LinkEndpoint {

Callers 15

TestWritePacketFunction · 0.80
TestVethOverflowsFunction · 0.80
TestDestroyDevicesFunction · 0.80
TestStateUpdatesFunction · 0.80
TestSndBufFunction · 0.80
TestMulticastLoopFunction · 0.80
TestIPv6PacketInfoFunction · 0.80
TestBindNICIDFunction · 0.80

Calls 1

CreateNICWithOptionsMethod · 0.95

Tested by 15

TestWritePacketFunction · 0.64
TestVethOverflowsFunction · 0.64
TestDestroyDevicesFunction · 0.64
TestStateUpdatesFunction · 0.64
TestSndBufFunction · 0.64
TestMulticastLoopFunction · 0.64
TestIPv6PacketInfoFunction · 0.64
TestBindNICIDFunction · 0.64