RemoveAddress removes an existing network-layer address from the specified NIC.
(id tcpip.NICID, addr tcpip.Address)
| 1325 | // RemoveAddress removes an existing network-layer address from the specified |
| 1326 | // NIC. |
| 1327 | func (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. |