Fixed coding style
authorKirill Andreev <andreev@iitp.ru>
Wed, 22 Jul 2009 15:56:55 +0400
changeset 5130 b5062e8e0da1
parent 5129 5688b8da4526
child 5131 0fc1bad6a4ab
Fixed coding style
src/devices/mesh/dot11s/airtime-metric.h
src/devices/mesh/dot11s/hwmp-protocol-mac.cc
src/devices/mesh/dot11s/hwmp-protocol-mac.h
src/devices/mesh/dot11s/hwmp-protocol.cc
src/devices/mesh/dot11s/hwmp-protocol.h
src/devices/mesh/dot11s/hwmp-rtable.cc
src/devices/mesh/dot11s/hwmp-rtable.h
src/devices/mesh/dot11s/ie-dot11s-beacon-timing.cc
src/devices/mesh/dot11s/ie-dot11s-metric-report.cc
src/devices/mesh/dot11s/ie-dot11s-peer-management.h
src/devices/mesh/dot11s/ie-dot11s-perr.cc
src/devices/mesh/dot11s/ie-dot11s-preq.cc
src/devices/mesh/dot11s/ie-dot11s-preq.h
src/devices/mesh/dot11s/peer-link-frame.h
src/devices/mesh/dot11s/peer-link.h
src/devices/mesh/dot11s/peer-management-protocol-mac.h
src/devices/mesh/dot11s/peer-management-protocol.h
src/devices/mesh/flame/flame-rtable.h
src/devices/mesh/mesh-point-device.h
src/devices/mesh/mesh-wifi-interface-mac.h
src/devices/mesh/wifi-information-element.h
--- a/src/devices/mesh/dot11s/airtime-metric.h	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/dot11s/airtime-metric.h	Wed Jul 22 15:56:55 2009 +0400
@@ -45,7 +45,7 @@
 {
   public:
     static TypeId GetTypeId ();
-    uint32_t CalculateMetric(Mac48Address peerAddress, Ptr<MeshWifiInterfaceMac> mac);
+    uint32_t CalculateMetric (Mac48Address peerAddress, Ptr<MeshWifiInterfaceMac> mac);
   private:
   //\brief Overhead expressed in nanoseconds:DIFS+ 2* SIFS + 2*PREAMBLE + 2* ACK
   uint32_t m_overheadNanosec;
--- a/src/devices/mesh/dot11s/hwmp-protocol-mac.cc	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/dot11s/hwmp-protocol-mac.cc	Wed Jul 22 15:56:55 2009 +0400
@@ -144,7 +144,9 @@
       std::vector<IePerr::FailedDestination> destinations = perr.GetAddressUnitVector ();
       for (std::vector<IePerr::FailedDestination>::const_iterator i = destinations.begin (); i
           != destinations.end (); i++)
-        failedDestinations.push_back (*i);
+        {
+          failedDestinations.push_back (*i);
+        }
     }
   if (failedDestinations.size () > 0)
     {
--- a/src/devices/mesh/dot11s/hwmp-protocol-mac.h	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/dot11s/hwmp-protocol-mac.h	Wed Jul 22 15:56:55 2009 +0400
@@ -68,7 +68,7 @@
   void SendPreq (std::vector<IePreq> preq);
   void SendPrep (IePrep prep, Mac48Address receiver);
   //Forward a peth error
-  void ForwardPerr(std::vector<IePerr::FailedDestination> destinations, std::vector<Mac48Address> receivers);
+  void ForwardPerr (std::vector<IePerr::FailedDestination> destinations, std::vector<Mac48Address> receivers);
   // initiate my own path error
   void InitiatePerr (std::vector<IePerr::FailedDestination> destinations, std::vector<Mac48Address> receivers);
   /** \brief Request a destination. If can not send preq immediately -
--- a/src/devices/mesh/dot11s/hwmp-protocol.cc	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/dot11s/hwmp-protocol.cc	Wed Jul 22 15:56:55 2009 +0400
@@ -186,7 +186,7 @@
   m_rfFlag (false)
 {
 
-  if(m_isRoot)
+  if (m_isRoot)
     {
       SetRoot ();
     }
@@ -199,7 +199,7 @@
 void
 HwmpProtocol::DoDispose ()
 {
-  for (std::map<Mac48Address, EventId>::iterator i = m_preqTimeouts.begin (); i != m_preqTimeouts.end(); i ++)
+  for (std::map<Mac48Address, EventId>::iterator i = m_preqTimeouts.begin (); i != m_preqTimeouts.end (); i ++)
     {
       i->second.Cancel ();
     }
@@ -225,9 +225,9 @@
   Ptr <Packet> packet = constPacket->Copy ();
   HwmpTag tag;
   if (sourceIface == GetMeshPoint ()->GetIfIndex())
-    // packet from level 3
     {
-      if (packet->PeekPacketTag(tag))
+      // packet from level 3
+      if (packet->PeekPacketTag (tag))
         {
           NS_FATAL_ERROR ("HWMP tag has come with a packet from upper layer. This must not occur...");
         }
@@ -240,7 +240,7 @@
     }
   else
     {
-      if (!packet->RemovePacketTag(tag))
+      if (!packet->RemovePacketTag (tag))
         {
           NS_FATAL_ERROR ("HWMP tag is supposed to be here at this point.");
         }
@@ -260,7 +260,7 @@
       for (HwmpProtocolMacMap::const_iterator plugin = m_interfaces.begin (); plugin != m_interfaces.end (); plugin ++)
         {
           bool should_send = true;
-          for (std::vector<uint16_t>::const_iterator chan = channels.begin(); chan != channels.end(); chan ++)
+          for (std::vector<uint16_t>::const_iterator chan = channels.begin (); chan != channels.end (); chan ++)
             {
               if ((*chan) == plugin->second->GetChannelId ())
                 {
@@ -271,9 +271,9 @@
             {
               continue;
             }
-          channels.push_back(plugin->second->GetChannelId ());
+          channels.push_back (plugin->second->GetChannelId ());
           std::vector<Mac48Address> receivers = GetBroadcastReceivers (plugin->first);
-          for (std::vector<Mac48Address>::const_iterator i = receivers.begin (); i != receivers.end(); i ++)
+          for (std::vector<Mac48Address>::const_iterator i = receivers.begin (); i != receivers.end (); i ++)
             {
               Ptr<Packet> packet_copy = packet->Copy();
               tag.SetAddress (*i);
@@ -304,7 +304,7 @@
     Ptr<Packet>  packet, uint16_t  protocolType, RouteReplyCallback  routeReply, uint32_t ttl)
 {
   NS_ASSERT(destination != Mac48Address::GetBroadcast ());
-  HwmpRtable::LookupResult result = m_rtable->LookupReactive(destination);
+  HwmpRtable::LookupResult result = m_rtable->LookupReactive (destination);
   NS_LOG_DEBUG("Requested src = "<<source<<", dst = "<<destination<<", I am "<<GetAddress ()<<", RA = "<<result.retransmitter);
   if (result.retransmitter == Mac48Address::GetBroadcast ())
     {
@@ -358,7 +358,7 @@
       m_stats.initiatedPreq ++;
       for (HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++)
         {
-          i->second->RequestDestination(destination, originator_seqno, dst_seqno);
+          i->second->RequestDestination (destination, originator_seqno, dst_seqno);
         }
     }
   QueuedPacket pkt;
@@ -400,7 +400,7 @@
         {
           //find metric
           std::map<Mac48Address, uint32_t>::const_iterator j = m_lastHwmpMetric.find (preq.GetOriginatorAddress());
-          NS_ASSERT (j != m_lastHwmpSeqno.end());
+          NS_ASSERT (j != m_lastHwmpSeqno.end ());
           if (j->second <= preq.GetMetric ())
             {
               return;
@@ -413,8 +413,8 @@
   std::vector<Ptr<DestinationAddressUnit> > destinations = preq.GetDestinationList ();
   //Add reactive path to originator:
   if (
-      ((m_rtable->LookupReactive(preq.GetOriginatorAddress ())).retransmitter == Mac48Address::GetBroadcast ()) ||
-      ((m_rtable->LookupReactive(preq.GetOriginatorAddress ())).metric > preq.GetMetric ())
+      ((m_rtable->LookupReactive (preq.GetOriginatorAddress ())).retransmitter == Mac48Address::GetBroadcast ()) ||
+      ((m_rtable->LookupReactive (preq.GetOriginatorAddress ())).metric > preq.GetMetric ())
       )
     {
       m_rtable->AddReactivePath (
@@ -452,10 +452,10 @@
           //have destination count equal to 1 and
           //per destination flags DO and RF
           NS_ASSERT (preq.GetDestCount() == 1);
-          NS_ASSERT (((*i)->IsDo()) && ((*i)->IsRf()));
+          NS_ASSERT (((*i)->IsDo ()) && ((*i)->IsRf ()));
           //Add proactive path only if it is the better then existed
           //before
-          if(
+          if (
               ((m_rtable->LookupProactive ()).retransmitter == Mac48Address::GetBroadcast ()) ||
               ((m_rtable->LookupProactive ()).metric > preq.GetMetric ())
             )
@@ -503,7 +503,7 @@
         }
       //check if can answer:
       HwmpRtable::LookupResult result = m_rtable->LookupReactive ((*i)->GetDestinationAddress ());
-      if ((! ((*i)->IsDo())) && (result.retransmitter != Mac48Address::GetBroadcast ()))
+      if ((! ((*i)->IsDo ())) && (result.retransmitter != Mac48Address::GetBroadcast ()))
         {
           //have a valid information and can answer
           //!NB: If there is information from peer - set lifetime as
@@ -570,7 +570,7 @@
   //update routing info
   //Now add a path to destination and add precursor to source
   NS_LOG_DEBUG("I am " << GetAddress () << ", received prep from " << prep.GetOriginatorAddress () << ", receiver was:" << from);
-  HwmpRtable::LookupResult result = m_rtable->LookupReactive(prep.GetDestinationAddress ());
+  HwmpRtable::LookupResult result = m_rtable->LookupReactive (prep.GetDestinationAddress ());
   //Add a reactive path only if it is better than existing:
   if (
       ((m_rtable->LookupReactive (prep.GetOriginatorAddress ())).retransmitter == Mac48Address::GetBroadcast ()) ||
@@ -605,7 +605,7 @@
           prep.GetOriginatorSeqNumber ());
       ReactivePathResolved (fromMp);
     }
-  if(prep.GetDestinationAddress () == GetAddress ())
+  if (prep.GetDestinationAddress () == GetAddress ())
     {
       NS_LOG_DEBUG("I am "<<GetAddress ()<<", resolved "<<prep.GetOriginatorAddress ());
       return;
@@ -631,7 +631,7 @@
   NS_LOG_DEBUG("I am "<<GetAddress ()<<", received PERR from "<<from);
   std::vector<IePerr::FailedDestination> retval;
   HwmpRtable::LookupResult result;
-  for(unsigned int i = 0; i < destinations.size (); i ++)
+  for (unsigned int i = 0; i < destinations.size (); i ++)
   {
     result = m_rtable->LookupReactive (destinations[i].destination);
     if (!(
@@ -640,10 +640,10 @@
         (result.seqnum > destinations[i].seqnum)
         ))
       {
-        retval.push_back(destinations[i]);
+        retval.push_back (destinations[i]);
       }
   }
-  if (retval.size() == 0)
+  if (retval.size () == 0)
     {
       return;
     }
@@ -679,7 +679,7 @@
 {
   m_mp = mp;
   std::vector<Ptr<NetDevice> > interfaces = mp->GetInterfaces ();
-  for (std::vector<Ptr<NetDevice> >::const_iterator i = interfaces.begin (); i != interfaces.end(); i++)
+  for (std::vector<Ptr<NetDevice> >::const_iterator i = interfaces.begin (); i != interfaces.end (); i++)
     {
       // Checking for compatible net device
       Ptr<WifiNetDevice> wifiNetDev = (*i)->GetObject<WifiNetDevice> ();
@@ -698,7 +698,7 @@
       mac->InstallPlugin (hwmpMac);
       //Installing airtime link metric:
       Ptr<AirtimeLinkMetricCalculator> metric = CreateObject <AirtimeLinkMetricCalculator> ();
-      mac->SetLinkMetricCallback (MakeCallback(&AirtimeLinkMetricCalculator::CalculateMetric, metric));
+      mac->SetLinkMetricCallback (MakeCallback (&AirtimeLinkMetricCalculator::CalculateMetric, metric));
     }
   mp->SetRoutingProtocol (this);
   // Mesh point aggregates all installed protocols
@@ -717,12 +717,12 @@
   InitiatePathError (MakePathError (destinations));
 }
 void
-HwmpProtocol::SetNeighboursCallback(Callback<std::vector<Mac48Address>, uint32_t> cb)
+HwmpProtocol::SetNeighboursCallback (Callback<std::vector<Mac48Address>, uint32_t> cb)
 {
   m_neighboursCallback = cb;
 }
 bool
-HwmpProtocol::DropDataFrame(uint32_t seqno, Mac48Address source)
+HwmpProtocol::DropDataFrame (uint32_t seqno, Mac48Address source)
 {
   if (source == GetAddress ())
     {
@@ -756,8 +756,8 @@
   m_stats.initiatedPerr ++;
   for (unsigned int i = 0; i < destinations.size (); i ++)
   {
-    retval.destinations.push_back(destinations[i]);
-    m_rtable->DeleteReactivePath(destinations[i].destination);
+    retval.destinations.push_back (destinations[i]);
+    m_rtable->DeleteReactivePath (destinations[i].destination);
   }
   return retval;
 }
@@ -767,7 +767,7 @@
   for (HwmpProtocolMacMap::const_iterator i =  m_interfaces.begin (); i != m_interfaces.end (); i ++)
   {
     std::vector<Mac48Address> receivers_for_interface;
-    for (unsigned int j = 0; j < perr.receivers.size(); j ++)
+    for (unsigned int j = 0; j < perr.receivers.size (); j ++)
       {
         if (i->first == perr.receivers[j].first)
           {
@@ -783,11 +783,11 @@
   for (HwmpProtocolMacMap::const_iterator i =  m_interfaces.begin (); i != m_interfaces.end (); i ++)
   {
     std::vector<Mac48Address> receivers_for_interface;
-    for (unsigned int j = 0; j < perr.receivers.size(); j ++)
+    for (unsigned int j = 0; j < perr.receivers.size (); j ++)
       {
         if (i->first == perr.receivers[j].first)
           {
-            receivers_for_interface.push_back(perr.receivers[j].second);
+            receivers_for_interface.push_back (perr.receivers[j].second);
           }
       }
     i->second->ForwardPerr (perr.destinations, receivers_for_interface);
@@ -802,10 +802,10 @@
   {
     HwmpRtable::PrecursorList precursors = m_rtable->GetPrecursors (failedDest[i].destination);
     m_rtable->DeleteReactivePath (failedDest[i].destination);
-    m_rtable->DeleteProactivePath(failedDest[i].destination);
+    m_rtable->DeleteProactivePath (failedDest[i].destination);
     for (unsigned int j = 0; j < precursors.size (); j ++)
       {
-        retval.push_back(precursors[j]);
+        retval.push_back (precursors[j]);
       }
   }
   //Check if we have dublicates in retval and precursors:
@@ -815,7 +815,7 @@
         {
           if (retval[i].second == retval[j].second)
             {
-              retval.erase(retval.begin() + j);
+              retval.erase (retval.begin () + j);
             }
         }
     }
@@ -829,7 +829,7 @@
     {
       retval = m_neighboursCallback (interface);
     }
-  if ((retval.size() >= m_unicastPreqThreshold) || (retval.size () == 0))
+  if ((retval.size () >= m_unicastPreqThreshold) || (retval.size () == 0))
   {
     retval.clear ();
     retval.push_back (Mac48Address::GetBroadcast ());
@@ -844,7 +844,7 @@
     {
       retval = m_neighboursCallback (interface);
     }
-  if ((retval.size() >= m_unicastDataThreshold) || (retval.size () == 0))
+  if ((retval.size () >= m_unicastDataThreshold) || (retval.size () == 0))
   {
     retval.clear ();
     retval.push_back (Mac48Address::GetBroadcast ());
@@ -963,7 +963,7 @@
   if (result.retransmitter != Mac48Address::GetBroadcast ())
     {
       std::map<Mac48Address, EventId>::iterator i = m_preqTimeouts.find (dst);
-      NS_ASSERT (i !=  m_preqTimeouts.end());
+      NS_ASSERT (i !=  m_preqTimeouts.end ());
       m_preqTimeouts.erase (i);
       return;
     }
@@ -991,7 +991,7 @@
     }
   for (HwmpProtocolMacMap::const_iterator i = m_interfaces.begin (); i != m_interfaces.end (); i ++)
     {
-      i->second->RequestDestination(dst, originator_seqno, dst_seqno);
+      i->second->RequestDestination (dst, originator_seqno, dst_seqno);
     }
   m_preqTimeouts[dst] = Simulator::Schedule (
       MilliSeconds (2*(m_dot11MeshHWMPnetDiameterTraversalTime.GetMilliSeconds())),
@@ -1002,7 +1002,7 @@
 HwmpProtocol::SetRoot ()
 {
   UniformVariable coefficient (0.0, m_randomStart.GetSeconds());
-  Time randomStart = Seconds (coefficient.GetValue());
+  Time randomStart = Seconds (coefficient.GetValue ());
   m_proactivePreqTimer = Simulator::Schedule (randomStart, &HwmpProtocol::SendProactivePreq, this);
   NS_LOG_DEBUG ("ROOT IS: " << m_address);
   SendProactivePreq ();
@@ -1076,7 +1076,7 @@
   return m_dot11MeshHWMPactivePathTimeout.GetMicroSeconds () / 1024;
 }
 uint8_t
-HwmpProtocol::GetUnicastPerrThreshold()
+HwmpProtocol::GetUnicastPerrThreshold ()
 {
   return m_unicastPerrThreshold;
 }
@@ -1149,4 +1149,4 @@
 }
 
 } //namespace dot11s
-            } //namespace ns3
+} //namespace ns3
--- a/src/devices/mesh/dot11s/hwmp-protocol.h	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/dot11s/hwmp-protocol.h	Wed Jul 22 15:56:55 2009 +0400
@@ -67,11 +67,11 @@
    * via MeshPointDevice::GetObject<dot11s::HwmpProtocol>();
    */
   bool Install (Ptr<MeshPointDevice>);
-  void PeerLinkStatus(Mac48Address meshPontAddress, Mac48Address peerAddress, uint32_t interface,bool status);
+  void PeerLinkStatus (Mac48Address meshPontAddress, Mac48Address peerAddress, uint32_t interface,bool status);
   ///\brief This callback is used to obtain active neighbours on a
   //given interface
   ///\param interface is the interface ID
-  void SetNeighboursCallback(Callback<std::vector<Mac48Address>, uint32_t> cb);
+  void SetNeighboursCallback (Callback<std::vector<Mac48Address>, uint32_t> cb);
   ///\name Proactive PREQ mechanism:
   ///\{
   void SetRoot ();
@@ -89,9 +89,9 @@
 
   ///\name Interaction with HWMP MAC plugin
   //\{
-  void ReceivePreq(IePreq preq, Mac48Address from, uint32_t interface, Mac48Address fromMp, uint32_t metric);
-  void ReceivePrep(IePrep prep, Mac48Address from, uint32_t interface, Mac48Address fromMp, uint32_t metric);
-  void ReceivePerr(std::vector<IePerr::FailedDestination>, Mac48Address from, uint32_t interface, Mac48Address fromMp);
+  void ReceivePreq (IePreq preq, Mac48Address from, uint32_t interface, Mac48Address fromMp, uint32_t metric);
+  void ReceivePrep (IePrep prep, Mac48Address from, uint32_t interface, Mac48Address fromMp, uint32_t metric);
+  void ReceivePerr (std::vector<IePerr::FailedDestination>, Mac48Address from, uint32_t interface, Mac48Address fromMp);
   void SendPrep (
       Mac48Address src,
       Mac48Address dst,
@@ -135,7 +135,7 @@
    * \param uint32_t is the seqno
    * \param Mac48Address is the mesh source addrress of the frame
    */
-  bool DropDataFrame(uint32_t, Mac48Address);
+  bool DropDataFrame (uint32_t, Mac48Address);
   //\}
 private:
   /// Packet waiting its routing information
@@ -147,7 +147,7 @@
     uint32_t inInterface; ///< incoming device interface ID. (if packet has come from upper layers, this is Mesh point ID)
     RouteReplyCallback reply; ///< how to reply
 
-    QueuedPacket () : pkt(0), protocol(0), inInterface(0) {}
+    QueuedPacket () : pkt (0), protocol (0), inInterface (0) {}
   };
 
   ///\name Methods related to Queue/Dequeue procedures
--- a/src/devices/mesh/dot11s/hwmp-rtable.cc	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/dot11s/hwmp-rtable.cc	Wed Jul 22 15:56:55 2009 +0400
@@ -96,13 +96,15 @@
     {
       bool should_add = true;
       for (unsigned int j = 0; j < i->second.precursors.size (); j++)
-        //NB: Only one active route may exist, so do not check
-        //interface ID, just address
-        if (i->second.precursors[j].second == precursorAddress)
-          {
-            should_add = false;
-            break;
-          }
+        {
+          //NB: Only one active route may exist, so do not check
+          //interface ID, just address
+          if (i->second.precursors[j].second == precursorAddress)
+            {
+              should_add = false;
+              break;
+            }
+        }
       if (should_add)
         {
           i->second.precursors.push_back (precursor);
@@ -134,7 +136,9 @@
 HwmpRtable::DeleteProactivePath (Mac48Address root)
 {
   if (m_root.root == root)
-    DeleteProactivePath ();
+    {
+      DeleteProactivePath ();
+    }
 }
 void
 HwmpRtable::DeleteReactivePath (Mac48Address destination)
@@ -193,13 +197,15 @@
   IePerr::FailedDestination dst;
   std::vector<IePerr::FailedDestination> retval;
   for (std::map<Mac48Address, ReactiveRoute>::iterator i = m_routes.begin (); i != m_routes.end (); i++)
-    if (i->second.retransmitter == peerAddress)
-      {
-        dst.destination = i->first;
-        i->second.seqnum++;
-        dst.seqnum = i->second.seqnum;
-        retval.push_back (dst);
-      }
+  {
+      if (i->second.retransmitter == peerAddress)
+        {
+          dst.destination = i->first;
+          i->second.seqnum++;
+          dst.seqnum = i->second.seqnum;
+          retval.push_back (dst);
+        }
+  }
   //Lookup a path to root
   if (m_root.retransmitter == peerAddress)
     {
@@ -228,13 +234,17 @@
         {
           bool should_add = true;
           for (unsigned int j = 0; j < retval.size (); j++)
-            if (retval[j].second == m_root.precursors[i].second)
-              {
-                should_add = false;
-                break;
-              }
+            {
+              if (retval[j].second == m_root.precursors[i].second)
+                {
+                  should_add = false;
+                  break;
+                }
+            }
           if (should_add)
-            retval.push_back (m_root.precursors[i]);
+            {
+              retval.push_back (m_root.precursors[i]);
+            }
         }
     }
   return retval;
--- a/src/devices/mesh/dot11s/hwmp-rtable.h	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/dot11s/hwmp-rtable.h	Wed Jul 22 15:56:55 2009 +0400
@@ -51,11 +51,11 @@
     uint32_t seqnum;
     Time lifetime;
 
-    LookupResult(Mac48Address r = Mac48Address::GetBroadcast (),
+    LookupResult (Mac48Address r = Mac48Address::GetBroadcast (),
                  uint32_t i = INTERFACE_ANY,
                  uint32_t m = MAX_METRIC,
                  uint32_t s = 0,
-                 Time l = Seconds(0.0))
+                 Time l = Seconds (0.0))
       : retransmitter (r),
         ifIndex (i),
         metric (m),
@@ -65,7 +65,7 @@
     }
 
     /// True for valid route
-    bool IsValid() const;
+    bool IsValid () const;
     /// Compare route lookup results, used by tests
     bool operator==(const LookupResult & o) const;
   };
--- a/src/devices/mesh/dot11s/ie-dot11s-beacon-timing.cc	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/dot11s/ie-dot11s-beacon-timing.cc	Wed Jul 22 15:56:55 2009 +0400
@@ -147,7 +147,7 @@
 uint8_t
 IeBeaconTiming::GetInformationSize () const
 {
-  return (5* m_numOfUnits );
+  return (5 * m_numOfUnits );
 }
 void
 IeBeaconTiming::PrintInformation (std::ostream& os) const
--- a/src/devices/mesh/dot11s/ie-dot11s-metric-report.cc	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/dot11s/ie-dot11s-metric-report.cc	Wed Jul 22 15:56:55 2009 +0400
@@ -41,7 +41,7 @@
 uint8_t
 IeLinkMetricReport::GetInformationSize (void) const
 {
-  return sizeof(uint32_t);
+  return sizeof (uint32_t);
 }
 uint32_t
 IeLinkMetricReport::GetMetric ()
--- a/src/devices/mesh/dot11s/ie-dot11s-peer-management.h	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/dot11s/ie-dot11s-peer-management.h	Wed Jul 22 15:56:55 2009 +0400
@@ -71,7 +71,7 @@
   bool   SubtypeIsOpen () const;
   bool   SubtypeIsClose () const;
   bool   SubtypeIsConfirm () const ;
-  uint8_t GetSubtype() const { return m_subtype;};
+  uint8_t GetSubtype () const { return m_subtype;};
 private:
   WifiElementId ElementId () const;
   uint8_t  GetInformationSize (void) const;
--- a/src/devices/mesh/dot11s/ie-dot11s-perr.cc	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/dot11s/ie-dot11s-perr.cc	Wed Jul 22 15:56:55 2009 +0400
@@ -71,7 +71,7 @@
   Buffer::Iterator i = start;
   i.Next (1); //Mode flags is not used now
   uint8_t numOfDest = i.ReadU8 ();
-  NS_ASSERT ((2 + 10* numOfDest ) == length);
+  NS_ASSERT ((2 + 10 * numOfDest ) == length);
   length = 0; //to avoid compiler warning in optimized builds
   for (unsigned int j = 0; j < numOfDest; j++)
     {
--- a/src/devices/mesh/dot11s/ie-dot11s-preq.cc	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/dot11s/ie-dot11s-preq.cc	Wed Jul 22 15:56:55 2009 +0400
@@ -49,7 +49,9 @@
 {
   m_destSeqNumber = dest_seq_number;
   if (m_destSeqNumber != 0)
-    m_usn = true;
+    {
+      m_usn = true;
+    }
 }
 void
 DestinationAddressUnit::SetDestinationAddress (Mac48Address dest_address)
@@ -332,7 +334,9 @@
   os << " preq ID             = " << m_preqId << "\n";
   os << " Destinations are:\n";
   for (int j = 0; j < m_destCount; j++)
-    os << "    " << m_destinations[j]->GetDestinationAddress () << "\n";
+    {
+      os << "    " << m_destinations[j]->GetDestinationAddress () << "\n";
+    }
 }
 std::vector<Ptr<DestinationAddressUnit> >
 IePreq::GetDestinationList ()
--- a/src/devices/mesh/dot11s/ie-dot11s-preq.h	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/dot11s/ie-dot11s-preq.h	Wed Jul 22 15:56:55 2009 +0400
@@ -118,7 +118,7 @@
    * \brief Checks that preq's originator address equals to originator, and
    * this preq is not proactive
    */
-  bool MayAddAddress(Mac48Address originator);
+  bool MayAddAddress (Mac48Address originator);
   bool IsFull () const;
 private:
   WifiElementId ElementId () const;
--- a/src/devices/mesh/dot11s/peer-link-frame.h	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/dot11s/peer-link-frame.h	Wed Jul 22 15:56:55 2009 +0400
@@ -60,8 +60,8 @@
   };
   ///\attention: must be set before deserialize, before only multihop
   //action header knows about subtype
