Addendum to bug 1522

This commit is contained in:
Tommaso Pecorella
2013-08-16 02:21:51 +02:00
parent 61903c64b2
commit 31aac3aea7
4 changed files with 64 additions and 2 deletions

View File

@@ -73,6 +73,9 @@ us a note on ns-developers mailing list.</p>
examples/ipv6/fragmentation-ipv6-two-MTU.cc for an example.</li>
<li>Radvd application have a new Helper. See the updated
examples/ipv6/radvd.cc for an example.</li>
<li>InternetStackHelper have two new functions:<tt>SetIpv4ArpJitter (bool enable)</tt>
and <tt>SetIpv6NsRsJitter (bool enable)</tt> to enable/disable
the random jitter on IPv4's ARP and IPv6's NS/RS.</li>
</ul>
<h2>Changes to existing API:</h2>
@@ -131,6 +134,13 @@ or
cmd.PrintHelp (std::cerr);
</pre>
</li>
<li>IPv4's ARP and IPv6's NS/RS are now issued with a random delay.
The delay is, by default, between 0 and 10ms.
This behaviour can be modify by using ArpL3Protocol's
<tt>RequestJitter</tt> and Icmpv6L4Protocol's <tt>SolicitationJitter</tt>
attributes or by using the new InternetStackHelper functions.
</li>
</ul>
<hr>

View File

@@ -50,8 +50,10 @@ New user-visible features
Bugs fixed
----------
- Bug 760 - IP address removal can be painful
- Bug 1190 - Suppress hello if bcast was sent within the last hello interval
- Bug 1296 - Enhancement in Ipv[4,6]RoutingHelper
- Bug 1390 - ICMPv6 Redirect are handled correctly only for /64 networks
- Bug 1522 - Hidden node scenario leads to ARP failure
- Bug 1643 - NdiscCache creation and existence checks
- Bug 1646 - ICMPv6 Redirect are sent from global address instead of link-local
- Bug 1662 - m_type not set for Ipv6OptionRouterAlertHeader
@@ -79,6 +81,7 @@ Bugs fixed
- Bug 1738 - strict aliasing compiler bug
- Bug 1742 - IPv6 HbH and Dst Extension Header size is not correctly calculated
- Bug 1752 - RadvdInterface m_defaultLifeTime is set to milliseconds instead of seconds
- Bug 1753 - Halting Issue with DistributedSimulatorImpl
- Bug 1754 - Missing GIL lock in generated callback destructor
Known issues

View File

@@ -234,7 +234,10 @@ InternetStackHelper::InternetStackHelper ()
: m_routing (0),
m_routingv6 (0),
m_ipv4Enabled (true),
m_ipv6Enabled (true)
m_ipv6Enabled (true),
m_ipv4ArpJitterEnabled (true),
m_ipv6NsRsEnabled (true)
{
Initialize ();
}
@@ -269,6 +272,8 @@ InternetStackHelper::InternetStackHelper (const InternetStackHelper &o)
m_ipv4Enabled = o.m_ipv4Enabled;
m_ipv6Enabled = o.m_ipv6Enabled;
m_tcpFactory = o.m_tcpFactory;
m_ipv4ArpJitterEnabled = o.m_ipv4ArpJitterEnabled;
m_ipv6NsRsEnabled = o.m_ipv6NsRsEnabled;
}
InternetStackHelper &
@@ -292,6 +297,8 @@ InternetStackHelper::Reset (void)
m_routingv6 = 0;
m_ipv4Enabled = true;
m_ipv6Enabled = true;
m_ipv4ArpJitterEnabled = true;
m_ipv6NsRsEnabled = true;
Initialize ();
}
@@ -320,6 +327,16 @@ void InternetStackHelper::SetIpv6StackInstall (bool enable)
m_ipv6Enabled = enable;
}
void InternetStackHelper::SetIpv4ArpJitter (bool enable)
{
m_ipv4ArpJitterEnabled = enable;
}
void InternetStackHelper::SetIpv6NsRsJitter (bool enable)
{
m_ipv6NsRsEnabled = enable;
}
int64_t
InternetStackHelper::AssignStreams (NodeContainer c, int64_t stream)
{
@@ -417,6 +434,11 @@ InternetStackHelper::Install (Ptr<Node> node) const
CreateAndAggregateObjectFromTypeId (node, "ns3::ArpL3Protocol");
CreateAndAggregateObjectFromTypeId (node, "ns3::Ipv4L3Protocol");
CreateAndAggregateObjectFromTypeId (node, "ns3::Icmpv4L4Protocol");
if (m_ipv4ArpJitterEnabled == false)
{
Ptr<ArpL3Protocol> arp = node->GetObject<ArpL3Protocol> ();
arp->SetAttribute ("RequestJitter", StringValue ("ns3::ConstantRandomVariable[Constant=0.0]"));
}
// Set routing
Ptr<Ipv4> ipv4 = node->GetObject<Ipv4> ();
Ptr<Ipv4RoutingProtocol> ipv4Routing = m_routing->Create (node);
@@ -435,6 +457,11 @@ InternetStackHelper::Install (Ptr<Node> node) const
CreateAndAggregateObjectFromTypeId (node, "ns3::Ipv6L3Protocol");
CreateAndAggregateObjectFromTypeId (node, "ns3::Icmpv6L4Protocol");
if (m_ipv6NsRsEnabled == false)
{
Ptr<Icmpv6L4Protocol> icmpv6l4 = node->GetObject<Icmpv6L4Protocol> ();
icmpv6l4->SetAttribute ("SolicitationJitter", StringValue ("ns3::ConstantRandomVariable[Constant=0.0]"));
}
// Set routing
Ptr<Ipv6> ipv6 = node->GetObject<Ipv6> ();
Ptr<Ipv6RoutingProtocol> ipv6Routing = m_routingv6->Create (node);

View File

@@ -178,7 +178,19 @@ public:
*/
void SetIpv6StackInstall (bool enable);
/**
/**
* \brief Enable/disable IPv4 ARP Jitter.
* \param enable enable state
*/
void SetIpv4ArpJitter (bool enable);
/**
* \brief Enable/disable IPv6 NS and RS Jitter.
* \param enable enable state
*/
void SetIpv6NsRsJitter (bool enable);
/**
* Assign a fixed random variable stream number to the random variables
* used by this model. Return the number of streams (possibly zero) that
* have been assigned. The Install() method should have previously been
@@ -303,6 +315,16 @@ private:
* \brief IPv6 install state (enabled/disabled) ?
*/
bool m_ipv6Enabled;
/**
* \brief IPv4 ARP Jitter state (enabled/disabled) ?
*/
bool m_ipv4ArpJitterEnabled;
/**
* \brief IPv6 IPv6 NS and RS Jitter state (enabled/disabled) ?
*/
bool m_ipv6NsRsEnabled;
};
} // namespace ns3