Apply Patch to address bug 294 -- due to vincent

This commit is contained in:
Craig Dowell
2008-11-05 14:33:20 -08:00
parent ee5df1fda8
commit 3aa50e6af9
12 changed files with 13 additions and 80 deletions

View File

@@ -141,31 +141,6 @@ public:
*/
virtual bool IsMulticast (void) const = 0;
/**
* \brief Return the MAC multicast base address used when mapping multicast
* groups to MAC multicast addresses.
*
* Typically when one constructs a multicast MAC addresses, some bits from
* the IP multicast group are copied into a corresponding MAC multicast
* group. In EUI-48, for example, the low order 23 bits of the multicast
* group are copied to the MAC multicast group base address.
*
* This method allows access to the underlying MAC multicast group base
* address. It is expected that in most cases, a net device client will
* allow the net device to perform the actual construction of the multicast
* address. Use of this method is discouraged unless you have a good reason
* to perform a custom mapping. You should prefer
* NetDevice::MakeMulticastAddress which will do the RFC-specified mapping
* for the net device in question.
*
* \return The multicast address supported by this net device.
*
* \warning Calling this method is invalid if IsMulticast returns not true.
* The method NS_ASSERTs if the device is not a multicast device.
* \see NetDevice::MakeMulticastAddress
*/
virtual Address GetMulticast (void) const = 0;
/**
* \brief Make and return a MAC multicast address using the provided
* multicast group
@@ -179,7 +154,7 @@ public:
* encapsulated in an abstract Address to avoid dependencies on the exact
* MAC address format.
*
* A default imlementation of MakeMulticastAddress is provided, but this
* A default imlementation of GetMulticast is provided, but this
* method simply NS_ASSERTS. In the case of net devices that do not support
* multicast, clients are expected to test NetDevice::IsMulticast and avoid
* attempting to map multicast packets. Subclasses of NetDevice that do
@@ -196,7 +171,7 @@ public:
* \see Address
* \see NetDevice::IsMulticast
*/
virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const = 0;
virtual Address GetMulticast (Ipv4Address multicastGroup) const = 0;
/**
* \return value of m_isPointToPoint flag

View File

@@ -148,12 +148,7 @@ SimpleNetDevice::IsMulticast (void) const
return false;
}
Address
SimpleNetDevice::GetMulticast (void) const
{
return Mac48Address::GetMulticastPrefix ();
}
Address
SimpleNetDevice::MakeMulticastAddress (Ipv4Address multicastGroup) const
SimpleNetDevice::GetMulticast (Ipv4Address multicastGroup) const
{
return Mac48Address::GetMulticast (multicastGroup);
}

View File

@@ -59,8 +59,7 @@ public:
virtual bool IsBroadcast (void) const;
virtual Address GetBroadcast (void) const;
virtual bool IsMulticast (void) const;
virtual Address GetMulticast (void) const;
virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const;
virtual Address GetMulticast (Ipv4Address multicastGroup) const;
virtual bool IsPointToPoint (void) const;
virtual bool Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
virtual bool SendFrom(Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber);