See 7.3.2.96 of 802.11s draft 2.07. More...
#include "ie-dot11s-preq.h"
Public Member Functions | |
IePreq () | |
~IePreq () | |
void | AddDestinationAddressElement (bool doFlag, bool rfFlag, Mac48Address dest_address, uint32_t dest_seq_number) |
Add a destination address unit: flags, destination and sequence number. More... | |
void | ClearDestinationAddressElements () |
Clear PREQ: remove all destinations. More... | |
void | DecrementTtl () |
Handle TTL. More... | |
void | DelDestinationAddressElement (Mac48Address dest_address) |
Delete a destination address unit by destination. More... | |
virtual uint8_t | DeserializeInformationField (Buffer::Iterator i, uint8_t length) |
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets) More... | |
virtual WifiInformationElementId | ElementId () const |
uint8_t | GetDestCount () const |
Get destination count. More... | |
std::vector< Ptr< DestinationAddressUnit > > | GetDestinationList () |
Get all destinations, which are stored in PREQ: More... | |
uint8_t | GetHopCount () const |
Get hop count value. More... | |
virtual uint8_t | GetInformationFieldSize () const |
Length of serialized information (i.e., the length of the body of the IE, not including the Element ID and length octets. More... | |
uint32_t | GetLifetime () const |
Get lifetime value. More... | |
uint32_t | GetMetric () const |
Get metric value. More... | |
Mac48Address | GetOriginatorAddress () const |
Get originator address value. More... | |
uint32_t | GetOriginatorSeqNumber () const |
Get originator sequence numnber value. More... | |
uint32_t | GetPreqID () const |
Get path discovery id field. More... | |
uint8_t | GetTtl () const |
Get TTL value. More... | |
void | IncrementMetric (uint32_t metric) |
Handle Metric: More... | |
bool | IsFull () const |
Is full function. More... | |
bool | IsNeedNotPrep () const |
Check whether Proactive PREP subfield to off. More... | |
bool | IsUnicastPreq () const |
Is unicast PREQ function. More... | |
bool | MayAddAddress (Mac48Address originator) |
Checks that preq's originator address equals to originator, and this preq is not proactive. More... | |
virtual void | Print (std::ostream &os) const |
Generate human-readable form of IE. More... | |
virtual void | SerializeInformationField (Buffer::Iterator i) const |
Serialize information (i.e., the body of the IE, not including the Element ID and length octets) More... | |
void | SetDestCount (uint8_t dest_count) |
Set destination count value. More... | |
void | SetHopcount (uint8_t hopcount) |
Set number of hops from originator to mesh STA transmitting this element. More... | |
void | SetLifetime (uint32_t lifetime) |
Set lifetime in TUs for the forwarding information to be considered valid. More... | |
void | SetMetric (uint32_t metric) |
Set metric value. More... | |
void | SetNeedNotPrep () |
Set Proactive PREP subfield to off. More... | |
void | SetOriginatorAddress (Mac48Address originator_address) |
Set originator address value. More... | |
void | SetOriginatorSeqNumber (uint32_t originator_seq_number) |
Set originator sequence number. More... | |
void | SetPreqID (uint32_t id) |
Set path discovery id field. More... | |
void | SetTTL (uint8_t ttl) |
Set remaining number of hops allowed for this element. More... | |
void | SetUnicastPreq () |
Set flag indicating that PREQ is unicast. More... | |
Public Member Functions inherited from ns3::WifiInformationElement | |
virtual | ~WifiInformationElement () |
Buffer::Iterator | Deserialize (Buffer::Iterator i) |
Deserialize entire IE, which must be present. More... | |
Buffer::Iterator | DeserializeIfPresent (Buffer::Iterator i) |
Deserialize entire IE if it is present. More... | |
uint16_t | GetSerializedSize () const |
Get the size of the serialized IE including Element ID and length fields. More... | |
virtual bool | operator== (WifiInformationElement const &a) const |
Compare two IEs for equality by ID & Length, and then through memcmp of serialised version. More... | |
Buffer::Iterator | Serialize (Buffer::Iterator i) const |
Serialize entire IE including Element ID and length fields. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< WifiInformationElement > | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
Private Attributes | |
uint8_t | m_destCount |
destination count More... | |
std::vector< Ptr< DestinationAddressUnit > > | m_destinations |
the destinations More... | |
uint8_t | m_flags |
flags More... | |
uint8_t | m_hopCount |
hop count More... | |
uint32_t | m_lifetime |
lifetime More... | |
uint8_t | m_maxSize |
how many destinations we support More... | |
uint32_t | m_metric |
metric More... | |
Mac48Address | m_originatorAddress |
originator address More... | |
uint32_t | m_originatorSeqNumber |
originator sequence number More... | |
uint32_t | m_preqId |
PREQ ID. More... | |
uint8_t | m_ttl |
TTL. More... | |
Friends | |
bool | operator== (const IePreq &a, const IePreq &b) |
equality operator More... | |
See 7.3.2.96 of 802.11s draft 2.07.
Definition at line 102 of file ie-dot11s-preq.h.
ns3::dot11s::IePreq::IePreq | ( | ) |
Definition at line 89 of file ie-dot11s-preq.cc.
ns3::dot11s::IePreq::~IePreq | ( | ) |
Definition at line 86 of file ie-dot11s-preq.cc.
void ns3::dot11s::IePreq::AddDestinationAddressElement | ( | bool | doFlag, |
bool | rfFlag, | ||
Mac48Address | dest_address, | ||
uint32_t | dest_seq_number | ||
) |
Add a destination address unit: flags, destination and sequence number.
doFlag | |
rfFlag | |
dest_address | |
dest_seq_number |
Definition at line 339 of file ie-dot11s-preq.cc.
References m_destCount, and m_destinations.
Referenced by MeshInformationElementVectorBist::DoRun(), ns3::dot11s::HwmpProtocolMac::RequestDestination(), and ns3::dot11s::HwmpProtocol::SendProactivePreq().
void ns3::dot11s::IePreq::ClearDestinationAddressElements | ( | ) |
Clear PREQ: remove all destinations.
Definition at line 373 of file ie-dot11s-preq.cc.
References m_destCount, and m_destinations.
void ns3::dot11s::IePreq::DecrementTtl | ( | ) |
void ns3::dot11s::IePreq::DelDestinationAddressElement | ( | Mac48Address | dest_address | ) |
Delete a destination address unit by destination.
dest_address | the destination address |
Definition at line 359 of file ie-dot11s-preq.cc.
References m_destCount, and m_destinations.
Referenced by ns3::dot11s::HwmpProtocol::ReceivePreq().
|
virtual |
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)
start | an iterator which points to where the information should be written. |
length |
Implements ns3::WifiInformationElement.
Definition at line 253 of file ie-dot11s-preq.cc.
References ns3::Buffer::Iterator::GetDistanceFrom(), m_destCount, m_destinations, m_flags, m_hopCount, m_lifetime, m_metric, m_originatorAddress, m_originatorSeqNumber, m_preqId, m_ttl, NS_ASSERT, ns3::ReadFrom(), ns3::Buffer::Iterator::ReadLsbtohU32(), ns3::Buffer::Iterator::ReadU8(), and visualizer.core::start().
|
virtual |
Implements ns3::WifiInformationElement.
Definition at line 96 of file ie-dot11s-preq.cc.
References IE_PREQ.
uint8_t ns3::dot11s::IePreq::GetDestCount | ( | ) | const |
Get destination count.
Definition at line 198 of file ie-dot11s-preq.cc.
References m_destCount.
Referenced by ns3::dot11s::HwmpProtocol::ReceivePreq().
std::vector< Ptr< DestinationAddressUnit > > ns3::dot11s::IePreq::GetDestinationList | ( | ) |
Get all destinations, which are stored in PREQ:
Definition at line 334 of file ie-dot11s-preq.cc.
References m_destinations.
Referenced by ns3::dot11s::HwmpProtocol::ReceivePreq().
uint8_t ns3::dot11s::IePreq::GetHopCount | ( | ) | const |
Get hop count value.
Definition at line 162 of file ie-dot11s-preq.cc.
References m_hopCount.
|
virtual |
Length of serialized information (i.e., the length of the body of the IE, not including the Element ID and length octets.
This is the value that will appear in the second octet of the entire IE - the length field)
Implements ns3::WifiInformationElement.
Definition at line 295 of file ie-dot11s-preq.cc.
References m_destCount, and m_maxSize.
Referenced by IsFull(), and MayAddAddress().
uint32_t ns3::dot11s::IePreq::GetLifetime | ( | void | ) | const |
Get lifetime value.
Definition at line 192 of file ie-dot11s-preq.cc.
References m_lifetime.
Referenced by ns3::dot11s::HwmpProtocol::ReceivePreq().
uint32_t ns3::dot11s::IePreq::GetMetric | ( | void | ) | const |
Get metric value.
Definition at line 177 of file ie-dot11s-preq.cc.
References m_metric.
Referenced by ns3::dot11s::HwmpProtocol::ReceivePreq().
Mac48Address ns3::dot11s::IePreq::GetOriginatorAddress | ( | ) | const |
Get originator address value.
Definition at line 182 of file ie-dot11s-preq.cc.
References m_originatorAddress.
Referenced by ns3::dot11s::HwmpProtocol::ReceivePreq().
uint32_t ns3::dot11s::IePreq::GetOriginatorSeqNumber | ( | ) | const |
Get originator sequence numnber value.
Definition at line 187 of file ie-dot11s-preq.cc.
References m_originatorSeqNumber.
Referenced by ns3::dot11s::HwmpProtocol::ReceivePreq().
uint32_t ns3::dot11s::IePreq::GetPreqID | ( | ) | const |
Get path discovery id field.
Definition at line 172 of file ie-dot11s-preq.cc.
References m_preqId.
uint8_t ns3::dot11s::IePreq::GetTtl | ( | void | ) | const |
void ns3::dot11s::IePreq::IncrementMetric | ( | uint32_t | metric | ) |
Handle Metric:
metric | the mteric to increment |
Definition at line 209 of file ie-dot11s-preq.cc.
References m_metric.
Referenced by ns3::dot11s::HwmpProtocol::ReceivePreq().
bool ns3::dot11s::IePreq::IsFull | ( | ) | const |
Is full function.
Definition at line 433 of file ie-dot11s-preq.cc.
References GetInformationFieldSize().
bool ns3::dot11s::IePreq::IsNeedNotPrep | ( | ) | const |
Check whether Proactive PREP subfield to off.
Definition at line 157 of file ie-dot11s-preq.cc.
References m_flags.
Referenced by ns3::dot11s::HwmpProtocol::ReceivePreq().
bool ns3::dot11s::IePreq::IsUnicastPreq | ( | ) | const |
Is unicast PREQ function.
Definition at line 152 of file ie-dot11s-preq.cc.
References m_flags.
bool ns3::dot11s::IePreq::MayAddAddress | ( | Mac48Address | originator | ) |
Checks that preq's originator address equals to originator, and this preq is not proactive.
originator | the originator address |
Definition at line 415 of file ie-dot11s-preq.cc.
References ns3::Mac48Address::GetBroadcast(), GetInformationFieldSize(), m_destinations, and m_originatorAddress.
|
virtual |
Generate human-readable form of IE.
os | output stream |
Reimplemented from ns3::WifiInformationElement.
Definition at line 317 of file ie-dot11s-preq.cc.
References m_destCount, m_destinations, m_hopCount, m_lifetime, m_metric, m_originatorAddress, m_originatorSeqNumber, m_preqId, and m_ttl.
Referenced by ns3::dot11s::operator<<().
|
virtual |
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
start | an iterator which points to where the information should be written. |
Implements ns3::WifiInformationElement.
Definition at line 214 of file ie-dot11s-preq.cc.
References m_destCount, m_destinations, m_flags, m_hopCount, m_lifetime, m_maxSize, m_metric, m_originatorAddress, m_originatorSeqNumber, m_preqId, m_ttl, ns3::Buffer::Iterator::WriteHtolsbU32(), ns3::WriteTo(), and ns3::Buffer::Iterator::WriteU8().
void ns3::dot11s::IePreq::SetDestCount | ( | uint8_t | dest_count | ) |
Set destination count value.
dest_count | the destination count |
Definition at line 147 of file ie-dot11s-preq.cc.
References m_destCount.
void ns3::dot11s::IePreq::SetHopcount | ( | uint8_t | hopcount | ) |
Set number of hops from originator to mesh STA transmitting this element.
hopcount | the hop count |
Definition at line 112 of file ie-dot11s-preq.cc.
References m_hopCount.
Referenced by MeshInformationElementVectorBist::DoRun(), ns3::dot11s::HwmpProtocolMac::RequestDestination(), and ns3::dot11s::HwmpProtocol::SendProactivePreq().
void ns3::dot11s::IePreq::SetLifetime | ( | uint32_t | lifetime | ) |
Set lifetime in TUs for the forwarding information to be considered valid.
lifetime | the lifetime in TUs |
Definition at line 142 of file ie-dot11s-preq.cc.
References m_lifetime.
Referenced by MeshInformationElementVectorBist::DoRun(), ns3::dot11s::HwmpProtocolMac::RequestDestination(), and ns3::dot11s::HwmpProtocol::SendProactivePreq().
void ns3::dot11s::IePreq::SetMetric | ( | uint32_t | metric | ) |
Set metric value.
metric | the metric |
Definition at line 127 of file ie-dot11s-preq.cc.
References m_metric.
void ns3::dot11s::IePreq::SetNeedNotPrep | ( | ) |
Set Proactive PREP subfield to off.
Definition at line 107 of file ie-dot11s-preq.cc.
References m_flags.
void ns3::dot11s::IePreq::SetOriginatorAddress | ( | Mac48Address | originator_address | ) |
Set originator address value.
originator_address | the originator MAC address |
Definition at line 132 of file ie-dot11s-preq.cc.
References m_originatorAddress.
Referenced by MeshInformationElementVectorBist::DoRun(), ns3::dot11s::HwmpProtocolMac::RequestDestination(), and ns3::dot11s::HwmpProtocol::SendProactivePreq().
void ns3::dot11s::IePreq::SetOriginatorSeqNumber | ( | uint32_t | originator_seq_number | ) |
Set originator sequence number.
originator_seq_number |
Definition at line 137 of file ie-dot11s-preq.cc.
References m_originatorSeqNumber.
Referenced by MeshInformationElementVectorBist::DoRun(), ns3::dot11s::HwmpProtocolMac::RequestDestination(), and ns3::dot11s::HwmpProtocol::SendProactivePreq().
void ns3::dot11s::IePreq::SetPreqID | ( | uint32_t | id | ) |
Set path discovery id field.
id | some unique id for this path discovery |
Definition at line 122 of file ie-dot11s-preq.cc.
References m_preqId.
Referenced by MeshInformationElementVectorBist::DoRun(), ns3::dot11s::HwmpProtocolMac::RequestDestination(), and ns3::dot11s::HwmpProtocol::SendProactivePreq().
void ns3::dot11s::IePreq::SetTTL | ( | uint8_t | ttl | ) |
Set remaining number of hops allowed for this element.
ttl | the TTL |
Definition at line 117 of file ie-dot11s-preq.cc.
References m_ttl.
Referenced by MeshInformationElementVectorBist::DoRun(), ns3::dot11s::HwmpProtocolMac::RequestDestination(), and ns3::dot11s::HwmpProtocol::SendProactivePreq().
void ns3::dot11s::IePreq::SetUnicastPreq | ( | ) |
Set flag indicating that PREQ is unicast.
Definition at line 101 of file ie-dot11s-preq.cc.
References m_flags.
equality operator
a | lhs |
b | rhs |
Definition at line 390 of file ie-dot11s-preq.cc.
|
private |
destination count
Definition at line 278 of file ie-dot11s-preq.h.
Referenced by AddDestinationAddressElement(), ClearDestinationAddressElements(), DelDestinationAddressElement(), DeserializeInformationField(), GetDestCount(), GetInformationFieldSize(), ns3::dot11s::operator==(), Print(), SerializeInformationField(), and SetDestCount().
|
private |
the destinations
Definition at line 279 of file ie-dot11s-preq.h.
Referenced by AddDestinationAddressElement(), ClearDestinationAddressElements(), DelDestinationAddressElement(), DeserializeInformationField(), GetDestinationList(), MayAddAddress(), ns3::dot11s::operator==(), Print(), and SerializeInformationField().
|
private |
flags
Definition at line 270 of file ie-dot11s-preq.h.
Referenced by DeserializeInformationField(), IsNeedNotPrep(), IsUnicastPreq(), ns3::dot11s::operator==(), SerializeInformationField(), SetNeedNotPrep(), and SetUnicastPreq().
|
private |
hop count
Definition at line 271 of file ie-dot11s-preq.h.
Referenced by DecrementTtl(), DeserializeInformationField(), GetHopCount(), ns3::dot11s::operator==(), Print(), SerializeInformationField(), and SetHopcount().
|
private |
lifetime
Definition at line 276 of file ie-dot11s-preq.h.
Referenced by DeserializeInformationField(), GetLifetime(), ns3::dot11s::operator==(), Print(), SerializeInformationField(), and SetLifetime().
|
private |
how many destinations we support
Definition at line 268 of file ie-dot11s-preq.h.
Referenced by GetInformationFieldSize(), and SerializeInformationField().
|
private |
metric
Definition at line 277 of file ie-dot11s-preq.h.
Referenced by DeserializeInformationField(), GetMetric(), IncrementMetric(), ns3::dot11s::operator==(), Print(), SerializeInformationField(), and SetMetric().
|
private |
originator address
Definition at line 274 of file ie-dot11s-preq.h.
Referenced by DeserializeInformationField(), GetOriginatorAddress(), MayAddAddress(), ns3::dot11s::operator==(), Print(), SerializeInformationField(), and SetOriginatorAddress().
|
private |
originator sequence number
Definition at line 275 of file ie-dot11s-preq.h.
Referenced by DeserializeInformationField(), GetOriginatorSeqNumber(), ns3::dot11s::operator==(), Print(), SerializeInformationField(), and SetOriginatorSeqNumber().
|
private |
PREQ ID.
Definition at line 273 of file ie-dot11s-preq.h.
Referenced by DeserializeInformationField(), GetPreqID(), ns3::dot11s::operator==(), Print(), SerializeInformationField(), and SetPreqID().
|
private |
TTL.
Definition at line 272 of file ie-dot11s-preq.h.
Referenced by DecrementTtl(), DeserializeInformationField(), GetTtl(), ns3::dot11s::operator==(), Print(), SerializeInformationField(), and SetTTL().