src/devices/wifi/mac-stations.cc
changeset 1908 af48a02fe9a2
parent 1906 c0901f40bd7e
child 1911 e24ae66c6918
--- a/src/devices/wifi/mac-stations.cc	Mon Oct 08 14:43:29 2007 +0200
+++ b/src/devices/wifi/mac-stations.cc	Mon Oct 08 14:43:53 2007 +0200
@@ -23,7 +23,17 @@
 
 namespace ns3 {
 
+class NonUnicastMacStation : public MacStation
+{
+public:
+};
+
+} // namespace ns3
+
+namespace ns3 {
+
 MacStations::MacStations ()
+  : m_nonUnicast (0)
 {}
 
 MacStations::~MacStations ()
@@ -32,12 +42,18 @@
     {
       delete (*i).second;
     }
-  m_stations.erase (m_stations.begin (), m_stations.end ());
+  m_stations.clear ();
+  delete m_nonUnicast;
 }
 
 MacStation *
 MacStations::Lookup (Mac48Address address)
 {
+  if (address.IsBroadcast () ||
+      address.IsMulticast ())
+    {
+      return m_nonUnicast;
+    }
   for (StationsI i = m_stations.begin (); i != m_stations.end (); i++) 
     {
       if ((*i).first == address)
@@ -50,6 +66,12 @@
   return station;
 }
 
+MacStation *
+MacStations::LookupNonUnicast (void)
+{
+  return m_nonUnicast;
+}
+
 } // namespace ns3
 
 /***************************************************************