Bug 881: Change WifiElementId to WifiInformationElementId
This commit is contained in:
@@ -62,7 +62,7 @@ IeBeaconTimingUnit::GetBeaconInterval () const
|
||||
/*******************************************
|
||||
* IeBeaconTiming
|
||||
*******************************************/
|
||||
WifiElementId
|
||||
WifiInformationElementId
|
||||
IeBeaconTiming::ElementId () const
|
||||
{
|
||||
return IE11S_BEACON_TIMING;
|
||||
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
* \name Inherited from WifiInformationElement
|
||||
* \{
|
||||
*/
|
||||
virtual WifiElementId ElementId () const;
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual uint8_t GetInformationSize () const;
|
||||
virtual void SerializeInformation (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformation (Buffer::Iterator i, uint8_t length);
|
||||
|
||||
@@ -93,7 +93,7 @@ Dot11sMeshCapability::Is (uint16_t cap, uint8_t n) const
|
||||
uint16_t mask = 1 << n;
|
||||
return (cap & mask);
|
||||
}
|
||||
WifiElementId
|
||||
WifiInformationElementId
|
||||
IeConfiguration::ElementId () const
|
||||
{
|
||||
return IE11S_MESH_CONFIGURATION;
|
||||
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
* \name Inherited from WifiInformationElement
|
||||
* \{
|
||||
*/
|
||||
virtual WifiElementId ElementId () const;
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual uint8_t GetInformationSize () const;
|
||||
virtual void SerializeInformation (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformation (Buffer::Iterator i, uint8_t length);
|
||||
|
||||
@@ -49,7 +49,7 @@ IeMeshId::IeMeshId (std::string s)
|
||||
len++;
|
||||
}
|
||||
}
|
||||
WifiElementId
|
||||
WifiInformationElementId
|
||||
IeMeshId::ElementId () const
|
||||
{
|
||||
return IE11S_MESH_ID;
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
* \name Inherited from WifiInformationElement
|
||||
* \{
|
||||
*/
|
||||
virtual WifiElementId ElementId () const;
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual void SerializeInformation (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformation (Buffer::Iterator start, uint8_t length);
|
||||
virtual void Print (std::ostream& os) const;
|
||||
|
||||
@@ -31,7 +31,7 @@ IeLinkMetricReport::IeLinkMetricReport (uint32_t metric)
|
||||
{
|
||||
m_metric = metric;
|
||||
}
|
||||
WifiElementId
|
||||
WifiInformationElementId
|
||||
IeLinkMetricReport::ElementId () const
|
||||
{
|
||||
return IE11S_LINK_METRIC_REPORT;
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
* \name Inherited from WifiInformationElement
|
||||
* \{
|
||||
*/
|
||||
virtual WifiElementId ElementId () const;
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual void SerializeInformation (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformation (Buffer::Iterator start, uint8_t length);
|
||||
virtual void Print (std::ostream& os) const;
|
||||
|
||||
@@ -30,7 +30,7 @@ IePeerManagement::IePeerManagement () :
|
||||
m_length (3), m_subtype (PEER_OPEN), m_localLinkId (0), m_peerLinkId (0), m_reasonCode (REASON11S_RESERVED)
|
||||
{
|
||||
}
|
||||
WifiElementId
|
||||
WifiInformationElementId
|
||||
IePeerManagement::ElementId () const
|
||||
{
|
||||
return IE11S_PEERING_MANAGEMENT;
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
* \name Inherited from WifiInformationElement
|
||||
* \{
|
||||
*/
|
||||
virtual WifiElementId ElementId () const;
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual uint8_t GetInformationSize (void) const;
|
||||
virtual void SerializeInformation (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformation (Buffer::Iterator i, uint8_t length);
|
||||
|
||||
@@ -30,7 +30,7 @@ IePeeringProtocol::IePeeringProtocol () :
|
||||
m_protocol (0)
|
||||
{
|
||||
}
|
||||
WifiElementId
|
||||
WifiInformationElementId
|
||||
IePeeringProtocol::ElementId () const
|
||||
{
|
||||
return IE11S_MESH_PEERING_PROTOCOL_VERSION;
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
* \name Inherited from WifiInformationElement
|
||||
* \{
|
||||
*/
|
||||
virtual WifiElementId ElementId () const;
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual uint8_t GetInformationSize () const;
|
||||
virtual void SerializeInformation (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformation (Buffer::Iterator i, uint8_t length);
|
||||
|
||||
@@ -29,7 +29,7 @@ IePerr::IePerr ()
|
||||
IePerr::~IePerr ()
|
||||
{
|
||||
}
|
||||
WifiElementId
|
||||
WifiInformationElementId
|
||||
IePerr::ElementId () const
|
||||
{
|
||||
return IE11S_PERR;
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
* \name Inherited from WifiInformationElement
|
||||
* \{
|
||||
*/
|
||||
virtual WifiElementId ElementId () const;
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual void SerializeInformation (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformation (Buffer::Iterator start, uint8_t length);
|
||||
virtual void Print (std::ostream& os) const;
|
||||
|
||||
@@ -36,7 +36,7 @@ IePrep::IePrep () :
|
||||
m_originatorSeqNumber (0)
|
||||
{
|
||||
}
|
||||
WifiElementId
|
||||
WifiInformationElementId
|
||||
IePrep::ElementId () const
|
||||
{
|
||||
return IE11S_PREP;
|
||||
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
* \name Inherited from WifiInformationElement
|
||||
* \{
|
||||
*/
|
||||
virtual WifiElementId ElementId () const;
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual void SerializeInformation (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformation (Buffer::Iterator start, uint8_t length);
|
||||
virtual uint8_t GetInformationSize () const;
|
||||
|
||||
@@ -92,7 +92,7 @@ IePreq::IePreq () :
|
||||
m_destCount (0)
|
||||
{
|
||||
}
|
||||
WifiElementId
|
||||
WifiInformationElementId
|
||||
IePreq::ElementId () const
|
||||
{
|
||||
return IE11S_PREQ;
|
||||
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
* \name Inherited from WifiInformationElement
|
||||
* \{
|
||||
*/
|
||||
virtual WifiElementId ElementId () const;
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual void SerializeInformation (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformation (Buffer::Iterator i, uint8_t length);
|
||||
virtual uint8_t GetInformationSize () const;
|
||||
|
||||
@@ -34,7 +34,7 @@ IeRann::IeRann () :
|
||||
m_destSeqNumber (0), m_metric (0)
|
||||
{
|
||||
}
|
||||
WifiElementId
|
||||
WifiInformationElementId
|
||||
IeRann::ElementId () const
|
||||
{
|
||||
return IE11S_RANN;
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
* \name Inherited from WifiInformationElement
|
||||
* \{
|
||||
*/
|
||||
virtual WifiElementId ElementId () const;
|
||||
virtual WifiInformationElementId ElementId () const;
|
||||
virtual void SerializeInformation (Buffer::Iterator i) const;
|
||||
virtual uint8_t DeserializeInformation (Buffer::Iterator start, uint8_t length);
|
||||
virtual uint8_t GetInformationSize () const;
|
||||
|
||||
@@ -184,7 +184,7 @@ PeerLinkFrameStart::Deserialize (Buffer::Iterator start)
|
||||
uint8_t id = i.ReadU8 ();
|
||||
uint8_t length = i.ReadU8 ();
|
||||
m_protocol.DeserializeInformation (i, length);
|
||||
if ((m_protocol.ElementId () != (WifiElementId) id) || (m_protocol.GetInformationSize () != length))
|
||||
if ((m_protocol.ElementId () != (WifiInformationElementId) id) || (m_protocol.GetInformationSize () != length))
|
||||
{
|
||||
NS_FATAL_ERROR ("Broken frame: Element ID does not match IE itself!");
|
||||
}
|
||||
@@ -207,7 +207,7 @@ PeerLinkFrameStart::Deserialize (Buffer::Iterator start)
|
||||
uint8_t id = i.ReadU8 ();
|
||||
uint8_t length = i.ReadU8 ();
|
||||
m_meshId.DeserializeInformation (i, length);
|
||||
if ((m_meshId.ElementId () != (WifiElementId) id) || (m_meshId.GetInformationSize () != length))
|
||||
if ((m_meshId.ElementId () != (WifiInformationElementId) id) || (m_meshId.GetInformationSize () != length))
|
||||
{
|
||||
NS_FATAL_ERROR ("Broken frame: Element ID does not match IE itself!");
|
||||
}
|
||||
@@ -218,7 +218,7 @@ PeerLinkFrameStart::Deserialize (Buffer::Iterator start)
|
||||
uint8_t id = i.ReadU8 ();
|
||||
uint8_t length = i.ReadU8 ();
|
||||
m_config. DeserializeInformation (i, length);
|
||||
if ((m_config.ElementId () != (WifiElementId) id) || (m_config.GetInformationSize () != length))
|
||||
if ((m_config.ElementId () != (WifiInformationElementId) id) || (m_config.GetInformationSize () != length))
|
||||
{
|
||||
NS_FATAL_ERROR ("Broken frame: Element ID does not match IE itself!");
|
||||
}
|
||||
|
||||
@@ -25,33 +25,33 @@
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
#define IE11S_LINK_METRIC_REPORT ((WifiElementId)20)
|
||||
#define IE11S_CONGESTION_NOTIFICATION ((WifiElementId)21)
|
||||
#define IE11S_SUPP_MBSS_REG_CLASSES_CHANNELS ((WifiElementId)23)
|
||||
#define IE11S_MESH_CHANNEL_SWITCH_ANNOUNCEMENT ((WifiElementId)24)
|
||||
#define IE11S_MESH_TIM ((WifiElementId)25)
|
||||
#define IE11S_AWAKE_WINDOW ((WifiElementId)26)
|
||||
#define IE11S_BEACON_TIMING ((WifiElementId)27)
|
||||
#define IE11S_MCCAOP_SETUP_REQUEST ((WifiElementId)28)
|
||||
#define IE11S_MCCAOP_SETUP_REPLY ((WifiElementId)29)
|
||||
#define IE11S_MCCAOP_ADVERTISEMENT ((WifiElementId)30)
|
||||
#define IE11S_MCCAOP_RESERVATION_TEARDOWN ((WifiElementId)31)
|
||||
#define IE11S_PORTAL_ANNOUNCEMENT ((WifiElementId)32)
|
||||
#define IE11S_PROXY_UPDATE ((WifiElementId)37)
|
||||
#define IE11S_PROXY_UPDATE_CONFIRMATION ((WifiElementId)38)
|
||||
#define IE11S_ABBREVIATED_HANDSHAKE ((WifiElementId)39)
|
||||
#define IE11S_LINK_METRIC_REPORT ((WifiInformationElementId)20)
|
||||
#define IE11S_CONGESTION_NOTIFICATION ((WifiInformationElementId)21)
|
||||
#define IE11S_SUPP_MBSS_REG_CLASSES_CHANNELS ((WifiInformationElementId)23)
|
||||
#define IE11S_MESH_CHANNEL_SWITCH_ANNOUNCEMENT ((WifiInformationElementId)24)
|
||||
#define IE11S_MESH_TIM ((WifiInformationElementId)25)
|
||||
#define IE11S_AWAKE_WINDOW ((WifiInformationElementId)26)
|
||||
#define IE11S_BEACON_TIMING ((WifiInformationElementId)27)
|
||||
#define IE11S_MCCAOP_SETUP_REQUEST ((WifiInformationElementId)28)
|
||||
#define IE11S_MCCAOP_SETUP_REPLY ((WifiInformationElementId)29)
|
||||
#define IE11S_MCCAOP_ADVERTISEMENT ((WifiInformationElementId)30)
|
||||
#define IE11S_MCCAOP_RESERVATION_TEARDOWN ((WifiInformationElementId)31)
|
||||
#define IE11S_PORTAL_ANNOUNCEMENT ((WifiInformationElementId)32)
|
||||
#define IE11S_PROXY_UPDATE ((WifiInformationElementId)37)
|
||||
#define IE11S_PROXY_UPDATE_CONFIRMATION ((WifiInformationElementId)38)
|
||||
#define IE11S_ABBREVIATED_HANDSHAKE ((WifiInformationElementId)39)
|
||||
/* begin of open80211s-compatible IDs */
|
||||
#define IE11S_MESH_CONFIGURATION ((WifiElementId)51)
|
||||
#define IE11S_MESH_ID ((WifiElementId)52)
|
||||
#define IE11S_PEERING_MANAGEMENT ((WifiElementId)55)
|
||||
#define IE11S_MESH_CONFIGURATION ((WifiInformationElementId)51)
|
||||
#define IE11S_MESH_ID ((WifiInformationElementId)52)
|
||||
#define IE11S_PEERING_MANAGEMENT ((WifiInformationElementId)55)
|
||||
/* end of open80211s-compatible IDs */
|
||||
#define IE11S_RANN ((WifiElementId)67)
|
||||
#define IE11S_RANN ((WifiInformationElementId)67)
|
||||
/* begin of open80211s-compatible IDs */
|
||||
#define IE11S_PREQ ((WifiElementId)68)
|
||||
#define IE11S_PREP ((WifiElementId)69)
|
||||
#define IE11S_PERR ((WifiElementId)70)
|
||||
#define IE11S_PREQ ((WifiInformationElementId)68)
|
||||
#define IE11S_PREP ((WifiInformationElementId)69)
|
||||
#define IE11S_PERR ((WifiInformationElementId)70)
|
||||
/* end of open80211s-compatible IDs */
|
||||
#define IE11S_MESH_PEERING_PROTOCOL_VERSION ((WifiElementId)74)
|
||||
#define IE11S_MESH_PEERING_PROTOCOL_VERSION ((WifiInformationElementId)74)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ WifiInformationElementVector::AddInformationElement (Ptr<WifiInformationElement>
|
||||
return true;
|
||||
}
|
||||
Ptr<WifiInformationElement>
|
||||
WifiInformationElementVector::FindFirst (WifiElementId id) const
|
||||
WifiInformationElementVector::FindFirst (WifiInformationElementId id) const
|
||||
{
|
||||
for (IE_VECTOR::const_iterator i = m_elements.begin (); i != m_elements.end (); i++)
|
||||
{
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
/// add an IE, if maxSize has exceeded, returns false
|
||||
bool AddInformationElement (Ptr<WifiInformationElement> element);
|
||||
/// vector of pointers to information elements is the body of IeVector
|
||||
Ptr<WifiInformationElement> FindFirst (WifiElementId id) const;
|
||||
Ptr<WifiInformationElement> FindFirst (WifiInformationElementId id) const;
|
||||
|
||||
virtual bool operator== (const WifiInformationElementVector & a) const;
|
||||
protected:
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
* Management. Information Elements (IEs) have a common format, each
|
||||
* starting with a single octet - the Element ID, which indicates the
|
||||
* specific type of IE (a type to represent the options here is
|
||||
* defined as WifiElementId). The next octet is a length field and
|
||||
* defined as WifiInformationElementId). The next octet is a length field and
|
||||
* encodes the number of octets in the third and final field, which is
|
||||
* the IE Information field.
|
||||
*
|
||||
@@ -67,55 +67,55 @@ namespace ns3 {
|
||||
* duplication of IE IDs in the #definitions below (and in files which
|
||||
* declare "subclasses" of WifiInformationElement). Sorry.
|
||||
*/
|
||||
typedef uint8_t WifiElementId;
|
||||
typedef uint8_t WifiInformationElementId;
|
||||
|
||||
|
||||
/**
|
||||
* Here we have definition of all Information Element IDs in IEEE
|
||||
* 802.11-2007. See the comments for WifiElementId - this could
|
||||
* 802.11-2007. See the comments for WifiInformationElementId - this could
|
||||
* probably be done in a considerably tidier manner.
|
||||
*/
|
||||
#define IE_SSID ((WifiElementId)0)
|
||||
#define IE_SUPPORTED_RATES ((WifiElementId)1)
|
||||
#define IE_FH_PARAMETER_SET ((WifiElementId)2)
|
||||
#define IE_DS_PARAMETER_SET ((WifiElementId)3)
|
||||
#define IE_CF_PARAMETER_SET ((WifiElementId)4)
|
||||
#define IE_TIM ((WifiElementId)5)
|
||||
#define IE_IBSS_PARAMETER_SET ((WifiElementId)6)
|
||||
#define IE_COUNTRY ((WifiElementId)7)
|
||||
#define IE_HOPPING_PATTERN_PARAMETERS ((WifiElementId)8)
|
||||
#define IE_HOPPING_PATTERN_TABLE ((WifiElementId)9)
|
||||
#define IE_REQUEST ((WifiElementId)10)
|
||||
#define IE_BSS_LOAD ((WifiElementId)11)
|
||||
#define IE_EDCA_PARAMETER_SET ((WifiElementId)12)
|
||||
#define IE_TSPEC ((WifiElementId)13)
|
||||
#define IE_TCLAS ((WifiElementId)14)
|
||||
#define IE_SCHEDULE ((WifiElementId)15)
|
||||
#define IE_CHALLENGE_TEXT ((WifiElementId)16)
|
||||
#define IE_SSID ((WifiInformationElementId)0)
|
||||
#define IE_SUPPORTED_RATES ((WifiInformationElementId)1)
|
||||
#define IE_FH_PARAMETER_SET ((WifiInformationElementId)2)
|
||||
#define IE_DS_PARAMETER_SET ((WifiInformationElementId)3)
|
||||
#define IE_CF_PARAMETER_SET ((WifiInformationElementId)4)
|
||||
#define IE_TIM ((WifiInformationElementId)5)
|
||||
#define IE_IBSS_PARAMETER_SET ((WifiInformationElementId)6)
|
||||
#define IE_COUNTRY ((WifiInformationElementId)7)
|
||||
#define IE_HOPPING_PATTERN_PARAMETERS ((WifiInformationElementId)8)
|
||||
#define IE_HOPPING_PATTERN_TABLE ((WifiInformationElementId)9)
|
||||
#define IE_REQUEST ((WifiInformationElementId)10)
|
||||
#define IE_BSS_LOAD ((WifiInformationElementId)11)
|
||||
#define IE_EDCA_PARAMETER_SET ((WifiInformationElementId)12)
|
||||
#define IE_TSPEC ((WifiInformationElementId)13)
|
||||
#define IE_TCLAS ((WifiInformationElementId)14)
|
||||
#define IE_SCHEDULE ((WifiInformationElementId)15)
|
||||
#define IE_CHALLENGE_TEXT ((WifiInformationElementId)16)
|
||||
// 17 to 31 are reserved in 802.11-2007
|
||||
#define IE_POWER_CONSTRAINT ((WifiElementId)32)
|
||||
#define IE_POWER_CAPABILITY ((WifiElementId)33)
|
||||
#define IE_TPC_REQUEST ((WifiElementId)34)
|
||||
#define IE_TPC_REPORT ((WifiElementId)35)
|
||||
#define IE_SUPPORTED_CHANNELS ((WifiElementId)36)
|
||||
#define IE_CHANNEL_SWITCH_ANNOUNCEMENT ((WifiElementId)37)
|
||||
#define IE_MEASUREMENT_REQUEST ((WifiElementId)38)
|
||||
#define IE_MEASUREMENT_REPORT ((WifiElementId)39)
|
||||
#define IE_QUIET ((WifiElementId)40)
|
||||
#define IE_IBSS_DFS ((WifiElementId)41)
|
||||
#define IE_ERP_INFORMATION ((WifiElementId)42)
|
||||
#define IE_TS_DELAY ((WifiElementId)43)
|
||||
#define IE_TCLAS_PROCESSING ((WifiElementId)44)
|
||||
#define IE_POWER_CONSTRAINT ((WifiInformationElementId)32)
|
||||
#define IE_POWER_CAPABILITY ((WifiInformationElementId)33)
|
||||
#define IE_TPC_REQUEST ((WifiInformationElementId)34)
|
||||
#define IE_TPC_REPORT ((WifiInformationElementId)35)
|
||||
#define IE_SUPPORTED_CHANNELS ((WifiInformationElementId)36)
|
||||
#define IE_CHANNEL_SWITCH_ANNOUNCEMENT ((WifiInformationElementId)37)
|
||||
#define IE_MEASUREMENT_REQUEST ((WifiInformationElementId)38)
|
||||
#define IE_MEASUREMENT_REPORT ((WifiInformationElementId)39)
|
||||
#define IE_QUIET ((WifiInformationElementId)40)
|
||||
#define IE_IBSS_DFS ((WifiInformationElementId)41)
|
||||
#define IE_ERP_INFORMATION ((WifiInformationElementId)42)
|
||||
#define IE_TS_DELAY ((WifiInformationElementId)43)
|
||||
#define IE_TCLAS_PROCESSING ((WifiInformationElementId)44)
|
||||
// 45 is reserved in 802.11-2007
|
||||
#define IE_QOS_CAPABILITY ((WifiElementId)46)
|
||||
#define IE_QOS_CAPABILITY ((WifiInformationElementId)46)
|
||||
// 47 is reserved in 802.11-2007
|
||||
#define IE_RSN ((WifiElementId)48)
|
||||
#define IE_RSN ((WifiInformationElementId)48)
|
||||
// 49 is reserved in 802.11-2007
|
||||
#define IE_EXTENDED_SUPPORTED_RATES ((WifiElementId)50)
|
||||
#define IE_EXTENDED_SUPPORTED_RATES ((WifiInformationElementId)50)
|
||||
// 51 to 126 are reserved in 802.11-2007
|
||||
#define IE_EXTENDED_CAPABILITIES ((WifiElementId)127)
|
||||
#define IE_EXTENDED_CAPABILITIES ((WifiInformationElementId)127)
|
||||
// 128 to 220 are reserved in 802.11-2007
|
||||
#define IE_VENDOR_SPECIFIC ((WifiElementId)221)
|
||||
#define IE_VENDOR_SPECIFIC ((WifiInformationElementId)221)
|
||||
// 222 to 255 are reserved in 802.11-2007
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
//\{
|
||||
virtual void Print (std::ostream &os) const = 0;
|
||||
/// Own unique Element ID
|
||||
virtual WifiElementId ElementId () const = 0;
|
||||
virtual WifiInformationElementId ElementId () const = 0;
|
||||
/// Length of serialized information
|
||||
virtual uint8_t GetInformationSize () const = 0;
|
||||
/// Serialize information
|
||||
|
||||
Reference in New Issue
Block a user