99 uint8_t sizeOfLen = 1;
104 uint64_t testValue = 0xFF;
126 for (
int j = 0; j < lenSize - 1; j++)
141 uint8_t lenSize = i.
ReadU8();
149 lenSize &= ~WIMAX_TLV_EXTENDED_LENGTH_MASK;
150 for (
int j = 0; j < lenSize; j++)
161 NS_FATAL_ERROR(
"Not implemented-- please implement and contribute a patch");
165 NS_FATAL_ERROR(
"Not implemented-- please implement and contribute a patch");
169 NS_FATAL_ERROR(
"Not implemented-- please implement and contribute a patch");
185 NS_FATAL_ERROR(
"Not implemented-- please implement and contribute a patch");
189 NS_FATAL_ERROR(
"Not implemented-- please implement and contribute a patch");
196 return serializedSize;
245 size += (*iter)->GetSerializedSize();
255 (*iter)->Serialize(i);
256 i.
Next((*iter)->GetSerializedSize());
287 for (
auto iter =
Begin(); iter !=
End(); ++iter)
289 tmp->Add(
Tlv((*iter)->GetType(), (*iter)->GetLength(), *(*iter)->PeekValue()));
297 uint64_t serializedSize = 0;
298 while (serializedSize < valueLen)
300 uint8_t type = i.
ReadU8();
302 uint8_t lenSize = i.
ReadU8();
311 lenSize &= ~WIMAX_TLV_EXTENDED_LENGTH_MASK;
312 for (
int j = 0; j < lenSize; j++)
334 NS_FATAL_ERROR(
"Not implemented-- please implement and contribute a patch");
447 serializedSize += size;
457 return serializedSize;
624 uint64_t serializedSize = 0;
627 while (serializedSize < valueLength)
640 lenSize &= ~WIMAX_TLV_EXTENDED_LENGTH_MASK;
641 for (
int j = 0; j < lenSize; j++)
665 return serializedSize;
676 for (
auto iter =
Begin(); iter !=
End(); ++iter)
678 tmp->Add(
Tlv((*iter)->GetType(), (*iter)->GetLength(), *(*iter)->PeekValue()));
693 for (
auto iter =
Begin(); iter !=
End(); ++iter)
695 tmp->Add(
Tlv((*iter)->GetType(), (*iter)->GetLength(), *(*iter)->PeekValue()));
703 uint64_t serializedSize = 0;
706 while (serializedSize < valueLength)
719 lenSize &= ~WIMAX_TLV_EXTENDED_LENGTH_MASK;
720 for (
int j = 0; j < lenSize; j++)
732 Add(
Tlv(Priority, 1, val));
780 return serializedSize;
881 while (len < valueLength)
918 tmp->Add((*iter).PortLow, (*iter).PortHigh);
959 while (len < valueLength)
1033 while (len < valueLength)
1067 tmp->Add((*iter).Address, (*iter).Mask);
iterator in a Buffer instance
void WriteU8(uint8_t data)
void WriteHtonU16(uint16_t data)
void WriteHtonU32(uint32_t data)
void Next()
go forward by one byte
this class implements the classifier descriptor as a tlv vector
ClassificationRuleVectorTlvValue()
ClassificationRuleVectorTlvValue * Copy() const override
Copy.
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override
Deserialize from a buffer.
this class implements the convergence sub-layer descriptor as a tlv vector
CsParamVectorTlvValue * Copy() const override
Copy.
@ Packet_Classification_Rule
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override
Deserialize from a buffer.
Ipv4 addresses are stored in host order in this class.
Ipv4AddressTlvValue class.
Iterator End() const
End iterator.
std::vector< Ipv4Addr >::const_iterator Iterator
IPv4 address vector iterator typedef.
void Serialize(Buffer::Iterator start) const override
Serialize to a buffer.
void Add(Ipv4Address address, Ipv4Mask mask)
Add IPv4 address and mask.
std::vector< Ipv4Addr > * m_ipv4Addr
ipv4 addr
Ipv4AddressTlvValue * Copy() const override
Copy function.
uint32_t GetSerializedSize() const override
Get serialized size in bytes.
Iterator Begin() const
Begin iterator.
~Ipv4AddressTlvValue() override
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override
Deserialize from a buffer.
a class to represent an Ipv4 address mask
uint32_t GetSerializedSize() const override
Get serialized size in bytes.
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override
Deserialize from a buffer.
std::vector< PortRange > * m_portRange
port range
std::vector< PortRange >::const_iterator Iterator
PortRange vector iterator typedef.
Iterator End() const
End iterator.
void Serialize(Buffer::Iterator start) const override
Serialize to a buffer.
~PortRangeTlvValue() override
Iterator Begin() const
Begin iterator.
void Add(uint16_t portLow, uint16_t portHigh)
Add a range.
PortRangeTlvValue * Copy() const override
Copy.
~ProtocolTlvValue() override
std::vector< uint8_t > * m_protocol
protocol
void Add(uint8_t protocol)
Add protocol number.
Iterator Begin() const
Begin iterator.
uint32_t GetSerializedSize() const override
Get serialized size in bytes.
ProtocolTlvValue * Copy() const override
Copy.
std::vector< uint8_t >::const_iterator Iterator
Iterator typedef.
Iterator End() const
End iterator.
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override
Deserialize from a buffer.
void Serialize(Buffer::Iterator start) const override
Serialize to a buffer.
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override
Deserialize from a buffer.
@ Fixed_length_versus_Variable_length_SDU_Indicator
@ ARQ_RETRY_TIMEOUT_Transmitter_Delay
@ Maximum_Sustained_Traffic_Rate
@ Request_Transmission_Policy
@ ARQ_RETRY_TIMEOUT_Receiver_Delay
@ Minimum_Reserved_Traffic_Rate
@ Minimum_Tolerable_Traffic_Rate
@ Service_Flow_Scheduling_Type
SfVectorTlvValue * Copy() const override
Copy.
This class implements the Type-Len-Value structure channel encodings as described by "IEEEStandard fo...
TlvValue * CopyValue() const
Copy TlvValue.
Tlv * Copy() const
Copy TLV.
uint8_t GetType() const
Get type value.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Tlv & operator=(const Tlv &o)
assignment operator
TlvValue * PeekValue()
Peek value.
static TypeId GetTypeId()
Register this type.
uint64_t GetLength() const
Get length value.
@ VENDOR_SPECIFIC_INFORMATION
uint8_t GetSizeOfLen() const
Get size of length field.
void Print(std::ostream &os) const override
uint32_t GetSerializedSize() const override
void Serialize(Buffer::Iterator start) const override
uint32_t Deserialize(Buffer::Iterator start) override
The value field of a tlv can take different values (uint8_t, uint16, vector, ...).
virtual uint32_t GetSerializedSize() const =0
Get serialized size in bytes.
virtual TlvValue * Copy() const =0
Copy function.
virtual void Serialize(Buffer::Iterator start) const =0
Serialize to a buffer.
void Serialize(Buffer::Iterator start) const override
Serialize to a buffer.
uint8_t GetHigh() const
Get high part.
uint32_t GetSerializedSize() const override
Get serialized size in bytes.
uint8_t GetLow() const
Get low part.
uint8_t GetMask() const
Get the mask.
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override
Deserialize from a buffer.
TosTlvValue * Copy() const override
Copy.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
void Serialize(Buffer::Iterator start) const override
Serialize to a buffer.
U16TlvValue * Copy() const override
Copy.
uint32_t GetSerializedSize() const override
Get serialized size in bytes.
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLen) override
Deserialize from a buffer.
uint16_t GetValue() const
Get value.
uint32_t GetValue() const
Get value.
uint32_t GetSerializedSize() const override
Get serialized size in bytes.
void Serialize(Buffer::Iterator start) const override
Serialize to a buffer.
U32TlvValue * Copy() const override
Copy.
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLen) override
Deserialize from a buffer.
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLen) override
Deserialize from a buffer.
uint8_t GetValue() const
Get value.
uint32_t GetSerializedSize() const override
Get serialized size in bytes.
void Serialize(Buffer::Iterator start) const override
Serialize to a buffer.
U8TlvValue * Copy() const override
Copy.
uint32_t GetSerializedSize() const override
Get serialized size in bytes.
~VectorTlvValue() override
std::vector< Tlv * >::const_iterator Iterator
TLV vector iterator typedef.
void Serialize(Buffer::Iterator start) const override
Serialize to a buffer.
Iterator End() const
End iterator.
Iterator Begin() const
Begin iterator.
void Add(const Tlv &val)
Add a TLV.
std::vector< Tlv * > * m_tlvList
tlv list
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
#define WIMAX_TLV_EXTENDED_LENGTH_MASK