A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
ipv6-option-header.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008-2009 Strasbourg University
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
* Author: David Gross <gdavid.devel@gmail.com>
18
*/
19
20
#ifndef IPV6_OPTION_HEADER_H
21
#define IPV6_OPTION_HEADER_H
22
23
#include "ns3/header.h"
24
25
#include <ostream>
26
27
namespace
ns3
28
{
29
35
class
Ipv6OptionHeader
:
public
Header
36
{
37
public
:
45
struct
Alignment
46
{
47
uint8_t
factor
;
48
uint8_t
offset
;
49
};
50
55
static
TypeId
GetTypeId
();
56
61
TypeId
GetInstanceTypeId
()
const override
;
62
66
Ipv6OptionHeader
();
67
71
~Ipv6OptionHeader
()
override
;
72
77
void
SetType
(uint8_t
type
);
78
83
uint8_t
GetType
()
const
;
84
89
void
SetLength
(uint8_t length);
90
95
uint8_t
GetLength
()
const
;
96
101
void
Print
(std::ostream& os)
const override
;
102
107
uint32_t
GetSerializedSize
()
const override
;
108
113
void
Serialize
(
Buffer::Iterator
start
)
const override
;
114
120
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
121
129
virtual
Alignment
GetAlignment
()
const
;
130
131
private
:
135
uint8_t
m_type
;
136
140
uint8_t
m_length
;
141
145
Buffer
m_data
;
146
};
147
153
class
Ipv6OptionPad1Header
:
public
Ipv6OptionHeader
154
{
155
public
:
160
static
TypeId
GetTypeId
();
161
166
TypeId
GetInstanceTypeId
()
const override
;
167
171
Ipv6OptionPad1Header
();
172
176
~Ipv6OptionPad1Header
()
override
;
177
182
void
Print
(std::ostream& os)
const override
;
183
188
uint32_t
GetSerializedSize
()
const override
;
189
194
void
Serialize
(
Buffer::Iterator
start
)
const override
;
195
201
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
202
};
203
209
class
Ipv6OptionPadnHeader
:
public
Ipv6OptionHeader
210
{
211
public
:
216
static
TypeId
GetTypeId
();
217
222
TypeId
GetInstanceTypeId
()
const override
;
223
228
Ipv6OptionPadnHeader
(uint32_t pad = 2);
229
233
~Ipv6OptionPadnHeader
()
override
;
234
239
void
Print
(std::ostream& os)
const override
;
240
245
uint32_t
GetSerializedSize
()
const override
;
246
251
void
Serialize
(
Buffer::Iterator
start
)
const override
;
252
258
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
259
};
260
266
class
Ipv6OptionJumbogramHeader
:
public
Ipv6OptionHeader
267
{
268
public
:
273
static
TypeId
GetTypeId
();
274
279
TypeId
GetInstanceTypeId
()
const override
;
280
284
Ipv6OptionJumbogramHeader
();
285
289
~Ipv6OptionJumbogramHeader
()
override
;
290
295
void
SetDataLength
(uint32_t dataLength);
296
301
uint32_t
GetDataLength
()
const
;
302
307
void
Print
(std::ostream& os)
const override
;
308
313
uint32_t
GetSerializedSize
()
const override
;
314
319
void
Serialize
(
Buffer::Iterator
start
)
const override
;
320
326
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
327
332
Alignment
GetAlignment
()
const override
;
333
334
private
:
338
uint32_t
m_dataLength
;
339
};
340
346
class
Ipv6OptionRouterAlertHeader
:
public
Ipv6OptionHeader
347
{
348
public
:
353
static
TypeId
GetTypeId
();
354
359
TypeId
GetInstanceTypeId
()
const override
;
360
364
Ipv6OptionRouterAlertHeader
();
365
369
~Ipv6OptionRouterAlertHeader
()
override
;
370
375
void
SetValue
(uint16_t value);
376
381
uint16_t
GetValue
()
const
;
382
387
void
Print
(std::ostream& os)
const override
;
388
393
uint32_t
GetSerializedSize
()
const override
;
394
399
void
Serialize
(
Buffer::Iterator
start
)
const override
;
400
406
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
407
412
Alignment
GetAlignment
()
const override
;
413
414
private
:
418
uint16_t
m_value
;
419
};
420
421
}
// namespace ns3
422
423
#endif
/* IPV6_OPTION_HEADER_H */
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:100
ns3::Buffer
automatically resized byte buffer
Definition:
buffer.h:94
ns3::Header
Protocol header serialization and deserialization.
Definition:
header.h:44
ns3::Header::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)=0
Deserialize the object from a buffer iterator.
ns3::Ipv6OptionHeader
Header for IPv6 Option.
Definition:
ipv6-option-header.h:36
ns3::Ipv6OptionHeader::Ipv6OptionHeader
Ipv6OptionHeader()
Constructor.
Definition:
ipv6-option-header.cc:49
ns3::Ipv6OptionHeader::GetLength
uint8_t GetLength() const
Get the option length.
Definition:
ipv6-option-header.cc:78
ns3::Ipv6OptionHeader::m_type
uint8_t m_type
The type of the option.
Definition:
ipv6-option-header.h:135
ns3::Ipv6OptionHeader::SetLength
void SetLength(uint8_t length)
Set the option length.
Definition:
ipv6-option-header.cc:72
ns3::Ipv6OptionHeader::SetType
void SetType(uint8_t type)
Set the type of the option.
Definition:
ipv6-option-header.cc:60
ns3::Ipv6OptionHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition:
ipv6-option-header.cc:96
ns3::Ipv6OptionHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition:
ipv6-option-header.cc:84
ns3::Ipv6OptionHeader::GetType
uint8_t GetType() const
Get the type of the option.
Definition:
ipv6-option-header.cc:66
ns3::Ipv6OptionHeader::GetAlignment
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
Definition:
ipv6-option-header.cc:125
ns3::Ipv6OptionHeader::m_length
uint8_t m_length
The option length.
Definition:
ipv6-option-header.h:140
ns3::Ipv6OptionHeader::~Ipv6OptionHeader
~Ipv6OptionHeader() override
Destructor.
Definition:
ipv6-option-header.cc:55
ns3::Ipv6OptionHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition:
ipv6-option-header.cc:34
ns3::Ipv6OptionHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition:
ipv6-option-header.cc:44
ns3::Ipv6OptionHeader::m_data
Buffer m_data
The anonymous data of this option.
Definition:
ipv6-option-header.h:145
ns3::Ipv6OptionHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition:
ipv6-option-header.cc:90
ns3::Ipv6OptionJumbogramHeader
Header of IPv6 Option Jumbogram.
Definition:
ipv6-option-header.h:267
ns3::Ipv6OptionJumbogramHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition:
ipv6-option-header.cc:256
ns3::Ipv6OptionJumbogramHeader::Ipv6OptionJumbogramHeader
Ipv6OptionJumbogramHeader()
Constructor.
Definition:
ipv6-option-header.cc:271
ns3::Ipv6OptionJumbogramHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition:
ipv6-option-header.cc:308
ns3::Ipv6OptionJumbogramHeader::GetAlignment
Alignment GetAlignment() const override
Get the Alignment requirement of this option header.
Definition:
ipv6-option-header.cc:330
ns3::Ipv6OptionJumbogramHeader::~Ipv6OptionJumbogramHeader
~Ipv6OptionJumbogramHeader() override
Destructor.
Definition:
ipv6-option-header.cc:278
ns3::Ipv6OptionJumbogramHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition:
ipv6-option-header.cc:266
ns3::Ipv6OptionJumbogramHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition:
ipv6-option-header.cc:302
ns3::Ipv6OptionJumbogramHeader::SetDataLength
void SetDataLength(uint32_t dataLength)
Set the data length.
Definition:
ipv6-option-header.cc:283
ns3::Ipv6OptionJumbogramHeader::m_dataLength
uint32_t m_dataLength
The data length.
Definition:
ipv6-option-header.h:338
ns3::Ipv6OptionJumbogramHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition:
ipv6-option-header.cc:295
ns3::Ipv6OptionJumbogramHeader::GetDataLength
uint32_t GetDataLength() const
Get the data length.
Definition:
ipv6-option-header.cc:289
ns3::Ipv6OptionPad1Header
Header of IPv6 Option Pad1.
Definition:
ipv6-option-header.h:154
ns3::Ipv6OptionPad1Header::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition:
ipv6-option-header.cc:143
ns3::Ipv6OptionPad1Header::Ipv6OptionPad1Header
Ipv6OptionPad1Header()
Constructor.
Definition:
ipv6-option-header.cc:148
ns3::Ipv6OptionPad1Header::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition:
ipv6-option-header.cc:158
ns3::Ipv6OptionPad1Header::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition:
ipv6-option-header.cc:133
ns3::Ipv6OptionPad1Header::~Ipv6OptionPad1Header
~Ipv6OptionPad1Header() override
Destructor.
Definition:
ipv6-option-header.cc:153
ns3::Ipv6OptionPad1Header::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition:
ipv6-option-header.cc:164
ns3::Ipv6OptionPad1Header::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition:
ipv6-option-header.cc:170
ns3::Ipv6OptionPadnHeader
Header of IPv6 Option Padn.
Definition:
ipv6-option-header.h:210
ns3::Ipv6OptionPadnHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition:
ipv6-option-header.cc:190
ns3::Ipv6OptionPadnHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition:
ipv6-option-header.cc:223
ns3::Ipv6OptionPadnHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition:
ipv6-option-header.cc:200
ns3::Ipv6OptionPadnHeader::Ipv6OptionPadnHeader
Ipv6OptionPadnHeader(uint32_t pad=2)
Constructor.
Definition:
ipv6-option-header.cc:205
ns3::Ipv6OptionPadnHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition:
ipv6-option-header.cc:217
ns3::Ipv6OptionPadnHeader::~Ipv6OptionPadnHeader
~Ipv6OptionPadnHeader() override
Destructor.
Definition:
ipv6-option-header.cc:212
ns3::Ipv6OptionPadnHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition:
ipv6-option-header.cc:229
ns3::Ipv6OptionRouterAlertHeader
Header of IPv6 Option Router Alert.
Definition:
ipv6-option-header.h:347
ns3::Ipv6OptionRouterAlertHeader::Ipv6OptionRouterAlertHeader
Ipv6OptionRouterAlertHeader()
Constructor.
Definition:
ipv6-option-header.cc:353
ns3::Ipv6OptionRouterAlertHeader::Serialize
void Serialize(Buffer::Iterator start) const override
Serialize the packet.
Definition:
ipv6-option-header.cc:390
ns3::Ipv6OptionRouterAlertHeader::SetValue
void SetValue(uint16_t value)
Set the field "value".
Definition:
ipv6-option-header.cc:365
ns3::Ipv6OptionRouterAlertHeader::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the instance type ID.
Definition:
ipv6-option-header.cc:348
ns3::Ipv6OptionRouterAlertHeader::m_value
uint16_t m_value
The value.
Definition:
ipv6-option-header.h:418
ns3::Ipv6OptionRouterAlertHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition:
ipv6-option-header.cc:338
ns3::Ipv6OptionRouterAlertHeader::GetSerializedSize
uint32_t GetSerializedSize() const override
Get the serialized size of the packet.
Definition:
ipv6-option-header.cc:384
ns3::Ipv6OptionRouterAlertHeader::GetAlignment
Alignment GetAlignment() const override
Get the Alignment requirement of this option header.
Definition:
ipv6-option-header.cc:412
ns3::Ipv6OptionRouterAlertHeader::GetValue
uint16_t GetValue() const
Get the field "value".
Definition:
ipv6-option-header.cc:371
ns3::Ipv6OptionRouterAlertHeader::Print
void Print(std::ostream &os) const override
Print some information about the packet.
Definition:
ipv6-option-header.cc:377
ns3::Ipv6OptionRouterAlertHeader::~Ipv6OptionRouterAlertHeader
~Ipv6OptionRouterAlertHeader() override
Destructor.
Definition:
ipv6-option-header.cc:360
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
check-style-clang-format.type
type
Definition:
check-style-clang-format.py:704
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
two-ray-to-three-gpp-ch-calibration.start
start
Definition:
two-ray-to-three-gpp-ch-calibration.py:520
ns3::Ipv6OptionHeader::Alignment
represents the alignment requirements of an option header
Definition:
ipv6-option-header.h:46
ns3::Ipv6OptionHeader::Alignment::factor
uint8_t factor
Factor.
Definition:
ipv6-option-header.h:47
ns3::Ipv6OptionHeader::Alignment::offset
uint8_t offset
Offset.
Definition:
ipv6-option-header.h:48
src
internet
model
ipv6-option-header.h
Generated on Sun Mar 3 2024 17:10:58 for ns-3 by
1.9.1