A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
lte
model
epc-gtpu-header.h
Go to the documentation of this file.
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
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: Jaume Nin <jnin@cttc.cat>
19
*/
20
21
22
#ifndef EPS_GTPU_V1_H
23
#define EPS_GTPU_V1_H
24
25
#include <ns3/ptr.h>
26
#include <ns3/header.h>
27
#include <ns3/ipv4-header.h>
28
29
namespace
ns3
{
30
31
class
Packet;
32
33
41
class
GtpuHeader
:
public
Header
42
{
43
public
:
48
static
TypeId
GetTypeId
(
void
);
49
GtpuHeader
();
50
virtual
~GtpuHeader
();
51
virtual
TypeId
GetInstanceTypeId
(
void
)
const
;
52
virtual
uint32_t
GetSerializedSize
(
void
)
const
;
53
virtual
void
Serialize
(
Buffer::Iterator
start
)
const
;
54
virtual
uint32_t
Deserialize
(
Buffer::Iterator
start
);
55
virtual
void
Print
(std::ostream &os)
const
;
56
61
bool
GetExtensionHeaderFlag
()
const
;
66
uint16_t
GetLength
()
const
;
71
uint8_t
GetMessageType
()
const
;
76
uint8_t
GetNPduNumber
()
const
;
81
bool
GetNPduNumberFlag
()
const
;
86
uint8_t
GetNextExtensionType
()
const
;
91
bool
GetProtocolType
()
const
;
96
uint16_t
GetSequenceNumber
()
const
;
101
bool
GetSequenceNumberFlag
()
const
;
106
uint32_t
GetTeid
()
const
;
111
uint8_t
GetVersion
()
const
;
116
void
SetExtensionHeaderFlag
(
bool
extensionHeaderFlag);
121
void
SetLength
(uint16_t length);
126
void
SetMessageType
(uint8_t messageType);
131
void
SetNPduNumber
(uint8_t nPduNumber);
136
void
SetNPduNumberFlag
(
bool
nPduNumberFlag);
141
void
SetNextExtensionType
(uint8_t nextExtensionType);
146
void
SetProtocolType
(
bool
protocolType);
151
void
SetSequenceNumber
(uint16_t sequenceNumber);
156
void
SetSequenceNumberFlag
(
bool
sequenceNumberFlag);
161
void
SetTeid
(uint32_t teid);
166
void
SetVersion
(uint8_t
version
);
167
174
bool
operator ==
(
const
GtpuHeader
& b)
const
;
175
176
177
private
:
181
uint8_t
m_version
;
// really a 3 uint3_t
182
187
bool
m_protocolType
;
188
195
bool
m_extensionHeaderFlag
;
196
203
bool
m_sequenceNumberFlag
;
210
bool
m_nPduNumberFlag
;
214
uint8_t
m_messageType
;
221
uint16_t
m_length
;
222
228
uint32_t
m_teid
;
234
uint16_t
m_sequenceNumber
;
241
uint8_t
m_nPduNumber
;
246
uint8_t
m_nextExtensionType
;
247
248
};
249
250
}
// namespace ns3
251
252
#endif
/* EPS_GTPU_V1_H */
ns3::Header
Protocol header serialization and deserialization.
Definition:
header.h:42
ns3::GtpuHeader::SetNextExtensionType
void SetNextExtensionType(uint8_t nextExtensionType)
Set next extension type function.
Definition:
epc-gtpu-header.cc:230
ns3::GtpuHeader::m_nPduNumberFlag
bool m_nPduNumberFlag
This flag indicates the presence of a meaningful value of the N-PDU Number field. ...
Definition:
epc-gtpu-header.h:210
ns3::GtpuHeader::SetSequenceNumber
void SetSequenceNumber(uint16_t sequenceNumber)
Set sequence number function.
Definition:
epc-gtpu-header.cc:242
ns3::GtpuHeader::SetVersion
void SetVersion(uint8_t version)
Set version function.
Definition:
epc-gtpu-header.cc:260
conf.version
string version
Definition:
conf.py:51
ns3::GtpuHeader::GetNextExtensionType
uint8_t GetNextExtensionType() const
Get next extension type function.
Definition:
epc-gtpu-header.cc:164
ns3::GtpuHeader::GtpuHeader
GtpuHeader()
Definition:
epc-gtpu-header.cc:44
visualizer.core.start
def start()
Definition:
core.py:1844
ns3::GtpuHeader::SetLength
void SetLength(uint16_t length)
Set the length in octets of the payload.
Definition:
epc-gtpu-header.cc:206
ns3::GtpuHeader::SetProtocolType
void SetProtocolType(bool protocolType)
Set protocol type function.
Definition:
epc-gtpu-header.cc:236
ns3::GtpuHeader::m_nPduNumber
uint8_t m_nPduNumber
This field is used at the Inter SGSN Routeing Area Update procedure and some inter-system handover pr...
Definition:
epc-gtpu-header.h:241
ns3::GtpuHeader::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Definition:
epc-gtpu-header.cc:71
ns3::GtpuHeader::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Get the most derived TypeId for this Object.
Definition:
epc-gtpu-header.cc:65
ns3::GtpuHeader::GetNPduNumberFlag
bool GetNPduNumberFlag() const
Get type of GTP-U message function.
Definition:
epc-gtpu-header.cc:158
ns3::GtpuHeader::SetNPduNumber
void SetNPduNumber(uint8_t nPduNumber)
Set NPDU number function.
Definition:
epc-gtpu-header.cc:218
ns3::GtpuHeader::m_protocolType
bool m_protocolType
This bit is used as a protocol discriminator between GTP (when PT is '1') and GTP' (when PT is '0')...
Definition:
epc-gtpu-header.h:187
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:98
ns3::GtpuHeader::GetTeid
uint32_t GetTeid() const
Get a tunnel endpoint identificator (TEID)
Definition:
epc-gtpu-header.cc:188
ns3::GtpuHeader::m_messageType
uint8_t m_messageType
This field indicates the type of GTP-U message.
Definition:
epc-gtpu-header.h:214
ns3::GtpuHeader::SetExtensionHeaderFlag
void SetExtensionHeaderFlag(bool extensionHeaderFlag)
Set extension header flag function.
Definition:
epc-gtpu-header.cc:200
ns3::GtpuHeader::GetNPduNumber
uint8_t GetNPduNumber() const
Get NPDU number function.
Definition:
epc-gtpu-header.cc:152
ns3::GtpuHeader::GetMessageType
uint8_t GetMessageType() const
Get message type function.
Definition:
epc-gtpu-header.cc:146
ns3::GtpuHeader::GetLength
uint16_t GetLength() const
Get length function.
Definition:
epc-gtpu-header.cc:140
ns3::GtpuHeader::SetNPduNumberFlag
void SetNPduNumberFlag(bool nPduNumberFlag)
Sets the flag that indicates the presence of a meaningful value of the N-PDU Number field...
Definition:
epc-gtpu-header.cc:224
ns3::GtpuHeader::GetSequenceNumberFlag
bool GetSequenceNumberFlag() const
Get sequence number flag function.
Definition:
epc-gtpu-header.cc:182
ns3::GtpuHeader::m_sequenceNumber
uint16_t m_sequenceNumber
If Sequence Number field is used for G-PDUs (T-PDUs+headers), an increasing sequence number for T-PDU...
Definition:
epc-gtpu-header.h:234
ns3::GtpuHeader::m_extensionHeaderFlag
bool m_extensionHeaderFlag
This flag indicates the presence of a meaningful value of the Next Extension Header field...
Definition:
epc-gtpu-header.h:195
ns3::GtpuHeader::GetVersion
uint8_t GetVersion() const
Get version function.
Definition:
epc-gtpu-header.cc:194
ns3::GtpuHeader::m_version
uint8_t m_version
This field is used to determine the version of the GTPU-U protocol.
Definition:
epc-gtpu-header.h:181
ns3::GtpuHeader::SetMessageType
void SetMessageType(uint8_t messageType)
Set message type function.
Definition:
epc-gtpu-header.cc:212
ns3::GtpuHeader::m_nextExtensionType
uint8_t m_nextExtensionType
This field defines the type of Extension Header that follows this field in the GTP-PDU.
Definition:
epc-gtpu-header.h:246
ns3::GtpuHeader::Print
virtual void Print(std::ostream &os) const
Definition:
epc-gtpu-header.cc:109
ns3::GtpuHeader::~GtpuHeader
virtual ~GtpuHeader()
Definition:
epc-gtpu-header.cc:60
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::GtpuHeader::m_sequenceNumberFlag
bool m_sequenceNumberFlag
This flag indicates the presence of a meaningful value of the Sequence Number field.
Definition:
epc-gtpu-header.h:203
ns3::GtpuHeader::GetExtensionHeaderFlag
bool GetExtensionHeaderFlag() const
Get extension header flag function.
Definition:
epc-gtpu-header.cc:134
ns3::GtpuHeader::Serialize
virtual void Serialize(Buffer::Iterator start) const
Definition:
epc-gtpu-header.cc:76
ns3::GtpuHeader::m_length
uint16_t m_length
This field indicates the length in octets of the payload, i.e.
Definition:
epc-gtpu-header.h:221
ns3::GtpuHeader::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
epc-gtpu-header.cc:36
ns3::GtpuHeader::SetTeid
void SetTeid(uint32_t teid)
Set TEID function.
Definition:
epc-gtpu-header.cc:254
ns3::GtpuHeader::operator==
bool operator==(const GtpuHeader &b) const
Equality operator.
Definition:
epc-gtpu-header.cc:267
ns3::GtpuHeader::GetProtocolType
bool GetProtocolType() const
Get protocol type function.
Definition:
epc-gtpu-header.cc:170
ns3::GtpuHeader::GetSequenceNumber
uint16_t GetSequenceNumber() const
Get protocol type function.
Definition:
epc-gtpu-header.cc:176
ns3::GtpuHeader::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)
Definition:
epc-gtpu-header.cc:91
ns3::GtpuHeader::SetSequenceNumberFlag
void SetSequenceNumberFlag(bool sequenceNumberFlag)
Set sequence number flag function.
Definition:
epc-gtpu-header.cc:248
ns3::GtpuHeader::m_teid
uint32_t m_teid
This field unambiguously identifies a tunnel endpoint in the receiving GTP-U protocol entity...
Definition:
epc-gtpu-header.h:228
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:58
ns3::GtpuHeader
Implementation of the GPRS Tunnelling Protocol header according to GTPv1-U Release 10 as per 3Gpp TS ...
Definition:
epc-gtpu-header.h:41
Generated on Wed Nov 7 2018 10:01:59 for ns-3 by
1.8.14