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
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
39
class
GtpuHeader
:
public
Header
40
{
41
public
:
42
static
TypeId
GetTypeId
(
void
);
43
GtpuHeader
();
44
virtual
~GtpuHeader
();
45
virtual
TypeId
GetInstanceTypeId
(
void
)
const
;
46
virtual
uint32_t
GetSerializedSize
(
void
)
const
;
47
virtual
void
Serialize
(
Buffer::Iterator
start
)
const
;
48
virtual
uint32_t
Deserialize
(
Buffer::Iterator
start);
49
virtual
void
Print
(std::ostream &os)
const
;
50
51
bool
GetExtensionHeaderFlag
()
const
;
52
uint16_t
GetLength
()
const
;
53
uint8_t
GetMessageType
()
const
;
54
uint8_t
GetNPduNumber
()
const
;
55
bool
GetNPduNumberFlag
()
const
;
56
uint8_t
GetNextExtensionType
()
const
;
57
bool
GetProtocolType
()
const
;
58
uint16_t
GetSequenceNumber
()
const
;
59
bool
GetSequenceNumberFlag
()
const
;
60
uint32_t
GetTeid
()
const
;
61
uint8_t
GetVersion
()
const
;
62
void
SetExtensionHeaderFlag
(
bool
m_extensionHeaderFlag
);
63
void
SetLength
(uint16_t
m_length
);
64
void
SetMessageType
(uint8_t
m_messageType
);
65
void
SetNPduNumber
(uint8_t
m_nPduNumber
);
66
void
SetNPduNumberFlag
(
bool
m_nPduNumberFlag
);
67
void
SetNextExtensionType
(uint8_t
m_nextExtensionType
);
68
void
SetProtocolType
(
bool
m_protocolType
);
69
void
SetSequenceNumber
(uint16_t
m_sequenceNumber
);
70
void
SetSequenceNumberFlag
(
bool
m_sequenceNumberFlag
);
71
void
SetTeid
(uint32_t
m_teid
);
72
void
SetVersion
(uint8_t
m_version
);
73
74
bool
operator ==
(
const
GtpuHeader
& b)
const
;
75
76
77
private
:
81
uint8_t
m_version
;
// really a 3 uint3_t
82
87
bool
m_protocolType
;
88
95
bool
m_extensionHeaderFlag
;
96
103
bool
m_sequenceNumberFlag
;
110
bool
m_nPduNumberFlag
;
114
uint8_t
m_messageType
;
121
uint16_t
m_length
;
122
128
uint32_t
m_teid
;
134
uint16_t
m_sequenceNumber
;
141
uint8_t
m_nPduNumber
;
146
uint8_t
m_nextExtensionType
;
147
148
};
149
150
}
// namespace ns3
151
152
#endif
/* EPS_GTPU_V1_H */
src
lte
model
epc-gtpu-header.h
Generated on Tue May 14 2013 11:08:24 for ns-3 by
1.8.1.2