48 os <<
"TLV type = " << (uint32_t)
m_type <<
" TLV Length = " << (uint64_t)
m_length;
110 uint8_t sizeOfLen = 1;
115 uint64_t testValue = 0xFF;
137 for (
int j = 0; j < lenSize - 1; j++)
152 uint8_t lenSize = i.
ReadU8();
153 uint32_t serializedSize = 2;
161 for (
int j = 0; j < lenSize; j++)
172 NS_FATAL_ERROR(
"Not implemented-- please implement and contribute a patch");
176 NS_FATAL_ERROR(
"Not implemented-- please implement and contribute a patch");
180 NS_FATAL_ERROR(
"Not implemented-- please implement and contribute a patch");
196 NS_FATAL_ERROR(
"Not implemented-- please implement and contribute a patch");
200 NS_FATAL_ERROR(
"Not implemented-- please implement and contribute a patch");
207 return serializedSize;
256 size += (*iter)->GetSerializedSize();
266 (*iter)->Serialize(i);
267 i.
Next((*iter)->GetSerializedSize());
298 for (
auto iter =
Begin(); iter !=
End(); ++iter)
300 tmp->Add(
Tlv((*iter)->GetType(), (*iter)->GetLength(), *(*iter)->PeekValue()));
308 uint64_t serializedSize = 0;
309 while (serializedSize < valueLen)
313 uint8_t lenSize = i.
ReadU8();
323 for (
int j = 0; j < lenSize; j++)
345 NS_FATAL_ERROR(
"Not implemented-- please implement and contribute a patch");
465 serializedSize += size;
475 return serializedSize;
642 uint64_t serializedSize = 0;
645 while (serializedSize < valueLength)
659 for (
int j = 0; j < lenSize; j++)
683 return serializedSize;
694 for (
auto iter =
Begin(); iter !=
End(); ++iter)
696 tmp->Add(
Tlv((*iter)->GetType(), (*iter)->GetLength(), *(*iter)->PeekValue()));
711 for (
auto iter =
Begin(); iter !=
End(); ++iter)
713 tmp->Add(
Tlv((*iter)->GetType(), (*iter)->GetLength(), *(*iter)->PeekValue()));
721 uint64_t serializedSize = 0;
724 while (serializedSize < valueLength)
738 for (
int j = 0; j < lenSize; j++)
798 return serializedSize;
899 while (len < valueLength)
936 tmp->Add((*iter).PortLow, (*iter).PortHigh);
977 while (len < valueLength)
1051 while (len < valueLength)
1085 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 "IEEE Standard f...
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
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