Bug 1967 - LL Multicast is not compressed in the right way in IPHC
This commit is contained in:
@@ -1003,6 +1003,8 @@ void Icmpv6L4Protocol::SendNS (Ipv6Address src, Ipv6Address dst, Ipv6Address tar
|
||||
else
|
||||
{
|
||||
NS_LOG_LOGIC ("Destination is Multicast, using DelayedSendMessage");
|
||||
std::cout << Simulator::Now ().GetSeconds () << " - " << this << " - " << m_node->GetId () << " - ";
|
||||
std::cout << src << " -> " << dst << " - " << *p << std::endl;
|
||||
Simulator::Schedule (Time (MilliSeconds (m_solicitationJitter->GetValue ())), &Icmpv6L4Protocol::DelayedSendMessage, this, p, src, dst, 255);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -944,14 +944,14 @@ SixLowPanNetDevice::CompressLowPanIphc (Ptr<Packet> packet, Address const &src,
|
||||
// The address takes the form ffXX::00XX:XXXX.
|
||||
// ffXX:0000:0000:0000:0000:0000:00XX:XXXX.
|
||||
else if ( (addressBuf[0] == multicastAddrCheckerBuf[0])
|
||||
&& (memcmp (addressBuf + 2, multicastAddrCheckerBuf + 2, 11) ) )
|
||||
&& (memcmp (addressBuf + 2, multicastAddrCheckerBuf + 2, 11) == 0) )
|
||||
{
|
||||
iphcHeader.SetDam (SixLowPanIphc::HC_COMPR_16);
|
||||
}
|
||||
// The address takes the form ffXX::00XX:XXXX:XXXX.
|
||||
// ffXX:0000:0000:0000:0000:00XX:XXXX:XXXX.
|
||||
else if ( (addressBuf[0] == multicastAddrCheckerBuf[0])
|
||||
&& (memcmp (addressBuf + 2, multicastAddrCheckerBuf + 2, 9) ) )
|
||||
&& (memcmp (addressBuf + 2, multicastAddrCheckerBuf + 2, 9) == 0) )
|
||||
{
|
||||
iphcHeader.SetDam (SixLowPanIphc::HC_COMPR_64);
|
||||
}
|
||||
|
||||
@@ -257,12 +257,17 @@ SixlowpanFragmentationTest::DoRun (void)
|
||||
{
|
||||
// Create topology
|
||||
|
||||
Packet::EnablePrinting ();
|
||||
|
||||
// Receiver Node
|
||||
Ptr<Node> serverNode = CreateObject<Node> ();
|
||||
AddInternetStack (serverNode);
|
||||
Ptr<SimpleNetDevice> serverDev;
|
||||
Ptr<BinaryErrorSixlowModel> serverDevErrorModel = CreateObject<BinaryErrorSixlowModel> ();
|
||||
{
|
||||
Ptr<Icmpv6L4Protocol> icmpv6l4 = serverNode->GetObject<Icmpv6L4Protocol> ();
|
||||
icmpv6l4->SetAttribute ("DAD", BooleanValue (false));
|
||||
|
||||
serverDev = CreateObject<SimpleNetDevice> ();
|
||||
serverDev->SetAddress (Mac48Address::ConvertFrom (Mac48Address::Allocate ()));
|
||||
serverDev->SetMtu (1500);
|
||||
@@ -282,8 +287,6 @@ SixlowpanFragmentationTest::DoRun (void)
|
||||
ipv6->AddAddress (netdev_idx, ipv6Addr);
|
||||
ipv6->SetUp (netdev_idx);
|
||||
|
||||
Ptr<Icmpv6L4Protocol> icmpv6l4 = serverNode->GetObject<Icmpv6L4Protocol> ();
|
||||
icmpv6l4->SetAttribute ("DAD", BooleanValue (false));
|
||||
}
|
||||
StartServer (serverNode);
|
||||
|
||||
@@ -293,6 +296,9 @@ SixlowpanFragmentationTest::DoRun (void)
|
||||
Ptr<SimpleNetDevice> clientDev;
|
||||
Ptr<BinaryErrorSixlowModel> clientDevErrorModel = CreateObject<BinaryErrorSixlowModel> ();
|
||||
{
|
||||
Ptr<Icmpv6L4Protocol> icmpv6l4 = clientNode->GetObject<Icmpv6L4Protocol> ();
|
||||
icmpv6l4->SetAttribute ("DAD", BooleanValue (false));
|
||||
|
||||
clientDev = CreateObject<SimpleNetDevice> ();
|
||||
clientDev->SetAddress (Mac48Address::ConvertFrom (Mac48Address::Allocate ()));
|
||||
clientDev->SetMtu (150);
|
||||
@@ -302,7 +308,7 @@ SixlowpanFragmentationTest::DoRun (void)
|
||||
|
||||
Ptr<SixLowPanNetDevice> clientSix = CreateObject<SixLowPanNetDevice> ();
|
||||
clientSix->SetAttribute ("ForceEtherType", BooleanValue (true) );
|
||||
serverNode->AddDevice (clientSix);
|
||||
clientNode->AddDevice (clientSix);
|
||||
clientSix->SetNetDevice (clientDev);
|
||||
|
||||
Ptr<Ipv6> ipv6 = clientNode->GetObject<Ipv6> ();
|
||||
@@ -311,9 +317,6 @@ SixlowpanFragmentationTest::DoRun (void)
|
||||
Ipv6InterfaceAddress ipv6Addr = Ipv6InterfaceAddress (Ipv6Address ("2001:0100::2"), Ipv6Prefix (64));
|
||||
ipv6->AddAddress (netdev_idx, ipv6Addr);
|
||||
ipv6->SetUp (netdev_idx);
|
||||
|
||||
Ptr<Icmpv6L4Protocol> icmpv6l4 = clientNode->GetObject<Icmpv6L4Protocol> ();
|
||||
icmpv6l4->SetAttribute ("DAD", BooleanValue (false));
|
||||
}
|
||||
StartClient (clientNode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user