9#ifndef WIFI_PREQ_INFORMATION_ELEMENT_H
10#define WIFI_PREQ_INFORMATION_ELEMENT_H
12#include "ns3/mac48-address.h"
13#include "ns3/mesh-information-element-vector.h"
36 void SetFlags(
bool doFlag,
bool rfFlag,
bool usnFlag);
251 void Print(std::ostream& os)
const override;
iterator in a Buffer instance
A template-based reference counting class.
Describes an address unit in PREQ information element See 7.3.2.96 for more details.
bool IsUsn() const
Is USN function.
uint32_t GetDestSeqNumber() const
Get destination sequence number.
friend bool operator==(const DestinationAddressUnit &a, const DestinationAddressUnit &b)
equality operator
bool IsRf() const
is RF function
void SetDestSeqNumber(uint32_t dest_seq_number)
Set destination sequence number.
Mac48Address m_destinationAddress
destination address
uint32_t m_destSeqNumber
destination sequence number
Mac48Address GetDestinationAddress() const
Get destination address function.
void SetFlags(bool doFlag, bool rfFlag, bool usnFlag)
Set flags function.
void SetDestinationAddress(Mac48Address dest_address)
Set destination address function.
bool IsDo() const
Is do function.
See 7.3.2.96 of 802.11s draft 2.07.
uint32_t GetOriginatorSeqNumber() const
Get originator sequence number value.
uint32_t m_originatorSeqNumber
originator sequence number
void DelDestinationAddressElement(Mac48Address dest_address)
Delete a destination address unit by destination.
uint8_t m_destCount
destination count
void SetHopcount(uint8_t hopcount)
Set number of hops from originator to mesh STA transmitting this element.
uint8_t GetDestCount() const
Get destination count.
void SetNeedNotPrep()
Set Proactive PREP subfield to off.
bool IsUnicastPreq() const
Is unicast PREQ function.
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
uint8_t GetHopCount() const
Get hop count value.
void SetUnicastPreq()
Set flag indicating that PREQ is unicast.
std::vector< Ptr< DestinationAddressUnit > > GetDestinationList()
Get all destinations, which are stored in PREQ:
void SetOriginatorSeqNumber(uint32_t originator_seq_number)
Set originator sequence number.
uint32_t GetMetric() const
Get metric value.
void SetTTL(uint8_t ttl)
Set remaining number of hops allowed for this element.
uint32_t m_preqId
PREQ ID.
void SetOriginatorAddress(Mac48Address originator_address)
Set originator address value.
void Print(std::ostream &os) const override
Generate human-readable form of IE.
friend bool operator==(const IePreq &a, const IePreq &b)
equality operator
Mac48Address GetOriginatorAddress() const
Get originator address value.
void DecrementTtl()
Handle TTL.
uint32_t GetPreqID() const
Get path discovery id field.
uint8_t m_hopCount
hop count
void ClearDestinationAddressElements()
Clear PREQ: remove all destinations.
void SetDestCount(uint8_t dest_count)
Set destination count value.
void SetMetric(uint32_t metric)
Set metric value.
bool IsFull() const
Is full function.
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
uint16_t DeserializeInformationField(Buffer::Iterator i, uint16_t length) override
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets)
bool MayAddAddress(Mac48Address originator)
Checks that preq's originator address equals to originator, and this preq is not proactive.
void SerializeInformationField(Buffer::Iterator i) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
uint8_t GetTtl() const
Get TTL value.
void SetPreqID(uint32_t id)
Set path discovery id field.
void IncrementMetric(uint32_t metric)
Handle Metric:
Mac48Address m_originatorAddress
originator address
uint8_t m_maxSize
how many destinations we support
uint32_t GetLifetime() const
Get lifetime value.
std::vector< Ptr< DestinationAddressUnit > > m_destinations
the destinations
void AddDestinationAddressElement(bool doFlag, bool rfFlag, Mac48Address dest_address, uint32_t dest_seq_number)
Add a destination address unit: flags, destination and sequence number.
bool IsNeedNotPrep() const
Check whether Proactive PREP subfield to off.
void SetLifetime(uint32_t lifetime)
Set lifetime in TUs for the forwarding information to be considered valid.
uint32_t m_lifetime
lifetime
bool operator==(const MeshHeader &a, const MeshHeader &b)
std::ostream & operator<<(std::ostream &os, const IeBeaconTiming &a)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.