semi-real multicast hardware addresses

This commit is contained in:
Craig Dowell
2007-08-24 17:38:49 -07:00
parent 217edad33c
commit 4e486b1f59
6 changed files with 64 additions and 15 deletions

View File

@@ -84,9 +84,18 @@ ArpIpv4Interface::SendTo (Packet p, Ipv4Address dest)
else if (dest.IsMulticast ())
{
NS_DEBUG ("ArpIpv4Interface::SendTo (): IsMulticast");
// XXX BUGBUG
// Need real multicast addresses
hardwareDestination = GetDevice ()->GetBroadcast ();
NS_ASSERT_MSG(GetDevice ()->IsMulticast (),
"ArpIpv4Interface::SendTo (): Sending multicast packet over "
"non-multicast device");
// XXX
//
// An IP host group address is mapped to an Ethernet multicast address
// by placing the low-order 23-bits of the IP address into the low-order
// 23 bits of the Ethernet multicast address 01-00-5E-00-00-00 (hex).
//
// Currently no easy way to or bit from Ipv4Address into Address
//
hardwareDestination = GetDevice ()->GetMulticast ();
found = true;
}
else

View File

@@ -288,12 +288,13 @@ Ipv4L3Protocol::Lookup (
// want to force users to construct a route in order to get packets out of a
// node, so there will have been no route found and it is left to us to send
// the packet. What we'll do is to send the multicast out all of the
// interfaces on this node.
// interfaces on this node. Note that we start with interface 1 since we
// don't particularly want to send the packet out the loopback.
//
NS_DEBUG ("Ipv4StaticRouting::Lookup (): "
"Local source. Flooding multicast packet");
for (uint32_t i = 0; i < GetNInterfaces (); ++i)
for (uint32_t i = 1; i < GetNInterfaces (); ++i)
{
Packet p = packet;
Ipv4Header h = ipHeader;