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-enb-application.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
* Nicola Baldo <nbaldo@cttc.cat>
20
*/
21
22
#ifndef EPC_ENB_APPLICATION_H
23
#define EPC_ENB_APPLICATION_H
24
25
#include <ns3/address.h>
26
#include <ns3/socket.h>
27
#include <ns3/virtual-net-device.h>
28
#include <ns3/traced-callback.h>
29
#include <ns3/callback.h>
30
#include <ns3/ptr.h>
31
#include <ns3/object.h>
32
#include <ns3/lte-common.h>
33
#include <ns3/application.h>
34
#include <ns3/eps-bearer.h>
35
#include <ns3/epc-enb-s1-sap.h>
36
#include <ns3/epc-s1ap-sap.h>
37
#include <map>
38
39
namespace
ns3 {
40
class
EpcEnbS1SapUser;
41
class
EpcEnbS1SapProvider;
42
43
49
class
EpcEnbApplication
:
public
Application
50
{
51
52
friend
class
MemberEpcEnbS1SapProvider
<
EpcEnbApplication
>;
53
friend
class
MemberEpcS1apSapEnb
<
EpcEnbApplication
>;
54
55
56
// inherited from Object
57
public
:
58
static
TypeId
GetTypeId
(
void
);
59
protected
:
60
void
DoDispose
(
void
);
61
62
public
:
63
64
65
76
EpcEnbApplication
(
Ptr<Socket>
lteSocket,
Ptr<Socket>
s1uSocket,
Ipv4Address
enbS1uAddress,
Ipv4Address
sgwS1uAddress, uint16_t cellId);
77
82
virtual
~EpcEnbApplication
(
void
);
83
84
90
void
SetS1SapUser
(
EpcEnbS1SapUser
* s);
91
96
EpcEnbS1SapProvider
*
GetS1SapProvider
();
97
103
void
SetS1apSapMme
(
EpcS1apSapMme
* s);
104
109
EpcS1apSapEnb
*
GetS1apSapEnb
();
110
116
void
RecvFromLteSocket
(
Ptr<Socket>
socket);
117
118
124
void
RecvFromS1uSocket
(
Ptr<Socket>
socket);
125
126
127
struct
EpsFlowId_t
128
{
129
uint16_t
m_rnti
;
130
uint8_t
m_bid
;
131
132
public
:
133
EpsFlowId_t
();
134
EpsFlowId_t
(
const
uint16_t a,
const
uint8_t b);
135
136
friend
bool
operator ==
(
const
EpsFlowId_t
&a,
const
EpsFlowId_t
&b);
137
friend
bool
operator <
(
const
EpsFlowId_t
&a,
const
EpsFlowId_t
&b);
138
};
139
140
141
private
:
142
143
// ENB S1 SAP provider methods
144
void
DoInitialUeMessage
(uint64_t imsi, uint16_t rnti);
145
void
DoPathSwitchRequest
(
EpcEnbS1SapProvider::PathSwitchRequestParameters
params);
146
void
DoUeContextRelease
(uint16_t rnti);
147
148
// S1-AP SAP ENB methods
149
void
DoInitialContextSetupRequest
(uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std::list<EpcS1apSapEnb::ErabToBeSetupItem> erabToBeSetupList);
150
void
DoPathSwitchRequestAcknowledge
(uint64_t enbUeS1Id, uint64_t mmeUeS1Id, uint16_t cgi, std::list<EpcS1apSapEnb::ErabSwitchedInUplinkItem> erabToBeSwitchedInUplinkList);
151
158
void
SendToLteSocket
(
Ptr<Packet>
packet, uint16_t rnti, uint8_t bid);
159
160
167
void
SendToS1uSocket
(
Ptr<Packet>
packet, uint32_t teid);
168
169
170
178
void
SetupS1Bearer
(uint32_t teid, uint16_t rnti, uint8_t bid);
179
183
Ptr<Socket>
m_lteSocket
;
184
188
Ptr<Socket>
m_s1uSocket
;
189
193
Ipv4Address
m_enbS1uAddress
;
194
198
Ipv4Address
m_sgwS1uAddress
;
199
204
std::map<uint16_t, std::map<uint8_t, uint32_t> >
m_rbidTeidMap
;
205
210
std::map<uint32_t, EpsFlowId_t>
m_teidRbidMap
;
211
215
uint16_t
m_gtpuUdpPort
;
216
220
EpcEnbS1SapProvider
*
m_s1SapProvider
;
221
225
EpcEnbS1SapUser
*
m_s1SapUser
;
226
231
EpcS1apSapMme
*
m_s1apSapMme
;
232
237
EpcS1apSapEnb
*
m_s1apSapEnb
;
238
243
std::map<uint64_t, uint16_t>
m_imsiRntiMap
;
244
245
uint16_t
m_cellId
;
246
247
};
248
249
}
//namespace ns3
250
251
#endif
/* EPC_ENB_APPLICATION_H */
252
src
lte
model
epc-enb-application.h
Generated on Tue May 14 2013 11:08:24 for ns-3 by
1.8.1.2