-  void SetPlinkFrameSubtype(uint8_t subtype);
-  void SetPlinkFrameStart(PlinkFrameStartFields);
+  void SetPlinkFrameSubtype (uint8_t subtype);
+  void SetPlinkFrameStart (PlinkFrameStartFields);
   PlinkFrameStartFields GetFields ();
   /** \name Inherited from header:
    * \{
--- a/src/devices/mesh/dot11s/peer-link.h	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/dot11s/peer-link.h	Wed Jul 22 15:56:55 2009 +0400
@@ -44,7 +44,7 @@
 public:
   friend class PeerManagementProtocol;
   /// Support object system
-  static TypeId GetTypeId();
+  static TypeId GetTypeId ();
   /// C-tor create empty link
   PeerLink ();
   ~PeerLink ();
@@ -145,7 +145,7 @@
    * Set pointer to MAC-plugin, which is responsible for sending peer
    * link management frames
    */
-  void SetMacPlugin(Ptr<PeerManagementProtocolMac> plugin);
+  void SetMacPlugin (Ptr<PeerManagementProtocolMac> plugin);
   /// Peer link states, see 802.11s draft 11B.3.3.1
 private:
   /// Peer link events, see 802.11s draft 11B.3.3.2
--- a/src/devices/mesh/dot11s/peer-management-protocol-mac.h	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/dot11s/peer-management-protocol-mac.h	Wed Jul 22 15:56:55 2009 +0400
@@ -68,11 +68,11 @@
   ///functionallity
   ///\param first in retval is TBTT
   ///\param second in retval is beacon interval
