Apply Patch to address bug 294 -- due to vincent
authorCraig Dowell <craigdo@ee.washington.edu>
Wed, 05 Nov 2008 14:33:20 -0800
changeset 38411e7abf5fca79
parent 3840 e48410cf76e4
child 3842 545ddf9398ed
Apply Patch to address bug 294 -- due to vincent
src/devices/bridge/bridge-net-device.cc
src/devices/bridge/bridge-net-device.h
src/devices/csma/csma-net-device.cc
src/devices/csma/csma-net-device.h
src/devices/point-to-point/point-to-point-net-device.cc
src/devices/point-to-point/point-to-point-net-device.h
src/devices/wifi/wifi-net-device.cc
src/devices/wifi/wifi-net-device.h
src/internet-stack/arp-ipv4-interface.cc
src/node/net-device.h
src/node/simple-net-device.cc
src/node/simple-net-device.h
     1.1 --- a/src/devices/bridge/bridge-net-device.cc	Wed Nov 05 14:09:43 2008 -0800
     1.2 +++ b/src/devices/bridge/bridge-net-device.cc	Wed Nov 05 14:33:20 2008 -0800
     1.3 @@ -290,16 +290,8 @@
     1.4    return true;
     1.5  }
     1.6  
     1.7 -
     1.8  Address
     1.9 -BridgeNetDevice::GetMulticast (void) const
    1.10 -{
    1.11 -  return Mac48Address ("01:00:5e:00:00:00");
    1.12 -}
    1.13 -
    1.14 -
    1.15 -Address
    1.16 -BridgeNetDevice::MakeMulticastAddress (Ipv4Address multicastGroup) const
    1.17 +BridgeNetDevice::GetMulticast (Ipv4Address multicastGroup) const
    1.18  {
    1.19   NS_LOG_FUNCTION (this << multicastGroup);
    1.20   Mac48Address multicast = Mac48Address::GetMulticast (multicastGroup);
     2.1 --- a/src/devices/bridge/bridge-net-device.h	Wed Nov 05 14:09:43 2008 -0800
     2.2 +++ b/src/devices/bridge/bridge-net-device.h	Wed Nov 05 14:33:20 2008 -0800
     2.3 @@ -96,8 +96,7 @@
     2.4    virtual bool IsBroadcast (void) const;
     2.5    virtual Address GetBroadcast (void) const;
     2.6    virtual bool IsMulticast (void) const;
     2.7 -  virtual Address GetMulticast (void) const;
     2.8 -  virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const;
     2.9 +  virtual Address GetMulticast (Ipv4Address multicastGroup) const;
    2.10    virtual bool IsPointToPoint (void) const;
    2.11    virtual bool Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
    2.12    virtual bool SendFrom (Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber);
     3.1 --- a/src/devices/csma/csma-net-device.cc	Wed Nov 05 14:09:43 2008 -0800
     3.2 +++ b/src/devices/csma/csma-net-device.cc	Wed Nov 05 14:33:20 2008 -0800
     3.3 @@ -796,14 +796,7 @@
     3.4  }
     3.5  
     3.6    Address 
     3.7 -CsmaNetDevice::GetMulticast (void) const
     3.8 -{
     3.9 -  NS_LOG_FUNCTION_NOARGS ();
    3.10 -  return Mac48Address::GetMulticastPrefix ();
    3.11 -}
    3.12 -
    3.13 -  Address 
    3.14 -CsmaNetDevice::MakeMulticastAddress (Ipv4Address multicastGroup) const
    3.15 +CsmaNetDevice::GetMulticast (Ipv4Address multicastGroup) const
    3.16  {
    3.17    NS_LOG_FUNCTION (multicastGroup);
    3.18  
     4.1 --- a/src/devices/csma/csma-net-device.h	Wed Nov 05 14:09:43 2008 -0800
     4.2 +++ b/src/devices/csma/csma-net-device.h	Wed Nov 05 14:33:20 2008 -0800
     4.3 @@ -319,7 +319,6 @@
     4.4    virtual bool IsBroadcast (void) const;
     4.5    virtual Address GetBroadcast (void) const;
     4.6    virtual bool IsMulticast (void) const;
     4.7 -  virtual Address GetMulticast (void) const;
     4.8  
     4.9    /**
    4.10     * \brief Make and return a MAC multicast address using the provided
    4.11 @@ -343,7 +342,7 @@
    4.12     * \see Mac48Address
    4.13     * \see Address
    4.14     */
    4.15 -  virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const;
    4.16 +  virtual Address GetMulticast (Ipv4Address multicastGroup) const;
    4.17  
    4.18    /**
    4.19     * Is this a point to point link?
     5.1 --- a/src/devices/point-to-point/point-to-point-net-device.cc	Wed Nov 05 14:09:43 2008 -0800
     5.2 +++ b/src/devices/point-to-point/point-to-point-net-device.cc	Wed Nov 05 14:33:20 2008 -0800
     5.3 @@ -372,20 +372,8 @@
     5.4    return false;
     5.5  }
     5.6  
     5.7 -//
     5.8 -// Since we return false in the IsMulticast call, calls to other multicast
     5.9 -// related methods returns are undefined according to the base class.  So we
    5.10 -// can freely make something up, which is the base of the MAC multicast
    5.11 -// address space.
    5.12 -//
    5.13    Address 
    5.14 -PointToPointNetDevice::GetMulticast (void) const
    5.15 -{
    5.16 -  return Mac48Address ("01:00:5e:00:00:00");
    5.17 -}
    5.18 -
    5.19 -  Address 
    5.20 -PointToPointNetDevice::MakeMulticastAddress (Ipv4Address multicastGroup) const
    5.21 +PointToPointNetDevice::GetMulticast (Ipv4Address multicastGroup) const
    5.22  {
    5.23    return Mac48Address ("01:00:5e:00:00:00");
    5.24  }
     6.1 --- a/src/devices/point-to-point/point-to-point-net-device.h	Wed Nov 05 14:09:43 2008 -0800
     6.2 +++ b/src/devices/point-to-point/point-to-point-net-device.h	Wed Nov 05 14:33:20 2008 -0800
     6.3 @@ -249,8 +249,7 @@
     6.4    virtual Address GetBroadcast (void) const;
     6.5  
     6.6    virtual bool IsMulticast (void) const;
     6.7 -  virtual Address GetMulticast (void) const;
     6.8 -  virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const;
     6.9 +  virtual Address GetMulticast (Ipv4Address multicastGroup) const;
    6.10  
    6.11    virtual bool IsPointToPoint (void) const;
    6.12  
     7.1 --- a/src/devices/wifi/wifi-net-device.cc	Wed Nov 05 14:09:43 2008 -0800
     7.2 +++ b/src/devices/wifi/wifi-net-device.cc	Wed Nov 05 14:33:20 2008 -0800
     7.3 @@ -253,12 +253,7 @@
     7.4    return false;
     7.5  }
     7.6  Address 
     7.7 -WifiNetDevice::GetMulticast (void) const
     7.8 -{
     7.9 -  return Mac48Address::GetMulticastPrefix ();
    7.10 -}
    7.11 -Address 
    7.12 -WifiNetDevice::MakeMulticastAddress (Ipv4Address multicastGroup) const
    7.13 +WifiNetDevice::GetMulticast (Ipv4Address multicastGroup) const
    7.14  {
    7.15    return Mac48Address::GetMulticast (multicastGroup);
    7.16  }
     8.1 --- a/src/devices/wifi/wifi-net-device.h	Wed Nov 05 14:09:43 2008 -0800
     8.2 +++ b/src/devices/wifi/wifi-net-device.h	Wed Nov 05 14:33:20 2008 -0800
     8.3 @@ -92,8 +92,7 @@
     8.4    virtual bool IsBroadcast (void) const;
     8.5    virtual Address GetBroadcast (void) const;
     8.6    virtual bool IsMulticast (void) const;
     8.7 -  virtual Address GetMulticast (void) const;
     8.8 -  virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const;
     8.9 +  virtual Address GetMulticast (Ipv4Address multicastGroup) const;
    8.10    virtual bool IsPointToPoint (void) const;
    8.11    virtual bool Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
    8.12    virtual Ptr<Node> GetNode (void) const;
     9.1 --- a/src/internet-stack/arp-ipv4-interface.cc	Wed Nov 05 14:09:43 2008 -0800
     9.2 +++ b/src/internet-stack/arp-ipv4-interface.cc	Wed Nov 05 14:33:20 2008 -0800
     9.3 @@ -139,7 +139,7 @@
     9.4              "ArpIpv4Interface::SendTo (): Sending multicast packet over "
     9.5              "non-multicast device");
     9.6  
     9.7 -          hardwareDestination = GetDevice ()->MakeMulticastAddress(dest);
     9.8 +          hardwareDestination = GetDevice ()->GetMulticast(dest);
     9.9            found = true;
    9.10          }
    9.11        else
    10.1 --- a/src/node/net-device.h	Wed Nov 05 14:09:43 2008 -0800
    10.2 +++ b/src/node/net-device.h	Wed Nov 05 14:33:20 2008 -0800
    10.3 @@ -142,31 +142,6 @@
    10.4    virtual bool IsMulticast (void) const = 0;
    10.5  
    10.6    /**
    10.7 -   * \brief Return the MAC multicast base address used when mapping multicast
    10.8 -   * groups to MAC multicast addresses.
    10.9 -   *
   10.10 -   * Typically when one constructs a multicast MAC addresses, some bits from
   10.11 -   * the IP multicast group are copied into a corresponding MAC multicast 
   10.12 -   * group.  In EUI-48, for example, the low order 23 bits of the multicast
   10.13 -   * group are copied to the MAC multicast group base address.
   10.14 -   *
   10.15 -   * This method allows access to the underlying MAC multicast group base 
   10.16 -   * address.  It is expected that in most cases, a net device client will
   10.17 -   * allow the net device to perform the actual construction of the multicast
   10.18 -   * address.  Use of this method is discouraged unless you have a good reason
   10.19 -   * to perform a custom mapping.  You should prefer 
   10.20 -   * NetDevice::MakeMulticastAddress which will do the RFC-specified mapping
   10.21 -   * for the net device in question.
   10.22 -   *
   10.23 -   * \return The multicast address supported by this net device.
   10.24 -   *
   10.25 -   * \warning Calling this method is invalid if IsMulticast returns not true.
   10.26 -   * The method NS_ASSERTs if the device is not a multicast device.
   10.27 -   * \see NetDevice::MakeMulticastAddress
   10.28 -   */
   10.29 -  virtual Address GetMulticast (void) const = 0;
   10.30 -  
   10.31 -  /**
   10.32     * \brief Make and return a MAC multicast address using the provided
   10.33     *        multicast group
   10.34     *
   10.35 @@ -179,7 +154,7 @@
   10.36     * encapsulated in an abstract Address to avoid dependencies on the exact
   10.37     * MAC address format.
   10.38     *
   10.39 -   * A default imlementation of MakeMulticastAddress is provided, but this
   10.40 +   * A default imlementation of GetMulticast is provided, but this
   10.41     * method simply NS_ASSERTS.  In the case of net devices that do not support
   10.42     * multicast, clients are expected to test NetDevice::IsMulticast and avoid
   10.43     * attempting to map multicast packets.  Subclasses of NetDevice that do
   10.44 @@ -196,7 +171,7 @@
   10.45     * \see Address
   10.46     * \see NetDevice::IsMulticast
   10.47     */
   10.48 -  virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const = 0;
   10.49 +  virtual Address GetMulticast (Ipv4Address multicastGroup) const = 0;
   10.50    
   10.51    /**
   10.52     * \return value of m_isPointToPoint flag
    11.1 --- a/src/node/simple-net-device.cc	Wed Nov 05 14:09:43 2008 -0800
    11.2 +++ b/src/node/simple-net-device.cc	Wed Nov 05 14:33:20 2008 -0800
    11.3 @@ -148,12 +148,7 @@
    11.4    return false;
    11.5  }
    11.6  Address 
    11.7 -SimpleNetDevice::GetMulticast (void) const
    11.8 -{
    11.9 -  return Mac48Address::GetMulticastPrefix ();
   11.10 -}
   11.11 -Address 
   11.12 -SimpleNetDevice::MakeMulticastAddress (Ipv4Address multicastGroup) const
   11.13 +SimpleNetDevice::GetMulticast (Ipv4Address multicastGroup) const
   11.14  {
   11.15    return Mac48Address::GetMulticast (multicastGroup);
   11.16  }
    12.1 --- a/src/node/simple-net-device.h	Wed Nov 05 14:09:43 2008 -0800
    12.2 +++ b/src/node/simple-net-device.h	Wed Nov 05 14:33:20 2008 -0800
    12.3 @@ -59,8 +59,7 @@
    12.4    virtual bool IsBroadcast (void) const;
    12.5    virtual Address GetBroadcast (void) const;
    12.6    virtual bool IsMulticast (void) const;
    12.7 -  virtual Address GetMulticast (void) const;
    12.8 -  virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const;
    12.9 +  virtual Address GetMulticast (Ipv4Address multicastGroup) const;
   12.10    virtual bool IsPointToPoint (void) const;
   12.11    virtual bool Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
   12.12    virtual bool SendFrom(Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber);