View | Details | Raw Unified | Return to bug 294
Collapse All | Expand All

(-)a/src/devices/bridge/bridge-net-device.cc (-1 / +1 lines)
 Lines 299-305    Link Here 
299
299
300
300
301
Address
301
Address
302
BridgeNetDevice::MakeMulticastAddress (Ipv4Address multicastGroup) const
302
BridgeNetDevice::GetMulticast (Ipv4Address multicastGroup) const
303
{
303
{
304
 NS_LOG_FUNCTION (this << multicastGroup);
304
 NS_LOG_FUNCTION (this << multicastGroup);
305
 Mac48Address multicast = Mac48Address::GetMulticast (multicastGroup);
305
 Mac48Address multicast = Mac48Address::GetMulticast (multicastGroup);
(-)a/src/devices/bridge/bridge-net-device.h (-1 / +1 lines)
 Lines 97-103    Link Here 
97
  virtual Address GetBroadcast (void) const;
97
  virtual Address GetBroadcast (void) const;
98
  virtual bool IsMulticast (void) const;
98
  virtual bool IsMulticast (void) const;
99
  virtual Address GetMulticast (void) const;
99
  virtual Address GetMulticast (void) const;
100
  virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const;
100
  virtual Address GetMulticast (Ipv4Address multicastGroup) const;
101
  virtual bool IsPointToPoint (void) const;
101
  virtual bool IsPointToPoint (void) const;
102
  virtual bool Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
102
  virtual bool Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
103
  virtual bool SendFrom (Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber);
103
  virtual bool SendFrom (Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber);
(-)a/src/devices/csma/csma-net-device.cc (-1 / +1 lines)
 Lines 803-809    Link Here 
803
}
803
}
804
804
805
  Address 
805
  Address 
