Cosmetics

This commit is contained in:
Pavel Boyko
2009-09-14 10:19:33 +04:00
parent 17a463d970
commit adad3f4b9f
11 changed files with 75 additions and 44 deletions

View File

@@ -67,6 +67,7 @@ allows a user to insert a route and have it redistributed like an OSPF
external LSA to the rest of the topology.
</p>
</li>
<li><b>Athstats</b>
<p>New classes AthstatsWifiTraceSink and AthstatsHelper.
</p>
@@ -75,6 +76,7 @@ external LSA to the rest of the topology.
<p>New trace sources exported by WifiRemoteStationManager: MacTxRtsFailed, MacTxDataFailed, MacTxFinalRtsFailed and MacTxFinalDataFailed.
</p>
</li>
<li><b> IPv6 additions</b>
<p> Add an IPv6 protocol and ICMPv6 capability.
<ul>
@@ -86,7 +88,28 @@ router solicitation, DAD
<li> routing objects Ipv6Route and Ipv6MulticastRoute
<li> routing protocols Ipv6ListRouting and Ipv6StaticRouting
<li> examples: icmpv6-redirect.cc, ping6.cc, radvd.cc, radvd-two-prefix.cc, simple-routing-ping6.cc
</ul>
</ul>
</p>
</li>
<li><b>Wireless Mesh Networking models</b>
<ul>
<p>
<li> General multi-interface mesh stack infrastructure (devices/mesh module).
<li> IEEE 802.11s (Draft 3.0) model including Peering Management Protocol and HWMP.
<li> Forwarding Layer for Meshing (FLAME) protocol.
</ul>
</p>
</li>
<li><b>802.11 enhancements</b>
<p>
<ul>
<li> 10MHz and 5MHz channel width supported by 802.11a model (Ramon Bauza and Kirill Andreev).
</ul>
</p>
</li>
</ul>
<h2>Changes to existing API:</h2>

View File

@@ -50,10 +50,13 @@ New user-visible features
periodic reports similar to the ones generated by madwifi's
athstats tool (Nicola Baldo)
d) Mesh netorking model:
- General multi-interface mesh stack infractructure (devices/mesh module);
- IEEE 802.11s (Draft 3.0) model including Peering Management Protocol and HWMP;
- FLAME - Forwarding layer for meshing.
d) Wireless Mesh Networking models:
- General multi-interface mesh stack infrastructure (devices/mesh module).
- IEEE 802.11s (Draft 3.0) model including Peering Management Protocol and HWMP.
- Forwarding Layer for Meshing (FLAME) protocol.
e) 802.11 enhancements:
- 10MHz and 5MHz channel width supported by 802.11a model (Ramon Bauza and Kirill Andreev)
API changes from ns-3.5
-----------------------

View File

@@ -133,7 +133,7 @@ def build(bld):
obj.source = 'wifi-ap.cc'
obj = bld.create_ns3_program('mesh',
['core', 'simulator', 'mobility', 'wifi'])
['core', 'simulator', 'mobility', 'wifi', 'mesh'])
obj.source = 'mesh.cc'
bld.add_subdirs('stats')

View File

@@ -257,15 +257,15 @@ HwmpProtocol::RequestRoute (
std::vector<uint16_t> channels;
for (HwmpProtocolMacMap::const_iterator plugin = m_interfaces.begin (); plugin != m_interfaces.end (); plugin ++)
{
bool should_send = true;
bool shouldSend = true;
for (std::vector<uint16_t>::const_iterator chan = channels.begin (); chan != channels.end (); chan ++)
{
if ((*chan) == plugin->second->GetChannelId ())
{
should_send = false;
shouldSend = false;
}
}
if (!should_send)
if (!shouldSend)
{
continue;
}
@@ -273,10 +273,10 @@ HwmpProtocol::RequestRoute (
std::vector<Mac48Address> receivers = GetBroadcastReceivers (plugin->first);
for (std::vector<Mac48Address>::const_iterator i = receivers.begin (); i != receivers.end (); i ++)
{
Ptr<Packet> packet_copy = packet->Copy();
Ptr<Packet> packetCopy = packet->Copy();
tag.SetAddress (*i);
packet_copy->AddPacketTag (tag);
routeReply (true, packet_copy, source, destination, protocolType, plugin->first);
packetCopy->AddPacketTag (tag);
routeReply (true, packetCopy, source, destination, protocolType, plugin->first);
}
}
}

View File

@@ -199,20 +199,28 @@ operator== (const IeBeaconTimingUnit & a, const IeBeaconTimingUnit & b)
&& (a.GetBeaconInterval () == b.GetBeaconInterval ()));
}
bool
operator== (const IeBeaconTiming & a, const IeBeaconTiming& b)
IeBeaconTiming::operator== (WifiInformationElement const & a)
{
if (a.m_numOfUnits != b.m_numOfUnits)
{
return false;
}
for (unsigned int i = 0; i < a.m_neighbours.size (); i++)
{
if (!(*PeekPointer (a.m_neighbours[i]) == *PeekPointer (b.m_neighbours[i])))
{
return false;
}
}
return true;
try {
IeBeaconTiming const & aa = dynamic_cast<IeBeaconTiming const &>(a);
if (m_numOfUnits != aa.m_numOfUnits)
{
return false;
}
for (unsigned int i = 0; i < m_neighbours.size (); i++)
{
if (!(*PeekPointer (m_neighbours[i]) == *PeekPointer (aa.m_neighbours[i])))
{
return false;
}
}
return true;
}
catch (std::bad_cast)
{
return false;
}
}
std::ostream &
operator << (std::ostream &os, const IeBeaconTiming &a)

