A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
ipv6-header.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2007-2008 Louis Pasteur 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: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
19
*/
20
21
#ifndef IPV6_HEADER_H
22
#define IPV6_HEADER_H
23
24
#include "ns3/header.h"
25
#include "ns3/ipv6-address.h"
26
27
namespace
ns3 {
28
33
class
Ipv6Header
:
public
Header
34
{
35
public
:
40
enum
NextHeader_e
41
{
42
IPV6_EXT_HOP_BY_HOP
= 0,
43
IPV6_IPV4
= 4,
44
IPV6_TCP
= 6,
45
IPV6_UDP
= 17,
46
IPV6_IPV6
= 41,
47
IPV6_EXT_ROUTING
= 43,
48
IPV6_EXT_FRAGMENTATION
= 44,
49
IPV6_EXT_CONFIDENTIALITY
= 50,
50
IPV6_EXT_AUTHENTIFICATION
= 51,
51
IPV6_ICMPV6
= 58,
52
IPV6_EXT_END
= 59,
53
IPV6_EXT_DESTINATION
= 60,
54
IPV6_SCTP
= 135,
55
IPV6_EXT_MOBILITY
= 135,
56
IPV6_UDP_LITE
= 136,
57
};
58
63
static
TypeId
GetTypeId
(
void
);
64
69
virtual
TypeId
GetInstanceTypeId
(
void
)
const
;
70
74
Ipv6Header
(
void
);
75
80
void
SetTrafficClass
(uint8_t traffic);
81
86
uint8_t
GetTrafficClass
(
void
)
const
;
87
92
void
SetFlowLabel
(uint32_t flow);
93
98
uint32_t
GetFlowLabel
(
void
)
const
;
99
104
void
SetPayloadLength
(uint16_t len);
105
110
uint16_t
GetPayloadLength
(
void
)
const
;
111
116
void
SetNextHeader
(uint8_t next);
117
122
uint8_t
GetNextHeader
(
void
)
const
;
123
128
void
SetHopLimit
(uint8_t limit);
129
134
uint8_t
GetHopLimit
(
void
)
const
;
135
140
void
SetSourceAddress
(
Ipv6Address
src);
141
146
Ipv6Address
GetSourceAddress
(
void
)
const
;
147
152
void
SetDestinationAddress
(
Ipv6Address
dst);
153
158
Ipv6Address
GetDestinationAddress
(
void
)
const
;
159
165
virtual
void
Print
(std::ostream& os)
const
;
166
171
virtual
uint32_t
GetSerializedSize
(
void
)
const
;
172
177
virtual
void
Serialize
(
Buffer::Iterator
start
)
const
;
178
184
virtual
uint32_t
Deserialize
(
Buffer::Iterator
start
);
185
186
private
:
190
uint32_t
m_version
: 4;
194
uint32_t
m_trafficClass
: 8;
195
200
uint32_t
m_flowLabel
: 20;
201
205
uint16_t
m_payloadLength
;
206
210
uint8_t
m_nextHeader
;
211
215
uint8_t
m_hopLimit
;
216
220
Ipv6Address
m_sourceAddress
;
221
225
Ipv6Address
m_destinationAddress
;
226
};
227
228
}
/* namespace ns3 */
229
230
#endif
/* IPV6_HEADER_H */
231
ns3::Header
Protocol header serialization and deserialization.
Definition:
header.h:42
ns3::Ipv6Header::GetTrafficClass
uint8_t GetTrafficClass(void) const
Get the "Traffic class" field.
Definition:
ipv6-header.cc:52
ns3::Ipv6Header::IPV6_IPV6
Definition:
ipv6-header.h:46
ns3::Ipv6Header::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Get the serialized size of the packet.
Definition:
ipv6-header.cc:144
ns3::Ipv6Header::GetNextHeader
uint8_t GetNextHeader(void) const
Get the next header.
Definition:
ipv6-header.cc:82
ns3::Ipv6Header::SetPayloadLength
void SetPayloadLength(uint16_t len)
Set the "Payload length" field.
Definition:
ipv6-header.cc:67
ns3::Ipv6Header::m_flowLabel
uint32_t m_flowLabel
The flow label.
Definition:
ipv6-header.h:200
ns3::Ipv6Header
Doxygen introspection did not find any typical Config paths.
Definition:
ipv6-header.h:33
ns3::Ipv6Header::IPV6_ICMPV6
Definition:
ipv6-header.h:51
ns3::Ipv6Header::m_version
uint32_t m_version
The version (always equal to 6).
Definition:
ipv6-header.h:190
ns3::Ipv6Header::IPV6_UDP_LITE
Definition:
ipv6-header.h:56
ns3::Ipv6Header::m_trafficClass
uint32_t m_trafficClass
The traffic class.
Definition:
ipv6-header.h:194
ns3::Ipv6Header::IPV6_EXT_HOP_BY_HOP
Definition:
ipv6-header.h:42
ns3::Ipv6Header::IPV6_EXT_CONFIDENTIALITY
Definition:
ipv6-header.h:49
ns3::Ipv6Header::SetNextHeader
void SetNextHeader(uint8_t next)
Set the "Next header" field.
Definition:
ipv6-header.cc:77
ns3::Ipv6Header::m_sourceAddress
Ipv6Address m_sourceAddress
The source address.
Definition:
ipv6-header.h:220
visualizer.core.start
def start
Definition:
core.py:1482
ns3::Ipv6Header::IPV6_EXT_ROUTING
Definition:
ipv6-header.h:47
ns3::Ipv6Header::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Return the instance type identifier.
Definition:
ipv6-header.cc:126
ns3::Ipv6Header::NextHeader_e
NextHeader_e
IPv6 next-header value.
Definition:
ipv6-header.h:40
ns3::Ipv6Header::IPV6_EXT_MOBILITY
Definition:
ipv6-header.h:55
ns3::Ipv6Header::IPV6_SCTP
Definition:
ipv6-header.h:54
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:98
ns3::Ipv6Header::m_destinationAddress
Ipv6Address m_destinationAddress
The destination address.
Definition:
ipv6-header.h:225
ns3::Ipv6Header::IPV6_EXT_DESTINATION
Definition:
ipv6-header.h:53
ns3::Ipv6Header::GetFlowLabel
uint32_t GetFlowLabel(void) const
Get the "Flow label" field.
Definition:
ipv6-header.cc:62
ns3::Ipv6Header::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)
Deserialize the packet.
Definition:
ipv6-header.cc:165
ns3::Ipv6Header::GetHopLimit
uint8_t GetHopLimit(void) const
Get the "Hop limit" field (TTL).
Definition:
ipv6-header.cc:92
ns3::Ipv6Header::IPV6_EXT_AUTHENTIFICATION
Definition:
ipv6-header.h:50
ns3::Ipv6Header::Print
virtual void Print(std::ostream &os) const
Print some informations about the packet.
Definition:
ipv6-header.cc:131
ns3::Ipv6Header::GetPayloadLength
uint16_t GetPayloadLength(void) const
Get the "Payload length" field.
Definition:
ipv6-header.cc:72
ns3::Ipv6Header::IPV6_EXT_END
Definition:
ipv6-header.h:52
ns3::Ipv6Header::Ipv6Header
Ipv6Header(void)
Constructor.
Definition:
ipv6-header.cc:35
ns3::Ipv6Header::GetTypeId
static TypeId GetTypeId(void)
Get the type identifier.
Definition:
ipv6-header.cc:117
ns3::Ipv6Header::SetSourceAddress
void SetSourceAddress(Ipv6Address src)
Set the "Source address" field.
Definition:
ipv6-header.cc:97
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:46
ns3::Ipv6Header::Serialize
virtual void Serialize(Buffer::Iterator start) const
Serialize the packet.
Definition:
ipv6-header.cc:149
ns3::Ipv6Header::SetHopLimit
void SetHopLimit(uint8_t limit)
Set the "Hop limit" field (TTL).
Definition:
ipv6-header.cc:87
ns3::Ipv6Header::GetSourceAddress
Ipv6Address GetSourceAddress(void) const
Get the "Source address" field.
Definition:
ipv6-header.cc:102
ns3::Ipv6Header::SetFlowLabel
void SetFlowLabel(uint32_t flow)
Set the "Flow label" field.
Definition:
ipv6-header.cc:57
ns3::Ipv6Header::IPV6_IPV4
Definition:
ipv6-header.h:43
ns3::Ipv6Header::m_payloadLength
uint16_t m_payloadLength
The payload length.
Definition:
ipv6-header.h:205
ns3::Ipv6Header::SetTrafficClass
void SetTrafficClass(uint8_t traffic)
Set the "Traffic class" field.
Definition:
ipv6-header.cc:47
ns3::Ipv6Header::IPV6_EXT_FRAGMENTATION
Definition:
ipv6-header.h:48
ns3::Ipv6Header::m_hopLimit
uint8_t m_hopLimit
The Hop limit value.
Definition:
ipv6-header.h:215
ns3::Ipv6Header::m_nextHeader
uint8_t m_nextHeader
The Next header number.
Definition:
ipv6-header.h:210
ns3::Ipv6Header::IPV6_UDP
Definition:
ipv6-header.h:45
ns3::Ipv6Header::IPV6_TCP
Definition:
ipv6-header.h:44
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:49
ns3::Ipv6Header::SetDestinationAddress
void SetDestinationAddress(Ipv6Address dst)
Set the "Destination address" field.
Definition:
ipv6-header.cc:107
ns3::Ipv6Header::GetDestinationAddress
Ipv6Address GetDestinationAddress(void) const
Get the "Destination address" field.
Definition:
ipv6-header.cc:112
src
internet
model
ipv6-header.h
Generated on Sat Apr 19 2014 14:06:56 for ns-3 by
1.8.6