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

Method RemoveAddress

pkg/tcpip/stack/stack.go:1327–1336  ·  view source on GitHub ↗

RemoveAddress removes an existing network-layer address from the specified NIC.

(id tcpip.NICID, addr tcpip.Address)

Source from the content-addressed store, hash-verified

1325// RemoveAddress removes an existing network-layer address from the specified
1326// NIC.
1327func (s *Stack) RemoveAddress(id tcpip.NICID, addr tcpip.Address) tcpip.Error {
1328 s.mu.RLock()
1329 defer s.mu.RUnlock()
1330
1331 if nic, ok := s.nics[id]; ok {
1332 return nic.removeAddress(addr)
1333 }
1334
1335 return &tcpip.ErrUnknownNICID{}
1336}
1337
1338// SetAddressLifetimes sets informational preferred and valid lifetimes, and
1339// whether the address should be preferred or deprecated.

Calls 3

removeAddressMethod · 0.80
RLockMethod · 0.45
RUnlockMethod · 0.45