A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
wimax-tlv.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2009 INRIA, UDcast
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
18 *
19 */
20
21#ifndef WIMAX_TLV_H
22#define WIMAX_TLV_H
23
24#define WIMAX_TLV_EXTENDED_LENGTH_MASK 0x80
25
26#include "ns3/assert.h"
27#include "ns3/header.h"
28#include "ns3/ipv4-address.h"
29#include "ns3/log.h"
30#include "ns3/uinteger.h"
31
32#include <cstdlib>
33#include <vector>
34
35namespace ns3
36{
37
38/**
39 * \ingroup wimax
40 * The value field of a tlv can take different values (uint8_t, uint16,
41 * vector, ...). This class is a virtual interface
42 * from which all the types of tlv values should derive
43 */
45{
46 public:
47 virtual ~TlvValue()
48 {
49 }
50
51 /**
52 * Get serialized size in bytes
53 * \returns the serialized size
54 */
55 virtual uint32_t GetSerializedSize() const = 0;
56 /**
57 * Serialize to a buffer
58 * \param start the iterator
59 */
60 virtual void Serialize(Buffer::Iterator start) const = 0;
61 /**
62 * Deserialize from a buffer
63 * \param start the iterator
64 * \param valueLen the maximum length of the value
65 * \returns the
66 */
67 virtual uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLen) = 0;
68 /**
69 * Copy function
70 * \returns the TLV value
71 */
72 virtual TlvValue* Copy() const = 0;
73
74 private:
75};
76
77// =============================================================================
78/**
79 * \ingroup wimax
80 * \brief This class implements the Type-Len-Value structure channel encodings as described by "IEEE
81 * Standard for Local and metropolitan area networks Part 16: Air Interface for Fixed Broadband
82 * Wireless Access Systems"
83 * 11. TLV encodings, page 645
84 *
85 */
86class Tlv : public Header
87{
88 public:
89 /// CommonTypes enumeration
91 {
99 };
100
101 /**
102 * Constructor
103 *
104 * \param type type
105 * \param length the length
106 * \param value TLV value
107 */
108 Tlv(uint8_t type, uint64_t length, const TlvValue& value);
109 Tlv();
110 ~Tlv() override;
111 /**
112 * Register this type.
113 * \return the TypeId.
114 */
115 static TypeId GetTypeId();
116 TypeId GetInstanceTypeId() const override;
117 void Print(std::ostream& os) const override;
118 uint32_t GetSerializedSize() const override;
119 void Serialize(Buffer::Iterator start) const override;
120 uint32_t Deserialize(Buffer::Iterator start) override;
121 /**
122 * Get size of length field
123 * \returns the size of length field
124 */
125 uint8_t GetSizeOfLen() const;
126 /**
127 * Get type value
128 * \returns the type
129 */
130 uint8_t GetType() const;
131 /**
132 * Get length value
133 * \returns the length
134 */
135 uint64_t GetLength() const;
136 /**
137 * Peek value
138 * \returns the TLV value
139 */
141 /**
142 * Copy TLV
143 * \returns a pointer to a TLV copy
144 */
145 Tlv* Copy() const;
146 /**
147 * Copy TlvValue
148 * \returns the TLV value
149 */
150 TlvValue* CopyValue() const;
151 /**
152 * assignment operator
153 * \param o the TLV to assign
154 * \returns the TLV
155 */
156 Tlv& operator=(const Tlv& o);
157 /**
158 * type conversion operator
159 * \param tlv the TLV
160 */
161 Tlv(const Tlv& tlv);
162
163 private:
164 uint8_t m_type; ///< type
165 uint64_t m_length; ///< length
166 TlvValue* m_value; ///< value
167};
168
169// ==============================================================================
170/**
171 * \ingroup wimax
172 * \brief U8TlvValue class
173 */
174class U8TlvValue : public TlvValue
175{
176 public:
177 /**
178 * Constructor
179 *
180 * \param value value to encode
181 */
182 U8TlvValue(uint8_t value);
183 U8TlvValue();
184 ~U8TlvValue() override;
185 uint32_t GetSerializedSize() const override;
186 void Serialize(Buffer::Iterator start) const override;
187 uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLen) override;
188 /**
189 * Deserialize from a buffer
190 * \param start the iterator
191 * \returns the size of the item
192 */
194 /**
195 * Get value
196 * \returns the value
197 */
198 uint8_t GetValue() const;
199 /**
200 * Copy
201 * \returns a U8 TLV value
202 */
203 U8TlvValue* Copy() const override;
204
205 private:
206 uint8_t m_value; ///< value
207};
208
209// ==============================================================================
210/**
211 * \ingroup wimax
212 * \brief U16TlvValue class
213 */
214class U16TlvValue : public TlvValue
215{
216 public:
217 /**
218 * Constructor
219 *
220 * \param value value to encode
221 */
222 U16TlvValue(uint16_t value);
223 U16TlvValue();
224 ~U16TlvValue() override;
225 uint32_t GetSerializedSize() const override;
226 void Serialize(Buffer::Iterator start) const override;
227 uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLen) override;
228 /**
229 * Deserialize from a buffer
230 * \param start the iterator
231 * \returns the size
232 */
234 /**
235 * Get value
236 * \returns the value
237 */
238 uint16_t GetValue() const;
239 /**
240 * Copy
241 * \returns the U16 TLV value
242 */
243 U16TlvValue* Copy() const override;
244
245 private:
246 uint16_t m_value; ///< value
247};
248
249// ==============================================================================
250/**
251 * \ingroup wimax
252 * \brief U32TlvValue class
253 */
254class U32TlvValue : public TlvValue
255{
256 public:
257 /**
258 * Constructor
259 *
260 * \param value to encode
261 */
262 U32TlvValue(uint32_t value);
263 U32TlvValue();
264 ~U32TlvValue() override;
265
266 uint32_t GetSerializedSize() const override;
267 void Serialize(Buffer::Iterator start) const override;
268 uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLen) override;
269 /**
270 * Deserialize from a buffer
271 * \param start the iterator
272 * \returns the size
273 */
275 /**
276 * Get value
277 * \returns the value
278 */
279 uint32_t GetValue() const;
280 /**
281 * Copy
282 * \returns the U32 TLV Value
283 */
284 U32TlvValue* Copy() const override;
285
286 private:
287 uint32_t m_value; ///< value
288};
289
290// ==============================================================================
291
292/**
293 * \ingroup wimax
294 * \brief this class is used to implement a vector of values in one tlv value field
295 */
297{
298 public:
299 /// TLV vector iterator typedef
300 typedef std::vector<Tlv*>::const_iterator Iterator;
302 ~VectorTlvValue() override;
303 uint32_t GetSerializedSize() const override;
304 void Serialize(Buffer::Iterator start) const override;
305 uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override = 0;
306 /**
307 * Begin iterator
308 * \returns the beginning element
309 */
310 Iterator Begin() const;
311 /**
312 * End iterator
313 * \returns the ending element
314 */
315 Iterator End() const;
316 /**
317 * Add a TLV
318 * \param val the TLV value
319 */
320 void Add(const Tlv& val);
321 /**
322 * Copy
323 * \returns the vector TLV value
324 */
325 VectorTlvValue* Copy() const override = 0;
326
327 private:
328 std::vector<Tlv*>* m_tlvList; ///< tlv list
329};
330
331// ==============================================================================
332/**
333 * \ingroup wimax
334 * \brief SfVectorTlvValue class
335 */
337{
338 public:
339 /// Type enumeration
340 enum Type
341 {
342 SFID = 1,
343 CID = 2,
371 };
372
374 uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override;
375 SfVectorTlvValue* Copy() const override;
376};
377
378// ==============================================================================
379
380/**
381 * \ingroup wimax
382 * \brief this class implements the convergence sub-layer descriptor as a tlv vector
383 */
385{
386 public:
387 /// Type enumeration
388 enum Type
389 {
392 };
393
395 uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override;
396 CsParamVectorTlvValue* Copy() const override;
397
398 private:
399};
400
401// ==============================================================================
402
403/**
404 * \ingroup wimax
405 * \brief this class implements the classifier descriptor as a tlv vector
406 */
408{
409 public:
410 /// ClassificationRuleTlvType enumeration
412 {
414 ToS = 2,
420 Index = 14,
421 };
422
424 uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override;
425 ClassificationRuleVectorTlvValue* Copy() const override;
426
427 private:
428};
429
430// ==============================================================================
431/**
432 * \ingroup wimax
433 * \brief TosTlvValue class
434 */
435class TosTlvValue : public TlvValue
436{
437 public:
438 TosTlvValue();
439 /**
440 * Constructor
441 *
442 * \param low low value
443 * \param high high value
444 * \param mask the mask
445 */
446 TosTlvValue(uint8_t low, uint8_t high, uint8_t mask);
447 ~TosTlvValue() override;
448 uint32_t GetSerializedSize() const override;
449 void Serialize(Buffer::Iterator start) const override;
450 uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override;
451 /**
452 * Get low part
453 * \returns the low part
454 */
455 uint8_t GetLow() const;
456 /**
457 * Get high part
458 * \returns the high part
459 */
460 uint8_t GetHigh() const;
461 /**
462 * Get the mask
463 * \returns the mask
464 */
465 uint8_t GetMask() const;
466 /**
467 * Copy
468 * \returns the TOS TLV value
469 */
470 TosTlvValue* Copy() const override;
471
472 private:
473 uint8_t m_low; ///< low
474 uint8_t m_high; ///< high
475 uint8_t m_mask; ///< mask
476};
477
478// ==============================================================================
479/**
480 * \ingroup wimax
481 * \brief PortRangeTlvValue class
482 */
484{
485 public:
486 /// PortRange structure
488 {
489 uint16_t PortLow; ///< low
490 uint16_t PortHigh; ///< high
491 };
492
493 /// PortRange vector iterator typedef
494 typedef std::vector<PortRange>::const_iterator Iterator;
496 ~PortRangeTlvValue() override;
497 uint32_t GetSerializedSize() const override;
498 void Serialize(Buffer::Iterator start) const override;
499 uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override;
500 /**
501 * Add a range
502 * \param portLow the low port of the range
503 * \param portHigh the high port of the range
504 */
505 void Add(uint16_t portLow, uint16_t portHigh);
506 /**
507 * Begin iterator
508 * \returns the beginning element
509 */
510 Iterator Begin() const;
511 /**
512 * End iterator
513 * \returns the ending element
514 */
515 Iterator End() const;
516 /**
517 * Copy
518 * \returns the port range tlv value
519 */
520 PortRangeTlvValue* Copy() const override;
521
522 private:
523 std::vector<PortRange>* m_portRange; ///< port range
524};
525
526// ==============================================================================
527/**
528 * \ingroup wimax
529 * \brief ProtocolTlvValue class
530 */
532{
533 public:
535 ~ProtocolTlvValue() override;
536 /// Iterator typedef
537 typedef std::vector<uint8_t>::const_iterator Iterator;
538 uint32_t GetSerializedSize() const override;
539 void Serialize(Buffer::Iterator start) const override;
540 uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override;
541 /**
542 * Add protocol number
543 * \param protocol the protocol number
544 */
545 void Add(uint8_t protocol);
546 /**
547 * Begin iterator
548 * \returns the beginning element
549 */
550 Iterator Begin() const;
551 /**
552 * End iterator
553 * \return the ending element
554 */
555 Iterator End() const;
556 /**
557 * Copy
558 * \returns the protocol tlv value
559 */
560 ProtocolTlvValue* Copy() const override;
561
562 private:
563 std::vector<uint8_t>* m_protocol; ///< protocol
564};
565
566// ==============================================================================
567
568/**
569 * \ingroup wimax
570 * \brief Ipv4AddressTlvValue class
571 */
573{
574 public:
575 /// Ipv4Addr structure
576 struct Ipv4Addr
577 {
578 Ipv4Address Address; ///< address
579 Ipv4Mask Mask; ///< mask
580 };
581
582 /// IPv4 address vector iterator typedef
583 typedef std::vector<Ipv4Addr>::const_iterator Iterator;
585 ~Ipv4AddressTlvValue() override;
586 uint32_t GetSerializedSize() const override;
587 void Serialize(Buffer::Iterator start) const override;
588 uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override;
589 /**
590 * Add IPv4 address and mask
591 * \param address the IPv4 address
592 * \param mask the IPv4 mask
593 */
594 void Add(Ipv4Address address, Ipv4Mask mask);
595 /**
596 * Begin iterator
597 * \returns the beginning element
598 */
599 Iterator Begin() const;
600 /**
601 * End iterator
602 * \returns the ending element
603 */
604 Iterator End() const;
605 Ipv4AddressTlvValue* Copy() const override;
606
607 private:
608 std::vector<Ipv4Addr>* m_ipv4Addr; ///< ipv4 addr
609};
610
611} // namespace ns3
612
613#endif /* WIMAX_TLV_H */
iterator in a Buffer instance
Definition: buffer.h:100
this class implements the classifier descriptor as a tlv vector
Definition: wimax-tlv.h:408
ClassificationRuleVectorTlvValue * Copy() const override
Copy.
Definition: wimax-tlv.cc:708
ClassificationRuleTlvType
ClassificationRuleTlvType enumeration.
Definition: wimax-tlv.h:412
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override
Deserialize from a buffer.
Definition: wimax-tlv.cc:719
this class implements the convergence sub-layer descriptor as a tlv vector
Definition: wimax-tlv.h:385
CsParamVectorTlvValue * Copy() const override
Copy.
Definition: wimax-tlv.cc:691
Type
Type enumeration.
Definition: wimax-tlv.h:389
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override
Deserialize from a buffer.
Definition: wimax-tlv.cc:640
Protocol header serialization and deserialization.
Definition: header.h:44
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:42
Ipv4AddressTlvValue class.
Definition: wimax-tlv.h:573
Iterator End() const
End iterator.
Definition: wimax-tlv.cc:1074
std::vector< Ipv4Addr >::const_iterator Iterator
IPv4 address vector iterator typedef.
Definition: wimax-tlv.h:583
void Serialize(Buffer::Iterator start) const override
Serialize to a buffer.
Definition: wimax-tlv.cc:1038
void Add(Ipv4Address address, Ipv4Mask mask)
Add IPv4 address and mask.
Definition: wimax-tlv.cc:1062
std::vector< Ipv4Addr > * m_ipv4Addr
ipv4 addr
Definition: wimax-tlv.h:608
Ipv4AddressTlvValue * Copy() const override
Copy function.
Definition: wimax-tlv.cc:1080
uint32_t GetSerializedSize() const override
Get serialized size in bytes.
Definition: wimax-tlv.cc:1032
Iterator Begin() const
Begin iterator.
Definition: wimax-tlv.cc:1068
~Ipv4AddressTlvValue() override
Definition: wimax-tlv.cc:1021
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override
Deserialize from a buffer.
Definition: wimax-tlv.cc:1048
a class to represent an Ipv4 address mask
Definition: ipv4-address.h:257
PortRangeTlvValue class.
Definition: wimax-tlv.h:484
uint32_t GetSerializedSize() const override
Get serialized size in bytes.
Definition: wimax-tlv.cc:880
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override
Deserialize from a buffer.
Definition: wimax-tlv.cc:896
std::vector< PortRange > * m_portRange
port range
Definition: wimax-tlv.h:523
std::vector< PortRange >::const_iterator Iterator
PortRange vector iterator typedef.
Definition: wimax-tlv.h:494
Iterator End() const
End iterator.
Definition: wimax-tlv.cc:925
void Serialize(Buffer::Iterator start) const override
Serialize to a buffer.
Definition: wimax-tlv.cc:886
~PortRangeTlvValue() override
Definition: wimax-tlv.cc:873
Iterator Begin() const
Begin iterator.
Definition: wimax-tlv.cc:919
void Add(uint16_t portLow, uint16_t portHigh)
Add a range.
Definition: wimax-tlv.cc:910
PortRangeTlvValue * Copy() const override
Copy.
Definition: wimax-tlv.cc:931
ProtocolTlvValue class.
Definition: wimax-tlv.h:532
~ProtocolTlvValue() override
Definition: wimax-tlv.cc:948
std::vector< uint8_t > * m_protocol
protocol
Definition: wimax-tlv.h:563
void Add(uint8_t protocol)
Add protocol number.
Definition: wimax-tlv.cc:986
Iterator Begin() const
Begin iterator.
Definition: wimax-tlv.cc:992
uint32_t GetSerializedSize() const override
Get serialized size in bytes.
Definition: wimax-tlv.cc:959
ProtocolTlvValue * Copy() const override
Copy.
Definition: wimax-tlv.cc:1004
std::vector< uint8_t >::const_iterator Iterator
Iterator typedef.
Definition: wimax-tlv.h:537
Iterator End() const
End iterator.
Definition: wimax-tlv.cc:998
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override
Deserialize from a buffer.
Definition: wimax-tlv.cc:974
void Serialize(Buffer::Iterator start) const override
Serialize to a buffer.
Definition: wimax-tlv.cc:965
SfVectorTlvValue class.
Definition: wimax-tlv.h:337
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override
Deserialize from a buffer.
Definition: wimax-tlv.cc:306
Type
Type enumeration.
Definition: wimax-tlv.h:341
@ Fixed_length_versus_Variable_length_SDU_Indicator
Definition: wimax-tlv.h:356
@ ARQ_RETRY_TIMEOUT_Transmitter_Delay
Definition: wimax-tlv.h:361
SfVectorTlvValue * Copy() const override
Copy.
Definition: wimax-tlv.cc:295
This class implements the Type-Len-Value structure channel encodings as described by "IEEE Standard f...
Definition: wimax-tlv.h:87
uint8_t m_type
type
Definition: wimax-tlv.h:164
TlvValue * CopyValue() const
Copy TlvValue.
Definition: wimax-tlv.cc:75
~Tlv() override
Definition: wimax-tlv.cc:65
uint64_t m_length
length
Definition: wimax-tlv.h:165
Tlv * Copy() const
Copy TLV.
Definition: wimax-tlv.cc:229
uint8_t GetType() const
Get type value.
Definition: wimax-tlv.cc:211
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition: wimax-tlv.cc:40
Tlv & operator=(const Tlv &o)
assignment operator
Definition: wimax-tlv.cc:88
TlvValue * PeekValue()
Peek value.
Definition: wimax-tlv.cc:223
static TypeId GetTypeId()
Register this type.
Definition: wimax-tlv.cc:32
uint64_t GetLength() const
Get length value.
Definition: wimax-tlv.cc:217
CommonTypes
CommonTypes enumeration.
Definition: wimax-tlv.h:91
@ UPLINK_SERVICE_FLOW
Definition: wimax-tlv.h:96
@ VENDOR_ID_EMCODING
Definition: wimax-tlv.h:97
@ DOWNLINK_SERVICE_FLOW
Definition: wimax-tlv.h:95
@ CURRENT_TRANSMIT_POWER
Definition: wimax-tlv.h:94
@ HMAC_TUPLE
Definition: wimax-tlv.h:92
@ MAC_VERSION_ENCODING
Definition: wimax-tlv.h:93
@ VENDOR_SPECIFIC_INFORMATION
Definition: wimax-tlv.h:98
uint8_t GetSizeOfLen() const
Get size of length field.
Definition: wimax-tlv.cc:108
void Print(std::ostream &os) const override
Definition: wimax-tlv.cc:46
TlvValue * m_value
value
Definition: wimax-tlv.h:166
uint32_t GetSerializedSize() const override
Definition: wimax-tlv.cc:102
void Serialize(Buffer::Iterator start) const override
Definition: wimax-tlv.cc:126
uint32_t Deserialize(Buffer::Iterator start) override
Definition: wimax-tlv.cc:146
The value field of a tlv can take different values (uint8_t, uint16, vector, ...).
Definition: wimax-tlv.h:45
virtual ~TlvValue()
Definition: wimax-tlv.h:47
virtual uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLen)=0
Deserialize from a buffer.
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.
TosTlvValue class.
Definition: wimax-tlv.h:436
void Serialize(Buffer::Iterator start) const override
Serialize to a buffer.
Definition: wimax-tlv.cc:827
uint8_t m_high
high
Definition: wimax-tlv.h:474
uint8_t GetHigh() const
Get high part.
Definition: wimax-tlv.cc:850
uint32_t GetSerializedSize() const override
Get serialized size in bytes.
Definition: wimax-tlv.cc:821
~TosTlvValue() override
Definition: wimax-tlv.cc:816
uint8_t GetLow() const
Get low part.
Definition: wimax-tlv.cc:844
uint8_t GetMask() const
Get the mask.
Definition: wimax-tlv.cc:856
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override
Deserialize from a buffer.
Definition: wimax-tlv.cc:835
TosTlvValue * Copy() const override
Copy.
Definition: wimax-tlv.cc:862
uint8_t m_mask
mask
Definition: wimax-tlv.h:475
uint8_t m_low
low
Definition: wimax-tlv.h:473
a unique identifier for an interface.
Definition: type-id.h:59
U16TlvValue class.
Definition: wimax-tlv.h:215
void Serialize(Buffer::Iterator start) const override
Serialize to a buffer.
Definition: wimax-tlv.cc:554
U16TlvValue * Copy() const override
Copy.
Definition: wimax-tlv.cc:579
uint16_t m_value
value
Definition: wimax-tlv.h:246
uint32_t GetSerializedSize() const override
Get serialized size in bytes.
Definition: wimax-tlv.cc:548
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLen) override
Deserialize from a buffer.
Definition: wimax-tlv.cc:560
uint16_t GetValue() const
Get value.
Definition: wimax-tlv.cc:573
~U16TlvValue() override
Definition: wimax-tlv.cc:543
U32TlvValue class.
Definition: wimax-tlv.h:255
uint32_t GetValue() const
Get value.
Definition: wimax-tlv.cc:626
uint32_t GetSerializedSize() const override
Get serialized size in bytes.
Definition: wimax-tlv.cc:601
~U32TlvValue() override
Definition: wimax-tlv.cc:596
void Serialize(Buffer::Iterator start) const override
Serialize to a buffer.
Definition: wimax-tlv.cc:607
U32TlvValue * Copy() const override
Copy.
Definition: wimax-tlv.cc:632
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLen) override
Deserialize from a buffer.
Definition: wimax-tlv.cc:613
uint32_t m_value
value
Definition: wimax-tlv.h:287
U8TlvValue class.
Definition: wimax-tlv.h:175
~U8TlvValue() override
Definition: wimax-tlv.cc:490
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLen) override
Deserialize from a buffer.
Definition: wimax-tlv.cc:507
uint8_t GetValue() const
Get value.
Definition: wimax-tlv.cc:520
uint8_t m_value
value
Definition: wimax-tlv.h:206
uint32_t GetSerializedSize() const override
Get serialized size in bytes.
Definition: wimax-tlv.cc:495
void Serialize(Buffer::Iterator start) const override
Serialize to a buffer.
Definition: wimax-tlv.cc:501
U8TlvValue * Copy() const override
Copy.
Definition: wimax-tlv.cc:526
this class is used to implement a vector of values in one tlv value field
Definition: wimax-tlv.h:297
uint32_t GetSerializedSize() const override
Get serialized size in bytes.
Definition: wimax-tlv.cc:251
~VectorTlvValue() override
Definition: wimax-tlv.cc:240
std::vector< Tlv * >::const_iterator Iterator
TLV vector iterator typedef.
Definition: wimax-tlv.h:300
void Serialize(Buffer::Iterator start) const override
Serialize to a buffer.
Definition: wimax-tlv.cc:262
VectorTlvValue * Copy() const override=0
Copy.
Iterator End() const
End iterator.
Definition: wimax-tlv.cc:278
Iterator Begin() const
Begin iterator.
Definition: wimax-tlv.cc:272
void Add(const Tlv &val)
Add a TLV.
Definition: wimax-tlv.cc:284
std::vector< Tlv * > * m_tlvList
tlv list
Definition: wimax-tlv.h:328
uint32_t Deserialize(Buffer::Iterator start, uint64_t valueLength) override=0
Deserialize from a buffer.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
PortRange structure.
Definition: wimax-tlv.h:488