A Discrete-Event Network Simulator
API
 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 <map>
35 
36 namespace ns3 {
37 
44 {
45 
46 public:
47 
48  // inherited from Object
49  static TypeId GetTypeId (void);
50 
51 
61  EpcEnbApplication (Ptr<Socket> lteSocket, Ptr<Socket> s1uSocket, Ipv4Address sgwAddress);
62 
67  virtual ~EpcEnbApplication (void);
68 
69 
70 
79  void ErabSetupRequest (uint32_t teid, uint16_t rnti, uint8_t lcid);
80 
86  void RecvFromLteSocket (Ptr<Socket> socket);
87 
88 
94  void RecvFromS1uSocket (Ptr<Socket> socket);
95 
102  void SendToLteSocket (Ptr<Packet> packet, uint16_t rnti, uint8_t lcid);
103 
104 
111  void SendToS1uSocket (Ptr<Packet> packet, uint32_t teid);
112 
113 
114 private:
115 
116 
121 
126 
131 
136  std::map<LteFlowId_t, uint32_t> m_rbidTeidMap;
137 
142  std::map<uint32_t, LteFlowId_t> m_teidRbidMap;
143 
147  uint16_t m_gtpuUdpPort;
148 
149 };
150 
151 } //namespace ns3
152 
153 #endif /* EPC_ENB_APPLICATION_H */
154