Skip to content

Allow AnnonatedTopologyReader::AssignIpv4Addresses() have custom mask #115

@RobinHood3082

Description

@RobinHood3082

The only current implementation is this:

void
AnnotatedTopologyReader::AssignIpv4Addresses(Ipv4Address base)
{
  Ipv4AddressHelper address(base, Ipv4Mask("/24"));

  BOOST_FOREACH (const Link& link, m_linksList) {
    address.Assign(NetDeviceContainer(link.GetFromNetDevice(), link.GetToNetDevice()));

    base = Ipv4Address(base.Get() + 256);
    address.SetBase(base, Ipv4Mask("/24"));
  }
}
  • Since mask is set to /24, it only allows upto 256 Ipv4Address (es)
  • Overloading this function might give more flexibility
  • Allow setting custom Ipv4mask

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions