InterfaceIDs implements inet.Stack.InterfaceIDs.
()
| 141 | |
| 142 | // InterfaceIDs implements inet.Stack.InterfaceIDs. |
| 143 | func (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. |
| 150 | func (s *Stack) RemoveInterface(ctx context.Context, idx int32) error { |
nothing calls this directly
no test coverage detected