Hello,
I am new to NS3 and find myself stuck at one point.
I am trying to modify the below bit of code to make a unique ip address for a variable amount of wifi users.
Config::Set ("/NodeList/*/ApplicationList/*/$Sender/Destination",
Ipv4AddressValue ("192.168.0.1"));
I have tried to set a loop like this:
for (uint32_t i=1; i<nUsers; i++)
{
text = "192.168.0.";
text += std::to_string(i);
Config::Set ("/NodeList/*/ApplicationList/*/$Sender/Destination",
Ipv4AddressValue (text));
NS_LOG_INFO ("ip addresses "<< text << " .");
}
text appears to generate correctly but I get errors trying to set.
error: no matching function for call to ‘ns3::Ipv4AddressValue::Ipv4AddressValue(std::string&)’
210 | Ipv4AddressValue (text));
| ^
I was wondering if anybody would be able to point me in the right direction to fix this.
Kind regards,
Kevin.