-  std::pair<Time, Time> GetBeaconInfo() const;
-  void SetBeaconShift(Time shift);
+  std::pair<Time, Time> GetBeaconInfo () const;
+  void SetBeaconShift (Time shift);
   ///\}
-  void SetPeerManagerProtcol(Ptr<PeerManagementProtocol> protocol);
-  void SendPeerLinkManagementFrame(
+  void SetPeerManagerProtcol (Ptr<PeerManagementProtocol> protocol);
+  void SendPeerLinkManagementFrame (
       Mac48Address peerAddress,
       Mac48Address peerMpAddress,
       uint16_t aid,
@@ -90,9 +90,9 @@
    ///\}
    ///\name Create peer link management frames:
    ///\{
-  Ptr<Packet> CreatePeerLinkOpenFrame();
-  Ptr<Packet> CreatePeerLinkConfirmFrame();
-  Ptr<Packet> CreatePeerLinkCloseFrame();
+  Ptr<Packet> CreatePeerLinkOpenFrame ();
+  Ptr<Packet> CreatePeerLinkConfirmFrame ();
+  Ptr<Packet> CreatePeerLinkCloseFrame ();
   ///This structure keeps all fields in peer link management frame,
   ///which are not subclasses of WifiInformationElement
   struct PlinkFrameStart {
@@ -103,7 +103,7 @@
   };
   /// \name Parses the start of the frame, where there are no
   /// WifiInformationElements exist
-  PlinkFrameStart ParsePlinkFrame(Ptr<const Packet> packet);
+  PlinkFrameStart ParsePlinkFrame (Ptr<const Packet> packet);
   ///\}
   //Keeps statistics
   struct Statistics {
--- a/src/devices/mesh/dot11s/peer-management-protocol.h	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/dot11s/peer-management-protocol.h	Wed Jul 22 15:56:55 2009 +0400
@@ -61,7 +61,7 @@
    * Also MP aggregates all installed protocols, PMP protocol can be accessed
    * via MeshPointDevice::GetObject<PeerManagementProtocol>();
    */
-  bool Install(Ptr<MeshPointDevice>);
+  bool Install (Ptr<MeshPointDevice>);
   /**
    * \brief Methods that handle beacon sending/receiving procedure.
    *
@@ -75,7 +75,7 @@
    * should be present in beacon
    * \param interface is a interface sending a beacon
    */
-  Ptr<IeBeaconTiming> GetBeaconTimingElement(uint32_t interface);
+  Ptr<IeBeaconTiming> GetBeaconTimingElement (uint32_t interface);
   /**
    * \brief When we receive a beacon from peer-station, we remember
    * its beacon timing element (needed for peer choosing mechanism),
@@ -84,7 +84,7 @@
    * \param interface is a interface on which beacon was received
    * \param timingElement is a timing element of remote beacon
    */
-  void UpdatePeerBeaconTiming(
+  void UpdatePeerBeaconTiming (
       uint32_t interface,
       bool meshBeacon,
       IeBeaconTiming timingElement,
@@ -113,7 +113,7 @@
    * taken from the peer management frame
    * \param IePeerManagement is peer link management element
    */
-  void ReceivePeerLinkFrame(
+  void ReceivePeerLinkFrame (
       uint32_t interface,
       Mac48Address peerAddress,
       Mac48Address peerMeshPointAddress,
@@ -132,15 +132,15 @@
   bool IsActiveLink (uint32_t interface, Mac48Address peerAddress);
   //\}
   ///\brief Needed by external module to do MLME
-  Ptr<PeerLink> FindPeerLink(uint32_t interface, Mac48Address peerAddress);
+  Ptr<PeerLink> FindPeerLink (uint32_t interface, Mac48Address peerAddress);
   void SetPeerLinkStatusCallback (Callback<void, Mac48Address, Mac48Address, uint32_t, bool> cb);
-  std::vector<Mac48Address> GetActiveLinks(uint32_t interface);
+  std::vector<Mac48Address> GetActiveLinks (uint32_t interface);
   ///\brief needed by plugins to set global source address
   Mac48Address GetAddress ();
   ///\Needed to fill mesh configuration
   uint8_t GetNumberOfLinks ();
   void SetMeshId (std::string s);
-  Ptr<IeMeshId> GetMeshId() const;
+  Ptr<IeMeshId> GetMeshId () const;
   ///\brief: Report statistics
   void Report (std::ostream &) const;
   void ResetStats ();
@@ -173,7 +173,7 @@
   /**
    * Return a position in beacon-storage for a given remote station
    */
-  void FillBeaconInfo(uint32_t interface, Mac48Address peerAddress, Time receivingTime, Time beaconInterval);
+  void FillBeaconInfo (uint32_t interface, Mac48Address peerAddress, Time receivingTime, Time beaconInterval);
   Ptr<PeerLink> InitiateLink (
       uint32_t interface,
       Mac48Address peerAddress,
--- a/src/devices/mesh/flame/flame-rtable.h	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/flame/flame-rtable.h	Wed Jul 22 15:56:55 2009 +0400
@@ -50,7 +50,7 @@
     uint32_t ifIndex;
     uint8_t  cost;
     uint16_t seqnum;
-    LookupResult(Mac48Address r = Mac48Address::GetBroadcast (),
+    LookupResult (Mac48Address r = Mac48Address::GetBroadcast (),
                  uint32_t i = INTERFACE_ANY,
                  uint8_t  c = MAX_COST,
                  uint16_t s = 0)
@@ -61,7 +61,7 @@
     {
     }
     /// True for valid route
-    bool IsValid() const;
+    bool IsValid () const;
     /// Compare route lookup results, used by tests
     bool operator==(const LookupResult & o) const;
   };
--- a/src/devices/mesh/mesh-point-device.h	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/mesh-point-device.h	Wed Jul 22 15:56:55 2009 +0400
@@ -85,7 +85,7 @@
   /// Register routing protocol to be used. Protocol must be alredy installed on this mesh point.
   void SetRoutingProtocol (Ptr<MeshL2RoutingProtocol> protocol);
   /// Access current routing protocol
-  Ptr<MeshL2RoutingProtocol> GetRoutingProtocol() const;
+  Ptr<MeshL2RoutingProtocol> GetRoutingProtocol () const;
   //\}
 
   ///\name NetDevice interface for upper layers
--- a/src/devices/mesh/mesh-wifi-interface-mac.h	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/mesh-wifi-interface-mac.h	Wed Jul 22 15:56:55 2009 +0400
@@ -143,15 +143,15 @@
   //\}
 
   /// To be used by plugins sending management frames.
-  void SendManagementFrame(Ptr<Packet> frame, const WifiMacHeader& hdr);
+  void SendManagementFrame (Ptr<Packet> frame, const WifiMacHeader& hdr);
   /// \return true if rates are supported
-  bool CheckSupportedRates(SupportedRates rates) const;
+  bool CheckSupportedRates (SupportedRates rates) const;
   /// \return list of supported bitrates
   SupportedRates GetSupportedRates () const;
   ///\ name Metric Calculation routines:
   ///\{
-  void SetLinkMetricCallback(Callback<uint32_t, Mac48Address, Ptr<MeshWifiInterfaceMac> > cb);
-  uint32_t GetLinkMetric(Mac48Address peerAddress);
+  void SetLinkMetricCallback (Callback<uint32_t, Mac48Address, Ptr<MeshWifiInterfaceMac> > cb);
+  uint32_t GetLinkMetric (Mac48Address peerAddress);
   Ptr<WifiRemoteStationManager> GetStationManager ();
   ///\}
   ///\brief Statistics:
--- a/src/devices/mesh/wifi-information-element.h	Wed Jul 22 14:52:42 2009 +0400
+++ b/src/devices/mesh/wifi-information-element.h	Wed Jul 22 15:56:55 2009 +0400
@@ -142,7 +142,7 @@
    * This method takes a packet which must be a list of information
    * elements and looks for an information element of MINE Element ID
    */
-  bool FindFirst(Ptr<Packet> packet);
+  bool FindFirst (Ptr<Packet> packet);
   //\}
     
 protected:
@@ -189,7 +189,7 @@
   NS_TEST_ASSERT_EQUAL (a, b);
   packet->AddHeader (a);
   IE c;
-  bool ok = c.FindFirst(packet);
+  bool ok = c.FindFirst (packet);
   NS_TEST_ASSERT (ok);
   NS_TEST_ASSERT_EQUAL (a, c);