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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
epc-gtpu-header.h
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 */
ns3::Header
Protocol header serialization and deserialization.
Definition:
header.h:42
ns3::GtpuHeader::m_nPduNumberFlag
bool m_nPduNumberFlag
Definition:
epc-gtpu-header.h:110
ns3::GtpuHeader::Serialize
virtual void Serialize(Buffer::Iterator start) const
Definition:
epc-gtpu-header.cc:76
ns3::GtpuHeader::m_nPduNumber
uint8_t m_nPduNumber
Definition:
epc-gtpu-header.h:141
ns3::GtpuHeader::m_protocolType
bool m_protocolType
Definition:
epc-gtpu-header.h:87
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:98
ns3::GtpuHeader::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Definition:
epc-gtpu-header.cc:71
ns3::GtpuHeader::m_messageType
uint8_t m_messageType
Definition:
epc-gtpu-header.h:114
ns3::GtpuHeader::Print
virtual void Print(std::ostream &os) const
Definition:
epc-gtpu-header.cc:109
ns3::GtpuHeader::m_sequenceNumber
uint16_t m_sequenceNumber
Definition:
epc-gtpu-header.h:134
ns3::GtpuHeader::m_extensionHeaderFlag
bool m_extensionHeaderFlag
Definition:
epc-gtpu-header.h:95
ns3::GtpuHeader::m_version
uint8_t m_version
Definition:
epc-gtpu-header.h:81
ns3::GtpuHeader::m_nextExtensionType
uint8_t m_nextExtensionType
Definition:
epc-gtpu-header.h:146
ns3::GtpuHeader::m_sequenceNumberFlag
bool m_sequenceNumberFlag
Definition:
epc-gtpu-header.h:103
ns3::GtpuHeader::m_length
uint16_t m_length
Definition:
epc-gtpu-header.h:121
ns3::GtpuHeader::GetInstanceTypeId
virtual TypeId GetInstanceTypeId(void) const
Definition:
epc-gtpu-header.cc:65
ns3::GtpuHeader::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)
Definition:
epc-gtpu-header.cc:91
ns3::GtpuHeader::m_teid
uint32_t m_teid
Definition:
epc-gtpu-header.h:128
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:44
ns3::GtpuHeader
Definition:
epc-gtpu-header.h:39
src
lte
model
epc-gtpu-header.h
Generated on Sun Mar 16 2014 11:25:05 for ns-3 by
1.8.6