806
CsmaNetDevice::MakeMulticastAddress (Ipv4Address multicastGroup) const
806
CsmaNetDevice::GetMulticast (Ipv4Address multicastGroup) const
807
{
807
{
808
  NS_LOG_FUNCTION (multicastGroup);
808
  NS_LOG_FUNCTION (multicastGroup);
809
809
(-)a/src/devices/csma/csma-net-device.h (-1 / +1 lines)
 Lines 343-349    Link Here 
343
   * \see Mac48Address
343
   * \see Mac48Address
344
   * \see Address
344
   * \see Address
345
   */
345
   */
346
  virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const;
346
  virtual Address GetMulticast (Ipv4Address multicastGroup) const;
347
347
348
  /**
348
  /**
349
   * Is this a point to point link?
349
   * Is this a point to point link?
(-)a/src/devices/point-to-point/point-to-point-net-device.cc (-1 / +1 lines)
 Lines 385-391    Link Here 
385
}
385
}
386
386
387
  Address 
387
  Address 
388
PointToPointNetDevice::MakeMulticastAddress (Ipv4Address multicastGroup) const
388
PointToPointNetDevice::GetMulticast (Ipv4Address multicastGroup) const
389
{
389
{
390
  return Mac48Address ("01:00:5e:00:00:00");
390
  return Mac48Address ("01:00:5e:00:00:00");
391
}
391
}
(-)a/src/devices/point-to-point/point-to-point-net-device.h (-1 / +1 lines)
 Lines 250-256    Link Here 
250
250
251
  virtual bool IsMulticast (void) const;
251
  virtual bool IsMulticast (void) const;
252
  virtual Address GetMulticast (void) const;
252
  virtual Address GetMulticast (void) const;
253
  virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const;
253
  virtual Address GetMulticast (Ipv4Address multicastGroup) const;
254
254
255
  virtual bool IsPointToPoint (void) const;
255
  virtual bool IsPointToPoint (void) const;
256
256
(-)a/src/devices/wifi/wifi-net-device.cc (-1 / +1 lines)
 Lines 258-264    Link Here 
258
  return Mac48Address::GetMulticastPrefix ();
258
  return Mac48Address::GetMulticastPrefix ();
259
}
259
}
260
Address 
260
Address 
261
WifiNetDevice::MakeMulticastAddress (Ipv4Address multicastGroup) const
261
WifiNetDevice::GetMulticast (Ipv4Address multicastGroup) const
262
{
262
{
263
  return Mac48Address::GetMulticast (multicastGroup);
263
  return Mac48Address::GetMulticast (multicastGroup);
264
}
264
}
(-)a/src/devices/wifi/wifi-net-device.h (-1 / +1 lines)
 Lines 93-99    Link Here 
93
  virtual Address GetBroadcast (void) const;
93
  virtual Address GetBroadcast (void) const;
94
  virtual bool IsMulticast (void) const;
94
  virtual bool IsMulticast (void) const;
95
  virtual Address GetMulticast (void) const;
95
  virtual Address GetMulticast (void) const;
96
  virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const;
96
  virtual Address GetMulticast (Ipv4Address multicastGroup) const;
97
  virtual bool IsPointToPoint (void) const;
97
  virtual bool IsPointToPoint (void) const;
98
  virtual bool Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
98
  virtual bool Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
99
  virtual Ptr<Node> GetNode (void) const;
99
  virtual Ptr<Node> GetNode (void) const;
(-)a/src/internet-stack/arp-ipv4-interface.cc (-1 / +1 lines)
 Lines 139-145    Link Here 
139
            "ArpIpv4Interface::SendTo (): Sending multicast packet over "
139
            "ArpIpv4Interface::SendTo (): Sending multicast packet over "
140
            "non-multicast device");
140
            "non-multicast device");
141
141
142
          hardwareDestination = GetDevice ()->MakeMulticastAddress(dest);
142
          hardwareDestination = GetDevice ()->GetMulticast(dest);
143
          found = true;
143
          found = true;
144
        }
144
        }
145
      else
145
      else
(-)a/src/node/net-device.h (-4 / +4 lines)
 Lines 155-168    Link Here 
155
   * allow the net device to perform the actual construction of the multicast
155
   * allow the net device to perform the actual construction of the multicast
156
   * address.  Use of this method is discouraged unless you have a good reason
156
   * address.  Use of this method is discouraged unless you have a good reason
157
   * to perform a custom mapping.  You should prefer 
157
   * to perform a custom mapping.  You should prefer 
158
   * NetDevice::MakeMulticastAddress which will do the RFC-specified mapping
158
   * NetDevice::GetMulticast which will do the RFC-specified mapping
159
   * for the net device in question.
159
   * for the net device in question.
160
   *
160
   *
161
   * \return The multicast address supported by this net device.
161
   * \return The multicast address supported by this net device.
162
   *
162
   *
163
   * \warning Calling this method is invalid if IsMulticast returns not true.
163
   * \warning Calling this method is invalid if IsMulticast returns not true.
164
   * The method NS_ASSERTs if the device is not a multicast device.
164
   * The method NS_ASSERTs if the device is not a multicast device.
165
   * \see NetDevice::MakeMulticastAddress
165
   * \see NetDevice::GetMulticast
166
   */
166
   */
167
  virtual Address GetMulticast (void) const = 0;
167
  virtual Address GetMulticast (void) const = 0;
168
  
168
  
 Lines 179-185    Link Here 
179
   * encapsulated in an abstract Address to avoid dependencies on the exact
179
   * encapsulated in an abstract Address to avoid dependencies on the exact
180
   * MAC address format.
180
   * MAC address format.
181
   *
181
   *
182
   * A default imlementation of MakeMulticastAddress is provided, but this
182
   * A default imlementation of GetMulticast is provided, but this
183
   * method simply NS_ASSERTS.  In the case of net devices that do not support
183
   * method simply NS_ASSERTS.  In the case of net devices that do not support
184
   * multicast, clients are expected to test NetDevice::IsMulticast and avoid
184
   * multicast, clients are expected to test NetDevice::IsMulticast and avoid
185
   * attempting to map multicast packets.  Subclasses of NetDevice that do
185
   * attempting to map multicast packets.  Subclasses of NetDevice that do
 Lines 196-202    Link Here 
196
   * \see Address
196
   * \see Address
197
   * \see NetDevice::IsMulticast
197
   * \see NetDevice::IsMulticast
198
   */
198
   */
199
  virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const = 0;
199
  virtual Address GetMulticast (Ipv4Address multicastGroup) const = 0;
200
  
200
  
201
  /**
201
  /**
202
   * \return value of m_isPointToPoint flag
202
   * \return value of m_isPointToPoint flag
(-)a/src/node/simple-net-device.cc (-1 / +1 lines)
 Lines 153-159    Link Here 
153
  return Mac48Address::GetMulticastPrefix ();
153
  return Mac48Address::GetMulticastPrefix ();
154
}
154
}
155
Address 
155
Address 
156
SimpleNetDevice::MakeMulticastAddress (Ipv4Address multicastGroup) const
156
SimpleNetDevice::GetMulticast (Ipv4Address multicastGroup) const
157
{
157
{
158
  return Mac48Address::GetMulticast (multicastGroup);
158
  return Mac48Address::GetMulticast (multicastGroup);
159
}
159
}
(-)a/src/node/simple-net-device.h (-1 / +1 lines)
 Lines 60-66    Link Here 
60
  virtual Address GetBroadcast (void) const;
60
  virtual Address GetBroadcast (void) const;
61
  virtual bool IsMulticast (void) const;
61
  virtual bool IsMulticast (void) const;
62
  virtual Address GetMulticast (void) const;
62
  virtual Address GetMulticast (void) const;
63
  virtual Address MakeMulticastAddress (Ipv4Address multicastGroup) const;
63
  virtual Address GetMulticast (Ipv4Address multicastGroup) const;
64
  virtual bool IsPointToPoint (void) const;
64
  virtual bool IsPointToPoint (void) const;
65
  virtual bool Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
65
  virtual bool Send(Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
66
  virtual bool SendFrom(Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber);
66
  virtual bool SendFrom(Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber);

Return to bug 294