Dot11s prefix removed

This commit is contained in:
Kirill Andreev
2009-03-24 19:46:26 +03:00
parent 799e29a465
commit 764f01dee2
7 changed files with 50 additions and 50 deletions

View File

@@ -153,7 +153,7 @@ MeshWifiHelper::Install (const WifiPhyHelper &phyHelper, NodeContainer c) const
mac->SetAddress (Mac48Address::Allocate ());
device->SetMac (mac);
device->SetPhy (phy);
Ptr<Dot11sPeerManagerProtocol> peerMan = m_peerMan.Create<Dot11sPeerManagerProtocol> ();
Ptr<PeerManagerProtocol> peerMan = m_peerMan.Create<PeerManagerProtocol> ();
NS_ASSERT(peerMan->AttachPorts(ports));
device->SetRemoteStationManager (manager);
node->AddDevice (device);

View File

@@ -251,7 +251,7 @@ PeerLink::LinkIsIdle () const
return (m_state == IDLE);
}
void
PeerLink::SetMacPlugin(Ptr<Dot11sPeerManagerMacPlugin> plugin)
PeerLink::SetMacPlugin(Ptr<PeerManagerMacPlugin> plugin)
{
m_macPlugin = plugin;
}

View File

@@ -131,7 +131,7 @@ public:
* Set pointer to MAC-plugin, which is responsible for sending peer
* link management frames
*/
void SetMacPlugin(Ptr<Dot11sPeerManagerMacPlugin> plugin);
void SetMacPlugin(Ptr<PeerManagerMacPlugin> plugin);
private:
/// Peer link states, see 802.11s draft 11B.3.3.1
enum PeerState {
@@ -199,7 +199,7 @@ private:
///The number of interface I am associated with
uint32_t m_interface;
/// pointer to mac plugin, which is responsible for peer management
Ptr<Dot11sPeerManagerMacPlugin> m_macPlugin;
Ptr<PeerManagerMacPlugin> m_macPlugin;
/// Peer address
Mac48Address m_peerAddress;
/// My ID of this link

View File

@@ -32,24 +32,24 @@
NS_LOG_COMPONENT_DEFINE("PeerManager");
namespace ns3 {
namespace dot11s {
Dot11sPeerManagerMacPlugin::Dot11sPeerManagerMacPlugin (uint32_t interface, Ptr<Dot11sPeerManagerProtocol> protocol)
PeerManagerMacPlugin::PeerManagerMacPlugin (uint32_t interface, Ptr<PeerManagerProtocol> protocol)
{
m_ifIndex = interface;
m_protocol = protocol;
}
Dot11sPeerManagerMacPlugin::~Dot11sPeerManagerMacPlugin ()
PeerManagerMacPlugin::~PeerManagerMacPlugin ()
{
}
void
Dot11sPeerManagerMacPlugin::SetParent (Ptr<MeshWifiInterfaceMac> parent)
PeerManagerMacPlugin::SetParent (Ptr<MeshWifiInterfaceMac> parent)
{
m_parent = parent;
}
bool
Dot11sPeerManagerMacPlugin::Receive (Ptr<Packet> const_packet, const WifiMacHeader & header)
PeerManagerMacPlugin::Receive (Ptr<Packet> const_packet, const WifiMacHeader & header)
{
Ptr<Packet> packet = const_packet->Copy();
if(header.IsBeacon())
@@ -134,13 +134,13 @@ Dot11sPeerManagerMacPlugin::Receive (Ptr<Packet> const_packet, const WifiMacHead
}
bool
Dot11sPeerManagerMacPlugin::UpdateOutcomingFrame (Ptr<Packet> packet, WifiMacHeader & header, Mac48Address from, Mac48Address to) const
PeerManagerMacPlugin::UpdateOutcomingFrame (Ptr<Packet> packet, WifiMacHeader & header, Mac48Address from, Mac48Address to) const
{
return false;
}
void
Dot11sPeerManagerMacPlugin::UpdateBeacon (MeshWifiBeacon & beacon) const
PeerManagerMacPlugin::UpdateBeacon (MeshWifiBeacon & beacon) const
{
Ptr<IeDot11sBeaconTiming> beaconTiming =
m_protocol->SendBeacon(
@@ -150,7 +150,7 @@ Dot11sPeerManagerMacPlugin::UpdateBeacon (MeshWifiBeacon & beacon) const
beacon.AddInformationElement(beaconTiming);
}
void
Dot11sPeerManagerMacPlugin::SendPeerLinkManagementFrame(
PeerManagerMacPlugin::SendPeerLinkManagementFrame(
Mac48Address peerAddress,
uint16_t aid,
IeDot11sPeerManagement peerElement,
@@ -208,7 +208,7 @@ Dot11sPeerManagerMacPlugin::SendPeerLinkManagementFrame(
m_parent->SendManagementFrame(packet, hdr);
}
Mac48Address
Dot11sPeerManagerMacPlugin::GetAddress () const
PeerManagerMacPlugin::GetAddress () const
{
if(m_parent != 0)
return m_parent->GetAddress ();

View File

@@ -29,7 +29,7 @@ class MeshWifiInterfaceMac;
namespace dot11s {
class IeDot11sConfiguration;
class IeDot11sPeerManagement;
class Dot11sPeerManagerProtocol;
class PeerManagerProtocol;
/**
* \ingroup dot11s
*
@@ -39,11 +39,11 @@ class Dot11sPeerManagerProtocol;
* element and mesh configuration element and passes it to main part
* of protocol
*/
class Dot11sPeerManagerMacPlugin : public MeshWifiInterfaceMacPlugin
class PeerManagerMacPlugin : public MeshWifiInterfaceMacPlugin
{
public:
Dot11sPeerManagerMacPlugin (uint32_t interface, Ptr<Dot11sPeerManagerProtocol> protocol);
~Dot11sPeerManagerMacPlugin ();
PeerManagerMacPlugin (uint32_t interface, Ptr<PeerManagerProtocol> protocol);
~PeerManagerMacPlugin ();
/**
* \brief Inherited from plugin abstract class
* \{
@@ -55,7 +55,7 @@ public:
/**
* \}
*/
void SetPeerManagerProtcol(Ptr<Dot11sPeerManagerProtocol> protocol);
void SetPeerManagerProtcol(Ptr<PeerManagerProtocol> protocol);
void SendPeerLinkManagementFrame(
Mac48Address peerAddress,
uint16_t aid,
@@ -74,7 +74,7 @@ private:
*/
Ptr<MeshWifiInterfaceMac> m_parent;
uint32_t m_ifIndex;
Ptr<Dot11sPeerManagerProtocol> m_protocol;
Ptr<PeerManagerProtocol> m_protocol;
/**
* \}
*/

View File

@@ -33,32 +33,32 @@
#include "peer-manager-plugin.h"
NS_LOG_COMPONENT_DEFINE ("Dot11sPeerManagerProtocol");
NS_LOG_COMPONENT_DEFINE ("PeerManagerProtocol");
namespace ns3 {
namespace dot11s {
/***************************************************
* PeerManager
***************************************************/
NS_OBJECT_ENSURE_REGISTERED (Dot11sPeerManagerProtocol);
NS_OBJECT_ENSURE_REGISTERED (PeerManagerProtocol);
TypeId
Dot11sPeerManagerProtocol::GetTypeId (void)
PeerManagerProtocol::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::Dot11sPeerManagerProtocol")
static TypeId tid = TypeId ("ns3::PeerManagerProtocol")
.SetParent<Object> ()
.AddConstructor<Dot11sPeerManagerProtocol> ()
.AddConstructor<PeerManagerProtocol> ()
//peerLinkCleanupTimeout. This constant is not specified in Draft 2.0
.AddAttribute ("PeerLinkCleanupPeriod",
"PeerLinkCleanupPeriod",
TimeValue (MilliSeconds (80)),
MakeTimeAccessor (&Dot11sPeerManagerProtocol::m_peerLinkCleanupPeriod),
MakeTimeAccessor (&PeerManagerProtocol::m_peerLinkCleanupPeriod),
MakeTimeChecker ()
)
//MaxBeaconLost. This constant is not specified in Draft 2.0
#if 0
.AddAttribute ("MaxBeaconLost", "Max Beacon Lost",
UintegerValue (3),
MakeUintegerAccessor (&Dot11sPeerManagerProtocol::m_maxBeaconLoss),
MakeUintegerAccessor (&PeerManagerProtocol::m_maxBeaconLoss),
MakeUintegerChecker<uint8_t> ()
)
#endif
@@ -66,20 +66,20 @@ Dot11sPeerManagerProtocol::GetTypeId (void)
.AddAttribute ("MaxNumberOfPeerLinks",
"Maximum number of peer links ",
UintegerValue (32),
MakeUintegerAccessor (&Dot11sPeerManagerProtocol::m_maxNumberOfPeerLinks),
MakeUintegerAccessor (&PeerManagerProtocol::m_maxNumberOfPeerLinks),
MakeUintegerChecker<uint8_t> ()
);
return tid;
}
Dot11sPeerManagerProtocol::Dot11sPeerManagerProtocol ():
PeerManagerProtocol::PeerManagerProtocol ():
m_lastAssocId (0),
m_lastLocalLinkId (1),
m_numberOfActivePeers (0)
{
m_cleanupEvent = Simulator::Schedule (m_peerLinkCleanupPeriod, &Dot11sPeerManagerProtocol::PeerCleanup, this);
m_cleanupEvent = Simulator::Schedule (m_peerLinkCleanupPeriod, &PeerManagerProtocol::PeerCleanup, this);
}
Dot11sPeerManagerProtocol::~Dot11sPeerManagerProtocol ()
PeerManagerProtocol::~PeerManagerProtocol ()
{
m_cleanupEvent.Cancel ();
//TODO: delete a list of descriptors
@@ -103,14 +103,14 @@ Dot11sPeerManagerProtocol::~Dot11sPeerManagerProtocol ()
}
bool
Dot11sPeerManagerProtocol::AttachPorts(std::vector<Ptr<WifiNetDevice> > interfaces)
PeerManagerProtocol::AttachPorts(std::vector<Ptr<WifiNetDevice> > interfaces)
{
for(std::vector<Ptr<WifiNetDevice> >::iterator i = interfaces.begin(); i != interfaces.end(); i ++)
{
MeshWifiInterfaceMac * mac = dynamic_cast<MeshWifiInterfaceMac *> (PeekPointer ((*i)->GetMac ()));
if (mac == NULL)
return false;
Ptr<Dot11sPeerManagerMacPlugin> peerPlugin = Create<Dot11sPeerManagerMacPlugin> ((*i)->GetIfIndex(), this);
Ptr<PeerManagerMacPlugin> peerPlugin = Create<PeerManagerMacPlugin> ((*i)->GetIfIndex(), this);
mac->InstallPlugin(peerPlugin);
m_plugins[(*i)->GetIfIndex()] = peerPlugin;
PeerLinksOnInterface newmap;
@@ -120,7 +120,7 @@ Dot11sPeerManagerProtocol::AttachPorts(std::vector<Ptr<WifiNetDevice> > interfac
}
Ptr<IeDot11sBeaconTiming>
Dot11sPeerManagerProtocol::SendBeacon(uint32_t interface, Time currentTbtt, Time beaconInterval)
PeerManagerProtocol::SendBeacon(uint32_t interface, Time currentTbtt, Time beaconInterval)
{
Ptr<IeDot11sBeaconTiming> retval = Create<IeDot11sBeaconTiming> ();
BeaconInfoMap::iterator i = m_neighbourBeacons.find(interface);
@@ -141,7 +141,7 @@ Dot11sPeerManagerProtocol::SendBeacon(uint32_t interface, Time currentTbtt, Time
return retval;
}
void
Dot11sPeerManagerProtocol::FillBeaconInfo(uint32_t interface, Mac48Address peerAddress, Time receivingTime, Time beaconInterval)
PeerManagerProtocol::FillBeaconInfo(uint32_t interface, Mac48Address peerAddress, Time receivingTime, Time beaconInterval)
{
BeaconInfoMap::iterator i = m_neighbourBeacons.find(interface);
if(i == m_neighbourBeacons.end())
@@ -169,7 +169,7 @@ Dot11sPeerManagerProtocol::FillBeaconInfo(uint32_t interface, Mac48Address peerA
}
void
Dot11sPeerManagerProtocol::ReceiveBeacon(
PeerManagerProtocol::ReceiveBeacon(
uint32_t interface,
bool meshBeacon,
IeDot11sBeaconTiming timingElement,
@@ -202,7 +202,7 @@ Dot11sPeerManagerProtocol::ReceiveBeacon(
}
void
Dot11sPeerManagerProtocol::ReceivePeerLinkFrame (
PeerManagerProtocol::ReceivePeerLinkFrame (
uint32_t interface,
Mac48Address peerAddress,
uint16_t aid,
@@ -270,7 +270,7 @@ Dot11sPeerManagerProtocol::ReceivePeerLinkFrame (
}
void
Dot11sPeerManagerProtocol::ConfigurationMismatch (
PeerManagerProtocol::ConfigurationMismatch (
uint32_t interface,
Mac48Address peerAddress
)
@@ -288,7 +288,7 @@ Dot11sPeerManagerProtocol::ConfigurationMismatch (
}
Ptr<PeerLink>
Dot11sPeerManagerProtocol::InitiateLink (
PeerManagerProtocol::InitiateLink (
uint32_t interface,
Mac48Address peerAddress,
Time lastBeacon,
@@ -323,12 +323,12 @@ Dot11sPeerManagerProtocol::InitiateLink (
new_link->SetPeerAddress (peerAddress);
new_link->SetBeaconInformation (lastBeacon, beaconInterval);
new_link->SetMacPlugin (plugin->second);
new_link->MLMESetSignalStatusCallback (MakeCallback(&Dot11sPeerManagerProtocol::PeerLinkStatus, this));
new_link->MLMESetSignalStatusCallback (MakeCallback(&PeerManagerProtocol::PeerLinkStatus, this));
iface->second.push_back (new_link);
return new_link;
}
void
Dot11sPeerManagerProtocol::PeerCleanup ()
PeerManagerProtocol::PeerCleanup ()
{
//Cleanup a peer link descriptors:
for (
@@ -350,10 +350,10 @@ Dot11sPeerManagerProtocol::PeerCleanup ()
j->second.erase (j->second.begin() + to_erase[i]);
to_erase.clear ();
}
m_cleanupEvent = Simulator::Schedule (m_peerLinkCleanupPeriod, &Dot11sPeerManagerProtocol::PeerCleanup, this);
m_cleanupEvent = Simulator::Schedule (m_peerLinkCleanupPeriod, &PeerManagerProtocol::PeerCleanup, this);
}
bool
Dot11sPeerManagerProtocol::IsActiveLink (uint32_t interface, Mac48Address peerAddress)
PeerManagerProtocol::IsActiveLink (uint32_t interface, Mac48Address peerAddress)
{
PeerLinksMap::iterator iface = m_peerLinks.find (interface);
NS_ASSERT (iface != m_peerLinks.end());
@@ -363,14 +363,14 @@ Dot11sPeerManagerProtocol::IsActiveLink (uint32_t interface, Mac48Address peerAd
return false;
}
bool
Dot11sPeerManagerProtocol::ShouldSendOpen (uint32_t interface, Mac48Address peerAddress)
PeerManagerProtocol::ShouldSendOpen (uint32_t interface, Mac48Address peerAddress)
{
if (m_numberOfActivePeers > m_maxNumberOfPeerLinks)
return false;
return true;
}
bool
Dot11sPeerManagerProtocol::ShouldAcceptOpen (uint32_t interface, Mac48Address peerAddress, dot11sReasonCode & reasonCode)
PeerManagerProtocol::ShouldAcceptOpen (uint32_t interface, Mac48Address peerAddress, dot11sReasonCode & reasonCode)
{
if (m_numberOfActivePeers > m_maxNumberOfPeerLinks)
{
@@ -381,7 +381,7 @@ Dot11sPeerManagerProtocol::ShouldAcceptOpen (uint32_t interface, Mac48Address pe
}
#if 0
Time
Dot11sPeerManagerProtocol::GetNextBeaconShift (
PeerManagerProtocol::GetNextBeaconShift (
Mac48Address interfaceAddress,
Time myNextTBTT
)
@@ -464,7 +464,7 @@ Dot11sPeerManagerProtocol::GetNextBeaconShift (
#endif
void
Dot11sPeerManagerProtocol::PeerLinkStatus (uint32_t interface, Mac48Address peerAddress, bool status)
PeerManagerProtocol::PeerLinkStatus (uint32_t interface, Mac48Address peerAddress, bool status)
{
PeerManagerPluginMap::iterator plugin = m_plugins.find (interface);
NS_LOG_UNCOND(interface);

View File

@@ -34,16 +34,16 @@
#include <map>
namespace ns3 {
namespace dot11s {
class Dot11sPeerManagerMacPlugin;
class PeerManagerMacPlugin;
class PeerLink;
/**
* \ingroup dot11s
*/
class Dot11sPeerManagerProtocol : public Object
class PeerManagerProtocol : public Object
{
public:
Dot11sPeerManagerProtocol ();
~Dot11sPeerManagerProtocol ();
PeerManagerProtocol ();
~PeerManagerProtocol ();
static TypeId GetTypeId ();
bool AttachPorts(std::vector<Ptr<WifiNetDevice> >);
/** \brief Methods that handle beacon sending/receiving procedure.
@@ -134,7 +134,7 @@ private:
typedef std::map<uint32_t, PeerLinksOnInterface> PeerLinksMap;
typedef std::map<Mac48Address, BeaconInfo> BeaconsOnInterface;
typedef std::map<uint32_t, BeaconsOnInterface> BeaconInfoMap;
typedef std::map<uint32_t, Ptr<Dot11sPeerManagerMacPlugin> > PeerManagerPluginMap;
typedef std::map<uint32_t, Ptr<PeerManagerMacPlugin> > PeerManagerPluginMap;
private:
/**
* Return a position in beacon-storage for a given remote station