View File

@@ -36,8 +36,8 @@ class IeBeaconTimingUnit : public RefCountBase
public:
IeBeaconTimingUnit ();
void SetAid (uint8_t aid);
void SetLastBeacon (uint16_t last_beacon);
void SetBeaconInterval (uint16_t beacon_interval);
void SetLastBeacon (uint16_t lastBeacon);
void SetBeaconInterval (uint16_t beaconInterval);
uint8_t GetAid () const;
uint16_t GetLastBeacon () const;
@@ -93,6 +93,7 @@ public:
virtual uint8_t DeserializeInformation (Buffer::Iterator i, uint8_t length);
virtual void Print (std::ostream& os) const;
///\}
bool operator== (WifiInformationElement const & a);
private:
/**
* Converters:
@@ -106,9 +107,7 @@ private:
* Timing element parameters:
*/
uint16_t m_numOfUnits;
friend bool operator== (const IeBeaconTiming & a, const IeBeaconTiming & b);
};
bool operator== (const IeBeaconTiming & a, const IeBeaconTiming & b);
bool operator== (const IeBeaconTimingUnit & a, const IeBeaconTimingUnit & b);
std::ostream &operator << (std::ostream &os, const IeBeaconTiming &beaconTiming);
} // namespace dot11s

View File

@@ -108,7 +108,7 @@ IePerr::AddAddressUnit (HwmpProtocol::FailedDestination unit)
bool
IePerr::IsFull () const
{
return (GetInformationSize () + 2 /* ID + LENGTH*/+ 10 /* Sie of Mac48Address + uint32_t (one unit)*/> 255);
return (GetInformationSize () + 2 /* ID + LENGTH*/+ 10 /* Size of Mac48Address + uint32_t (one unit)*/> 255);
}
std::vector<HwmpProtocol::FailedDestination>
IePerr::GetAddressUnitVector () const
@@ -154,7 +154,7 @@ operator== (const IePerr & a, const IePerr & b)
return true;
}
std::ostream &
operator << (std::ostream &os, const IePerr &a)
operator << (std::ostream & os, const IePerr & a)
{
a.Print (os);
return os;

View File

@@ -57,14 +57,14 @@ IePrep::SetTtl (uint8_t ttl)
m_ttl = ttl;
}
void
IePrep::SetDestinationSeqNumber (uint32_t dest_seq_number)
IePrep::SetDestinationSeqNumber (uint32_t destSeqNumber)
{
m_destSeqNumber = dest_seq_number;
m_destSeqNumber = destSeqNumber;
}
void
IePrep::SetDestinationAddress (Mac48Address dest_address)
IePrep::SetDestinationAddress (Mac48Address destAddress)
{
m_destinationAddress = dest_address;
m_destinationAddress = destAddress;
}
void
IePrep::SetMetric (uint32_t metric)
@@ -72,14 +72,14 @@ IePrep::SetMetric (uint32_t metric)
m_metric = metric;
}
void
IePrep::SetOriginatorAddress (Mac48Address originator_address)
IePrep::SetOriginatorAddress (Mac48Address originatorAddress)
{
m_originatorAddress = originator_address;
m_originatorAddress = originatorAddress;
}
void
IePrep::SetOriginatorSeqNumber (uint32_t originator_seq_number)
IePrep::SetOriginatorSeqNumber (uint32_t originatorSeqNumber)
{
m_originatorSeqNumber = originator_seq_number;
m_originatorSeqNumber = originatorSeqNumber;
}
void
IePrep::SetLifetime (uint32_t lifetime)

View File

@@ -108,11 +108,6 @@ IePreq::SetNeedNotPrep ()
{
m_flags |= 1 << 2;
}
//void
//IePreq::SetFlags (uint8_t flags)
//{
// m_flags = flags;
//}
void
IePreq::SetHopcount (uint8_t hopcount)
{

View File

@@ -204,6 +204,7 @@ WifiInformationElementVector::GetSize () const
}
return size;
}
bool
operator== (const WifiInformationElementVector & a, const WifiInformationElementVector & b)
{

View File

@@ -97,6 +97,8 @@ public:
/// Compare information elements using Element ID
friend bool operator< (WifiInformationElement const & a, WifiInformationElement const & b);
///
virtual bool operator== (WifiInformationElement const & a) { return false; }
};
/// Compare information elements using Element ID