36 .SetGroupName (
"Wimax")
37 .AddConstructor<
Tlv> ()
49 os <<
"TLV type = " << (uint32_t)
m_type <<
" TLV Length = " << (uint64_t)
m_length;
111 uint8_t sizeOfLen = 1;
116 uint64_t testValue = 0xFF;
138 for (
int j = 0; j < lenSize - 1; j++)
153 uint8_t lenSize = i.
ReadU8 ();
154 uint32_t serializedSize = 2;
162 for (
int j = 0; j < lenSize; j++)
173 NS_FATAL_ERROR (
"Not implemented-- please implement and contribute a patch");
177 NS_FATAL_ERROR (
"Not implemented-- please implement and contribute a patch");
181 NS_FATAL_ERROR (
"Not implemented-- please implement and contribute a patch");
199 NS_FATAL_ERROR (
"Not implemented-- please implement and contribute a patch");
203 NS_FATAL_ERROR (
"Not implemented-- please implement and contribute a patch");
210 return serializedSize;
242 for (std::vector<Tlv*>::const_iterator iter =
m_tlvList->begin (); iter !=
m_tlvList->end (); ++iter)
254 for (std::vector<Tlv*>::const_iterator iter =
m_tlvList->begin (); iter !=
m_tlvList->end (); ++iter)
256 size += (*iter)->GetSerializedSize ();
264 for (std::vector<Tlv*>::const_iterator iter =
m_tlvList->begin (); iter !=
m_tlvList->end (); ++iter)
266 (*iter)->Serialize (i);
267 i.
Next ((*iter)->GetSerializedSize ());
299 for (std::vector<Tlv*>::const_iterator iter =
Begin (); iter !=
End (); ++iter)
301 tmp->
Add (
Tlv ((*iter)->GetType (), (*iter)->GetLength (), *(*iter)->PeekValue ()));
309 uint64_t serializedSize = 0;
310 while (serializedSize < valueLen)
312 uint8_t type = i.
ReadU8 ();
314 uint8_t lenSize = i.
ReadU8 ();
324 for (
int j = 0; j < lenSize; j++)
348 NS_FATAL_ERROR (
"Not implemented-- please implement and contribute a patch");
485 serializedSize += size;
495 return serializedSize;
650 uint64_t serializedSize = 0;
653 while (serializedSize < valueLength)
667 for (
int j = 0; j < lenSize; j++)
693 return serializedSize;
705 for (std::vector<Tlv*>::const_iterator iter =
Begin (); iter !=
End (); ++iter)
707 tmp->
Add (
Tlv ((*iter)->GetType (), (*iter)->GetLength (), *(*iter)->PeekValue ()));
722 for (std::vector<Tlv*>::const_iterator iter =
Begin (); iter !=
End (); ++iter)
724 tmp->
Add (
Tlv ((*iter)->GetType (), (*iter)->GetLength (), *(*iter)->PeekValue ()));
732 uint64_t serializedSize = 0;
735 while (serializedSize < valueLength)
749 for (
int j = 0; j < lenSize; j++)
817 return serializedSize;
898 for (std::vector<struct PortRange>::const_iterator iter =
m_portRange->begin (); iter !=
m_portRange->end (); ++iter)
908 while (len < valueLength)
941 for (std::vector<struct PortRange>::const_iterator iter =
m_portRange->begin (); iter !=
m_portRange->end (); ++iter)
943 tmp->
Add ((*iter).PortLow, (*iter).PortHigh);
973 for (std::vector<uint8_t>::const_iterator iter =
m_protocol->begin (); iter !=
m_protocol->end (); ++iter)
983 while (len < valueLength)
1013 for (std::vector<uint8_t>::const_iterator iter =
m_protocol->begin (); iter !=
m_protocol->end (); ++iter)
1024 m_ipv4Addr =
new std::vector<struct ipv4Addr>;
1046 for (std::vector<struct ipv4Addr>::const_iterator iter =
m_ipv4Addr->begin (); iter !=
m_ipv4Addr->end (); ++iter)
1057 while (len < valueLength)
1092 for (std::vector<struct ipv4Addr>::const_iterator iter =
m_ipv4Addr->begin (); iter !=
m_ipv4Addr->end (); ++iter)
1094 tmp->
Add ((*iter).Address, (*iter).Mask);
uint8_t GetLow(void) const
Get low part.
virtual uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength)
Deserialize from a buffer.
uint64_t GetLength(void) const
Get length value.
virtual uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength)
Deserialize from a buffer.
virtual uint32_t GetSerializedSize(void) const
Get serialized size in bytes.
virtual uint32_t GetSerializedSize(void) const
std::vector< struct ipv4Addr >::const_iterator Iterator
IPv4 address vector iterator typedef.
std::vector< uint8_t >::const_iterator Iterator
Iterator typedef.
virtual void Serialize(Buffer::Iterator start) const
Serialize to a buffer.
NS_ASSERT_MSG(false, "Ipv4AddressGenerator::MaskToIndex(): Impossible")
Iterator Begin() const
Begin iterator.
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
a class to represent an Ipv4 address mask
virtual uint32_t GetSerializedSize(void) const =0
Get serialized size in bytes.
virtual uint32_t Deserialize(Buffer::Iterator start)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void Add(uint16_t portLow, uint16_t portHigh)
Add a range.
Iterator End() const
End iterator.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Iterator End() const
End iterator.
this class implements the convergence sub-layer descriptor as a tlv vector
virtual PortRangeTlvValue * Copy(void) const
Copy.
virtual uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength)
Deserialize from a buffer.
virtual uint32_t GetSerializedSize(void) const
Get serialized size in bytes.
Ipv4AddressTlvValue class.
virtual void Serialize(Buffer::Iterator start) const
Serialize to a buffer.
uint32_t ReadNtohU32(void)
virtual void Print(std::ostream &os) const
This class implements the Type-Len-Value structure channel encodings as described by "IEEE Standard f...
virtual uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength)
Deserialize from a buffer.
iterator in a Buffer instance
The value field of a tlv can take different values (uint8_t, uint16, vector, ...).
Tlv * Copy(void) const
Copy TLV.
std::vector< struct ipv4Addr > * m_ipv4Addr
ipv4 addr
uint8_t GetSizeOfLen(void) const
Get size of length field.
void Add(const Tlv &val)
Add a TLV.
virtual U32TlvValue * Copy(void) const
Copy.
virtual uint32_t GetSerializedSize(void) const
Get serialized size in bytes.
std::vector< struct PortRange >::const_iterator Iterator
PortRange vector iterator typedef.
virtual void Serialize(Buffer::Iterator start) const
Serialize to a buffer.
virtual uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength)
Deserialize from a buffer.
virtual uint32_t GetSerializedSize(void) const
Get serialized size in bytes.
#define WIMAX_TLV_EXTENDED_LENGTH_MASK
Iterator Begin() const
Begin iterator.
virtual CsParamVectorTlvValue * Copy(void) const
Copy.
std::vector< Tlv * > * m_tlvList
tlv list
uint8_t GetMask(void) const
Get the mask.
virtual TosTlvValue * Copy() const
Copy.
Iterator Begin() const
Begin iterator.
uint32_t GetValue(void) const
Get value.
static TypeId GetTypeId(void)
Register this type.
void WriteHtonU16(uint16_t data)
uint8_t GetHigh(void) const
Get high part.
virtual TlvValue * Copy(void) const =0
Copy function.
void Next(void)
go forward by one byte
uint8_t GetType(void) const
Get type value.
virtual uint32_t GetSerializedSize(void) const
Get serialized size in bytes.
Iterator End() const
End iterator.
std::vector< uint8_t > * m_protocol
protocol
Iterator Begin() const
Begin iterator.
virtual uint32_t GetSerializedSize(void) const
Get serialized size in bytes.
virtual uint32_t GetSerializedSize(void) const
Get serialized size in bytes.
void Add(uint8_t protocol)
Add protocol number.
virtual void Serialize(Buffer::Iterator start) const
Serialize to a buffer.
uint8_t GetValue(void) const
Get value.
Ipv4Address Address
address
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::vector< struct PortRange > * m_portRange
port range
U8TlvValue * Copy(void) const
Copy.
TlvValue * PeekValue(void)
Peek value.
ClassificationRuleVectorTlvValue()
virtual void Serialize(Buffer::Iterator start) const
Serialize to a buffer.
this class implements the classifier descriptor as a tlv vector
uint16_t GetValue(void) const
Get value.
virtual Ipv4AddressTlvValue * Copy() const
Copy function.
void WriteHtonU32(uint32_t data)
Iterator End() const
End iterator.
virtual uint32_t GetSerializedSize(void) const
Get serialized size in bytes.
virtual SfVectorTlvValue * Copy(void) const
Copy.
Tlv & operator=(Tlv const &o)
assignment operator
Ipv4 addresses are stored in host order in this class.
virtual uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLen)
Deserialize from a buffer.
void WriteU8(uint8_t data)
virtual uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLen)
Deserialize from a buffer.
virtual ProtocolTlvValue * Copy(void) const
Copy.
virtual void Serialize(Buffer::Iterator start) const
Serialize to a buffer.
virtual ClassificationRuleVectorTlvValue * Copy(void) const
Copy.
virtual U16TlvValue * Copy(void) const
Copy.
virtual void Serialize(Buffer::Iterator start) const =0
Serialize to a buffer.
virtual void Serialize(Buffer::Iterator start) const
void Add(Ipv4Address address, Ipv4Mask Mask)
Add IPv4 address and mask.
TlvValue * CopyValue(void) const
Copy TlvValue.
uint16_t ReadNtohU16(void)
std::vector< Tlv * >::const_iterator Iterator
TLV vector iterator typedef.
virtual void Serialize(Buffer::Iterator start) const
Serialize to a buffer.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
virtual void Serialize(Buffer::Iterator start) const
Serialize to a buffer.
virtual uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength)
Deserialize from a buffer.
virtual uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength)
Deserialize from a buffer.
virtual uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLen)
Deserialize from a buffer.