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

(-)a/src/devices/emu/emu-net-device.cc (-4 / +13 lines)
 Lines 173-179   EmuNetDevice::EmuNetDevice () Link Here 
173
  m_sock (-1),
173
  m_sock (-1),
174
  m_readThread (0),
174
  m_readThread (0),
175
  m_ifIndex (std::numeric_limits<uint32_t>::max ()),  // absurdly large value
175
  m_ifIndex (std::numeric_limits<uint32_t>::max ()),  // absurdly large value
176
  m_sll_ifindex (-1)
176
  m_sll_ifindex (-1),
177
  m_isBroadcast (false),
178
  m_isMulticast (false)
177
{
179
{
178
  NS_LOG_FUNCTION (this);
180
  NS_LOG_FUNCTION (this);
179
  Start (m_tStart);
181
  Start (m_tStart);
 Lines 293-299   EmuNetDevice::StartDevice (void) Link Here 
293
    {
295
    {
294
      NS_FATAL_ERROR ("EmuNetDevice::StartDevice(): " << m_deviceName << " is not in promiscuous mode");
296
      NS_FATAL_ERROR ("EmuNetDevice::StartDevice(): " << m_deviceName << " is not in promiscuous mode");
295
    }
297
    }
296
298
  if ((ifr.ifr_flags & IFF_MULTICAST) == 1)
299
    {
300
      m_isMulticast = true;
301
    }
302
  if ((ifr.ifr_flags & IFF_BROADCAST) == 1)
303
    {
304
      m_isBroadcast = true;
305
    }
297
  //
306
  //
298
  // Now spin up a read thread to read packets.
307
  // Now spin up a read thread to read packets.
299
  //
308
  //
 Lines 918-924   bool Link Here 
918
bool 
927
bool 
919
EmuNetDevice::IsBroadcast (void) const
928
EmuNetDevice::IsBroadcast (void) const
920
{
929
{
921
  return true;
930
  return m_isBroadcast;
922
}
931
}
923
932
924
Address
933
Address
 Lines 930-936   bool Link Here 
930
bool 
939
bool 
931
EmuNetDevice::IsMulticast (void) const
940
EmuNetDevice::IsMulticast (void) const
932
{
941
{
933
  return false;
942
  return m_isMulticast;
934
}
943
}
935
944
936
  Address 
945
  Address 
(-)a/src/devices/emu/emu-net-device.h (+12 lines)
 Lines 453-458   private: Link Here 
453
  bool m_linkUp;
453
  bool m_linkUp;
454
454
455
  /**
455
  /**
456
   * Flag indicating whether or not the underlying net device has a valid
457
   * broadcast address set.
458
   */
459
  bool m_isBroadcast;
460
461
  /**
462
   * Flag indicating whether or not the underlying net device supports
463
   * multicast.
464
   */
465
  bool m_isMulticast;
466
467
  /**
456
   * Callback to fire if the link changes state (up or down).
468
   * Callback to fire if the link changes state (up or down).
457
   */
469
   */
458
  Callback<void> m_linkChangeCallback;
470
  Callback<void> m_linkChangeCallback;

Return to bug 571