A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
internet
model
ipv6-option-header.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2008-2009 Strasbourg University
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: David Gross <gdavid.devel@gmail.com>
19
*/
20
21
#ifndef IPV6_OPTION_HEADER_H
22
#define IPV6_OPTION_HEADER_H
23
24
#include <ostream>
25
26
#include "ns3/header.h"
27
28
namespace
ns3
29
{
30
36
class
Ipv6OptionHeader
:
public
Header
37
{
38
public
:
39
47
struct
Alignment
48
{
49
uint8_t
factor
;
50
uint8_t
offset
;
51
};
52
57
static
TypeId
GetTypeId
();
58
63
virtual
TypeId
GetInstanceTypeId
()
const
;
64
68
Ipv6OptionHeader
();
69
73
virtual
~Ipv6OptionHeader
();
74
79
void
SetType
(uint8_t type);
80
85
uint8_t
GetType
()
const
;
86
91
void
SetLength
(uint8_t length);
92
97
uint8_t
GetLength
()
const
;
98
104
virtual
void
Print
(std::ostream &os)
const
;
105
110
virtual
uint32_t
GetSerializedSize
()
const
;
111
116
virtual
void
Serialize
(
Buffer::Iterator
start
)
const
;
117
123
virtual
uint32_t
Deserialize
(
Buffer::Iterator
start
);
124
132
virtual
Alignment
GetAlignment
()
const
;
133
134
private
:
138
uint8_t
m_type
;
139
143
uint8_t
m_length
;
144
148
Buffer
m_data
;
149
};
150
156
class
Ipv6OptionPad1Header
:
public
Ipv6OptionHeader
157
{
158
public
:
163
static
TypeId
GetTypeId
();
164
169
virtual
TypeId
GetInstanceTypeId
()
const
;
170
174
Ipv6OptionPad1Header
();
175
179
virtual
~Ipv6OptionPad1Header
();
180
186
virtual
void
Print
(std::ostream &os)
const
;
187
192
virtual
uint32_t
GetSerializedSize
()
const
;
193
198
virtual
void
Serialize
(
Buffer::Iterator
start
)
const
;
199
205
virtual
uint32_t
Deserialize
(
Buffer::Iterator
start
);
206
};
207
213
class
Ipv6OptionPadnHeader
:
public
Ipv6OptionHeader
214
{
215
public
:
220
static
TypeId
GetTypeId
();
221
226
virtual
TypeId
GetInstanceTypeId
()
const
;
227
232
Ipv6OptionPadnHeader
(uint32_t pad = 2);
233
237
virtual
~Ipv6OptionPadnHeader
();
238
244
virtual
void
Print
(std::ostream &os)
const
;
245
250
virtual
uint32_t
GetSerializedSize
()
const
;
251
256
virtual
void
Serialize
(
Buffer::Iterator
start
)
const
;
257
263
virtual
uint32_t
Deserialize
(
Buffer::Iterator
start
);
264
};
265
271
class
Ipv6OptionJumbogramHeader
:
public
Ipv6OptionHeader
272
{
273
public
:
278
static
TypeId
GetTypeId
();
279
284
virtual
TypeId
GetInstanceTypeId
()
const
;
285
289
Ipv6OptionJumbogramHeader
();
290
294
virtual
~Ipv6OptionJumbogramHeader
();
295
300
void
SetDataLength
(uint32_t dataLength);
301
306
uint32_t
GetDataLength
()
const
;
307
313
virtual
void
Print
(std::ostream &os)
const
;
314
319
virtual
uint32_t
GetSerializedSize
()
const
;
320
325
virtual
void
Serialize
(
Buffer::Iterator
start
)
const
;
326
332
virtual
uint32_t
Deserialize
(
Buffer::Iterator
start
);
333
338
virtual
Alignment
GetAlignment
()
const
;
339
340
private
:
344
uint32_t
m_dataLength
;
345
};
346
352
class
Ipv6OptionRouterAlertHeader
:
public
Ipv6OptionHeader
353
{
354
public
:
359
static
TypeId
GetTypeId
();
360
365
virtual
TypeId
GetInstanceTypeId
()
const
;
366
370
Ipv6OptionRouterAlertHeader
();
371
375
virtual
~Ipv6OptionRouterAlertHeader
();
376
381
void
SetValue
(uint16_t value);
382
387
uint16_t
GetValue
()
const
;
388
394
virtual
void
Print
(std::ostream &os)
const
;
395
400
virtual
uint32_t
GetSerializedSize
()
const
;
401
406
virtual
void
Serialize
(
Buffer::Iterator
start
)
const
;
407
413
virtual
uint32_t
Deserialize
(
Buffer::Iterator
start
);
414
419
virtual
Alignment
GetAlignment
()
const
;
420
421
private
:
425
uint16_t
m_value
;
426
};
427
428
}
// namespace ns3
429
430
#endif
/* IPV6_OPTION_HEADER_H */
431
ns3::Header
Protocol header serialization and deserialization.
Definition:
header.h:42
ns3::Ipv6OptionPadnHeader::GetInstanceTypeId
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Definition:
ipv6-option-header.cc:184
ns3::Ipv6OptionHeader::GetInstanceTypeId
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Definition:
ipv6-option-header.cc:43
ns3::Ipv6OptionPadnHeader::Print
virtual void Print(std::ostream &os) const
Print some information about the packet.
Definition:
ipv6-option-header.cc:200
ns3::Ipv6OptionRouterAlertHeader::GetValue
uint16_t GetValue() const
Get the field "value".
Definition:
ipv6-option-header.cc:339
ns3::Ipv6OptionJumbogramHeader::GetSerializedSize
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
Definition:
ipv6-option-header.cc:276
ns3::Ipv6OptionRouterAlertHeader::m_value
uint16_t m_value
The value.
Definition:
ipv6-option-header.h:425
ns3::Ipv6OptionHeader::SetType
void SetType(uint8_t type)
Set the type of the option.
Definition:
ipv6-option-header.cc:58
ns3::Ipv6OptionHeader
Header for IPv6 Option.
Definition:
ipv6-option-header.h:36
ns3::Ipv6OptionPad1Header::~Ipv6OptionPad1Header
virtual ~Ipv6OptionPad1Header()
Destructor.
Definition:
ipv6-option-header.cc:142
ns3::Ipv6OptionPadnHeader::Ipv6OptionPadnHeader
Ipv6OptionPadnHeader(uint32_t pad=2)
Constructor.
Definition:
ipv6-option-header.cc:189
ns3::Ipv6OptionJumbogramHeader::Ipv6OptionJumbogramHeader
Ipv6OptionJumbogramHeader()
Constructor.
Definition:
ipv6-option-header.cc:250
ns3::Buffer
automatically resized byte buffer
Definition:
buffer.h:92
visualizer.core.start
def start()
Definition:
core.py:1844
ns3::Ipv6OptionPad1Header::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
Definition:
ipv6-option-header.cc:163
ns3::Ipv6OptionJumbogramHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition:
ipv6-option-header.cc:235
ns3::Ipv6OptionHeader::m_type
uint8_t m_type
The type of the option.
Definition:
ipv6-option-header.h:138
ns3::Ipv6OptionPad1Header::Ipv6OptionPad1Header
Ipv6OptionPad1Header()
Constructor.
Definition:
ipv6-option-header.cc:137
ns3::Ipv6OptionPad1Header
Header of IPv6 Option Pad1.
Definition:
ipv6-option-header.h:156
ns3::Ipv6OptionPad1Header::Print
virtual void Print(std::ostream &os) const
Print some information about the packet.
Definition:
ipv6-option-header.cc:146
ns3::Ipv6OptionJumbogramHeader::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
Definition:
ipv6-option-header.cc:290
ns3::Ipv6OptionJumbogramHeader::Serialize
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
Definition:
ipv6-option-header.cc:281
ns3::Ipv6OptionRouterAlertHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition:
ipv6-option-header.cc:308
ns3::Ipv6OptionJumbogramHeader::GetInstanceTypeId
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Definition:
ipv6-option-header.cc:245
ns3::Ipv6OptionPadnHeader::GetSerializedSize
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
Definition:
ipv6-option-header.cc:205
ns3::Ipv6OptionHeader::Alignment
represents the alignment requirements of an option header
Definition:
ipv6-option-header.h:47
ns3::Ipv6OptionRouterAlertHeader::Print
virtual void Print(std::ostream &os) const
Print some information about the packet.
Definition:
ipv6-option-header.cc:344
ns3::Ipv6OptionHeader::GetLength
uint8_t GetLength() const
Get the option length.
Definition:
ipv6-option-header.cc:73
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:98
ns3::Ipv6OptionRouterAlertHeader::Ipv6OptionRouterAlertHeader
Ipv6OptionRouterAlertHeader()
Constructor.
Definition:
ipv6-option-header.cc:323
ns3::Ipv6OptionPadnHeader::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
Definition:
ipv6-option-header.cc:223
ns3::Ipv6OptionRouterAlertHeader::GetSerializedSize
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
Definition:
ipv6-option-header.cc:349
ns3::Ipv6OptionRouterAlertHeader::GetInstanceTypeId
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Definition:
ipv6-option-header.cc:318
ns3::Ipv6OptionPad1Header::Serialize
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
Definition:
ipv6-option-header.cc:156
ns3::Ipv6OptionHeader::~Ipv6OptionHeader
virtual ~Ipv6OptionHeader()
Destructor.
Definition:
ipv6-option-header.cc:54
ns3::Ipv6OptionPadnHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition:
ipv6-option-header.cc:174
ns3::Ipv6OptionJumbogramHeader::GetAlignment
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
Definition:
ipv6-option-header.cc:301
ns3::Ipv6OptionPad1Header::GetSerializedSize
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
Definition:
ipv6-option-header.cc:151
ns3::Ipv6OptionRouterAlertHeader::GetAlignment
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
Definition:
ipv6-option-header.cc:374
ns3::Ipv6OptionJumbogramHeader::~Ipv6OptionJumbogramHeader
virtual ~Ipv6OptionJumbogramHeader()
Destructor.
Definition:
ipv6-option-header.cc:257
ns3::Ipv6OptionHeader::m_data
Buffer m_data
The anonymous data of this option.
Definition:
ipv6-option-header.h:148
ns3::Ipv6OptionJumbogramHeader
Header of IPv6 Option Jumbogram.
Definition:
ipv6-option-header.h:271
ns3::Ipv6OptionHeader::GetAlignment
virtual Alignment GetAlignment() const
Get the Alignment requirement of this option header.
Definition:
ipv6-option-header.cc:115
ns3::Ipv6OptionRouterAlertHeader::~Ipv6OptionRouterAlertHeader
virtual ~Ipv6OptionRouterAlertHeader()
Destructor.
Definition:
ipv6-option-header.cc:330
ns3::Ipv6OptionHeader::Alignment::factor
uint8_t factor
Factor.
Definition:
ipv6-option-header.h:49
ns3::Ipv6OptionHeader::GetType
uint8_t GetType() const
Get the type of the option.
Definition:
ipv6-option-header.cc:63
ns3::Ipv6OptionJumbogramHeader::SetDataLength
void SetDataLength(uint32_t dataLength)
Set the data length.
Definition:
ipv6-option-header.cc:261
ns3::Ipv6OptionPad1Header::GetInstanceTypeId
virtual TypeId GetInstanceTypeId() const
Get the instance type ID.
Definition:
ipv6-option-header.cc:132
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::Ipv6OptionHeader::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
Definition:
ipv6-option-header.cc:98
ns3::Ipv6OptionPadnHeader::~Ipv6OptionPadnHeader
virtual ~Ipv6OptionPadnHeader()
Destructor.
Definition:
ipv6-option-header.cc:196
ns3::Ipv6OptionRouterAlertHeader::Serialize
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
Definition:
ipv6-option-header.cc:354
ns3::Ipv6OptionHeader::GetSerializedSize
virtual uint32_t GetSerializedSize() const
Get the serialized size of the packet.
Definition:
ipv6-option-header.cc:83
ns3::Ipv6OptionRouterAlertHeader::SetValue
void SetValue(uint16_t value)
Set the field "value".
Definition:
ipv6-option-header.cc:334
ns3::Ipv6OptionHeader::Print
virtual void Print(std::ostream &os) const
Print some information about the packet.
Definition:
ipv6-option-header.cc:78
ns3::Ipv6OptionHeader::Alignment::offset
uint8_t offset
Offset.
Definition:
ipv6-option-header.h:50
ns3::Ipv6OptionRouterAlertHeader::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
Definition:
ipv6-option-header.cc:363
ns3::Ipv6OptionPad1Header::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition:
ipv6-option-header.cc:122
ns3::Ipv6OptionJumbogramHeader::GetDataLength
uint32_t GetDataLength() const
Get the data length.
Definition:
ipv6-option-header.cc:266
ns3::Ipv6OptionRouterAlertHeader
Header of IPv6 Option Router Alert.
Definition:
ipv6-option-header.h:352
ns3::Ipv6OptionJumbogramHeader::Print
virtual void Print(std::ostream &os) const
Print some information about the packet.
Definition:
ipv6-option-header.cc:271
ns3::Ipv6OptionHeader::m_length
uint8_t m_length
The option length.
Definition:
ipv6-option-header.h:143
ns3::Ipv6OptionHeader::GetTypeId
static TypeId GetTypeId()
Get the type identificator.
Definition:
ipv6-option-header.cc:33
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
ns3::Ipv6OptionHeader::SetLength
void SetLength(uint8_t length)
Set the option length.
Definition:
ipv6-option-header.cc:68
ns3::Ipv6OptionPadnHeader
Header of IPv6 Option Padn.
Definition:
ipv6-option-header.h:213
ns3::Ipv6OptionPadnHeader::Serialize
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
Definition:
ipv6-option-header.cc:210
ns3::Ipv6OptionJumbogramHeader::m_dataLength
uint32_t m_dataLength
The data length.
Definition:
ipv6-option-header.h:344
ns3::Ipv6OptionHeader::Serialize
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
Definition:
ipv6-option-header.cc:88
ns3::Ipv6OptionHeader::Ipv6OptionHeader
Ipv6OptionHeader()
Constructor.
Definition:
ipv6-option-header.cc:48
Generated on Wed Nov 7 2018 10:01:55 for ns-3 by
1.8.14