View | Details | Raw Unified | Return to bug 760
Collapse All | Expand All

(-)a/src/click/model/ipv4-l3-click-protocol.cc (+23 lines)
 Lines 434-439    Link Here 
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)
(-)a/src/click/model/ipv4-l3-click-protocol.h (+1 lines)
 Lines 215-220    Link Here 
215
  Ipv4InterfaceAddress GetAddress (uint32_t interfaceIndex, uint32_t addressIndex) const;
215
  Ipv4InterfaceAddress GetAddress (uint32_t interfaceIndex, uint32_t addressIndex) const;
216
  uint32_t GetNAddresses (uint32_t interface) const;
216
  uint32_t GetNAddresses (uint32_t interface) const;
217
  bool RemoveAddress (uint32_t interfaceIndex, uint32_t addressIndex);
217
  bool RemoveAddress (uint32_t interfaceIndex, uint32_t addressIndex);
218
  bool RemoveAddress (uint32_t interfaceIndex, Ipv4Address address);
218
  Ipv4Address SelectSourceAddress (Ptr<const NetDevice> device,
219
  Ipv4Address SelectSourceAddress (Ptr<const NetDevice> device,
219
                                   Ipv4Address dst, Ipv4InterfaceAddress::InterfaceAddressScope_e scope);
220
                                   Ipv4Address dst, Ipv4InterfaceAddress::InterfaceAddressScope_e scope);
220
221

Return to bug 760