|
|
| 434 |
return false; |
434 |
return false; |
| 435 |
} |
435 |
} |
| 436 |
|
436 |
|
|
|
437 |
bool |
| 438 |
Ipv4L3ClickProtocol::RemoveAddress (uint32_t i, Ipv4Address address) |
| 439 |
{ |
| 440 |
NS_LOG_FUNCTION (this << i << address); |
| 441 |
|
| 442 |
if (address == Ipv4Address::GetLoopback()) |
| 443 |
{ |
| 444 |
NS_LOG_WARN ("Cannot remove loopback address."); |
| 445 |
return false; |
| 446 |
} |
| 447 |
Ptr<Ipv4Interface> interface = GetInterface (i); |
| 448 |
Ipv4InterfaceAddress ifAddr = interface->RemoveAddress (address); |
| 449 |
if (ifAddr != Ipv4InterfaceAddress ()) |
| 450 |
{ |
| 451 |
if (m_routingProtocol != 0) |
| 452 |
{ |
| 453 |
m_routingProtocol->NotifyRemoveAddress (i, ifAddr); |
| 454 |
} |
| 455 |
return true; |
| 456 |
} |
| 457 |
return false; |
| 458 |
} |
| 459 |
|
| 437 |
Ipv4Address |
460 |
Ipv4Address |
| 438 |
Ipv4L3ClickProtocol::SelectSourceAddress (Ptr<const NetDevice> device, |
461 |
Ipv4L3ClickProtocol::SelectSourceAddress (Ptr<const NetDevice> device, |
| 439 |
Ipv4Address dst, Ipv4InterfaceAddress::InterfaceAddressScope_e scope) |
462 |
Ipv4Address dst, Ipv4InterfaceAddress::InterfaceAddressScope_e scope) |