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

Method InterfaceIDs

pkg/sentry/socket/netstack/stack.go:143–147  ·  view source on GitHub ↗

InterfaceIDs implements inet.Stack.InterfaceIDs.

()

Source from the content-addressed store, hash-verified

141
142// InterfaceIDs implements inet.Stack.InterfaceIDs.
143func (s *Stack) InterfaceIDs() []int32 {
144 // Since gVisor allocates NIC IDs monotonically (like Linux ifindex),
145 // sorting by ID is equivalent to registration order.
146 return slices.Sorted(maps.Keys(s.Interfaces()))
147}
148
149// RemoveInterface implements inet.Stack.RemoveInterface.
150func (s *Stack) RemoveInterface(ctx context.Context, idx int32) error {

Callers

nothing calls this directly

Calls 2

InterfacesMethod · 0.95
KeysMethod · 0.80

Tested by

no test coverage detected