OLD | NEW |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) | 3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 * | 46 * |
47 * This application is installed inside eNBs and provides the bridge functionali
ty for user data plane packets between the radio interface and the S1-U interfac
e. | 47 * This application is installed inside eNBs and provides the bridge functionali
ty for user data plane packets between the radio interface and the S1-U interfac
e. |
48 */ | 48 */ |
49 class EpcEnbApplication : public Application | 49 class EpcEnbApplication : public Application |
50 { | 50 { |
51 | 51 |
52 friend class MemberEpcEnbS1SapProvider<EpcEnbApplication>; | 52 friend class MemberEpcEnbS1SapProvider<EpcEnbApplication>; |
53 friend class MemberEpcS1apSapEnb<EpcEnbApplication>; | 53 friend class MemberEpcS1apSapEnb<EpcEnbApplication>; |
54 | 54 |
55 | 55 |
56 // inherited from Object | |
57 public: | 56 public: |
| 57 /** |
| 58 * \brief Get the type ID. |
| 59 * \return the object TypeId |
| 60 */ |
58 static TypeId GetTypeId (void); | 61 static TypeId GetTypeId (void); |
59 protected: | 62 protected: |
60 void DoDispose (void); | 63 void DoDispose (void); |
61 | 64 |
62 public: | 65 public: |
63 ·· | 66 ·· |
64 ·· | 67 ·· |
65 | 68 |
66 /**· | 69 /**· |
67 * Constructor | 70 * Constructor |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 120 |
118 | 121 |
119 /**· | 122 /**· |
120 * Method to be assigned to the recv callback of the S1-U socket. It is called
when the eNB receives a data packet from the SGW that is to be forwarded to the
UE. | 123 * Method to be assigned to the recv callback of the S1-U socket. It is called
when the eNB receives a data packet from the SGW that is to be forwarded to the
UE. |
121 *· | 124 *· |
122 * \param socket pointer to the S1-U socket | 125 * \param socket pointer to the S1-U socket |
123 */ | 126 */ |
124 void RecvFromS1uSocket (Ptr<Socket> socket); | 127 void RecvFromS1uSocket (Ptr<Socket> socket); |
125 | 128 |
126 | 129 |
| 130 /** |
| 131 * EPS flow ID structure |
| 132 */ |
127 struct EpsFlowId_t | 133 struct EpsFlowId_t |
128 { | 134 { |
129 uint16_t m_rnti; | 135 uint16_t m_rnti; ///< RNTI |
130 uint8_t m_bid; | 136 uint8_t m_bid; ///< Bid |
131 | 137 |
132 public: | 138 public: |
133 EpsFlowId_t (); | 139 EpsFlowId_t (); |
| 140 /** |
| 141 * Constructor |
| 142 * |
| 143 * \param a RNTI |
| 144 * \param b bid |
| 145 */ |
134 EpsFlowId_t (const uint16_t a, const uint8_t b); | 146 EpsFlowId_t (const uint16_t a, const uint8_t b); |
135 | 147 |
| 148 /** |
| 149 * Comparison operator |
| 150 * |
| 151 * \param a first application |
| 152 * \param b second application |
| 153 * \returns true is the applications are "equal" |
| 154 */ |
136 friend bool operator == (const EpsFlowId_t &a, const EpsFlowId_t &b); | 155 friend bool operator == (const EpsFlowId_t &a, const EpsFlowId_t &b); |
| 156 /** |
| 157 * Less than operator |
| 158 * |
| 159 * \param a first application |
| 160 * \param b second application |
| 161 * \returns true is the applications are "equal" |
| 162 */ |
137 friend bool operator < (const EpsFlowId_t &a, const EpsFlowId_t &b); | 163 friend bool operator < (const EpsFlowId_t &a, const EpsFlowId_t &b); |
138 }; | 164 }; |
139 | 165 |
140 | 166 |
141 private: | 167 private: |
142 | 168 |
143 // ENB S1 SAP provider methods | 169 // ENB S1 SAP provider methods |
| 170 /// Initial UE message function |
144 void DoInitialUeMessage (uint64_t imsi, uint16_t rnti); | 171 void DoInitialUeMessage (uint64_t imsi, uint16_t rnti); |
| 172 /// Path switch request function |
145 void DoPathSwitchRequest (EpcEnbS1SapProvider::PathSwitchRequestParameters par
ams); | 173 void DoPathSwitchRequest (EpcEnbS1SapProvider::PathSwitchRequestParameters par
ams); |
| 174 /// UE Context Release function |
146 void DoUeContextRelease (uint16_t rnti); | 175 void DoUeContextRelease (uint16_t rnti); |
147 ·· | 176 ·· |
148 // S1-AP SAP ENB methods | 177 // S1-AP SAP ENB methods |
| 178 /// Initial COntext Setup Request· |
149 void DoInitialContextSetupRequest (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std
::list<EpcS1apSapEnb::ErabToBeSetupItem> erabToBeSetupList); | 179 void DoInitialContextSetupRequest (uint64_t mmeUeS1Id, uint16_t enbUeS1Id, std
::list<EpcS1apSapEnb::ErabToBeSetupItem> erabToBeSetupList); |
| 180 /// Path Switch Request Acknowledge |
150 void DoPathSwitchRequestAcknowledge (uint64_t enbUeS1Id, uint64_t mmeUeS1Id, u
int16_t cgi, std::list<EpcS1apSapEnb::ErabSwitchedInUplinkItem> erabToBeSwitched
InUplinkList); | 181 void DoPathSwitchRequestAcknowledge (uint64_t enbUeS1Id, uint64_t mmeUeS1Id, u
int16_t cgi, std::list<EpcS1apSapEnb::ErabSwitchedInUplinkItem> erabToBeSwitched
InUplinkList); |
151 | 182 |
152 /**· | 183 /**· |
153 * \brief This function accepts bearer id corresponding to a particular UE and
schedules indication of bearer release towards MME | 184 * \brief This function accepts bearer id corresponding to a particular UE and
schedules indication of bearer release towards MME |
154 * \param imsi maps to mmeUeS1Id | 185 * \param imsi maps to mmeUeS1Id |
155 * \param rnti maps to enbUeS1Id | 186 * \param rnti maps to enbUeS1Id |
156 * \param bearerId Bearer Identity which is to be de-activated | 187 * \param bearerId Bearer Identity which is to be de-activated |
157 */ | 188 */ |
158 void DoReleaseIndication (uint64_t imsi, uint16_t rnti, uint8_t bearerId); | 189 void DoReleaseIndication (uint64_t imsi, uint16_t rnti, uint8_t bearerId); |
159 | 190 |
160 | 191 |
161 /** | 192 /** |
162 * Send a packet to the UE via the LTE radio interface of the eNB | 193 * Send a packet to the UE via the LTE radio interface of the eNB |
163 *· | 194 *· |
164 * \param packet t | 195 * \param packet t |
| 196 * \param rnti maps to enbUeS1Id |
165 * \param bid the EPS Bearer IDentifier | 197 * \param bid the EPS Bearer IDentifier |
166 */ | 198 */ |
167 void SendToLteSocket (Ptr<Packet> packet, uint16_t rnti, uint8_t bid); | 199 void SendToLteSocket (Ptr<Packet> packet, uint16_t rnti, uint8_t bid); |
168 | 200 |
169 | 201 |
170 /**· | 202 /**· |
171 * Send a packet to the SGW via the S1-U interface | 203 * Send a packet to the SGW via the S1-U interface |
172 *· | 204 *· |
173 * \param packet packet to be sent | 205 * \param packet packet to be sent |
174 * \param teid the Tunnel Enpoint IDentifier | 206 * \param teid the Tunnel Enpoint IDentifier |
175 */ | 207 */ |
176 void SendToS1uSocket (Ptr<Packet> packet, uint32_t teid); | 208 void SendToS1uSocket (Ptr<Packet> packet, uint32_t teid); |
177 | 209 |
178 | 210 |
179 ·· | |
180 /**· | 211 /**· |
181 * internal method used for the actual setup of the S1 Bearer | 212 * internal method used for the actual setup of the S1 Bearer |
182 *· | 213 *· |
183 * \param teid· | 214 * \param teid the Tunnel Enpoint IDentifier |
184 * \param rnti· | 215 * \param rnti maps to enbUeS1Id |
185 * \param bid· | 216 * \param bid the S1-U Bearer IDentifier |
186 */ | 217 */ |
187 void SetupS1Bearer (uint32_t teid, uint16_t rnti, uint8_t bid); | 218 void SetupS1Bearer (uint32_t teid, uint16_t rnti, uint8_t bid); |
188 | 219 |
189 /** | 220 /** |
190 * raw packet socket to send and receive the packets to and from the LTE radio
interface | 221 * raw packet socket to send and receive the packets to and from the LTE radio
interface |
191 */ | 222 */ |
192 Ptr<Socket> m_lteSocket; | 223 Ptr<Socket> m_lteSocket; |
193 | 224 |
194 /** | 225 /** |
195 * UDP socket to send and receive GTP-U the packets to and from the S1-U inter
face | 226 * UDP socket to send and receive GTP-U the packets to and from the S1-U inter
face |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 *· | 275 *· |
245 */ | 276 */ |
246 EpcS1apSapEnb* m_s1apSapEnb; | 277 EpcS1apSapEnb* m_s1apSapEnb; |
247 | 278 |
248 /** | 279 /** |
249 * UE context info | 280 * UE context info |
250 *· | 281 *· |
251 */ | 282 */ |
252 std::map<uint64_t, uint16_t> m_imsiRntiMap; | 283 std::map<uint64_t, uint16_t> m_imsiRntiMap; |
253 | 284 |
254 uint16_t m_cellId; | 285 uint16_t m_cellId; ///< cell ID |
255 | 286 |
256 }; | 287 }; |
257 | 288 |
258 } //namespace ns3 | 289 } //namespace ns3 |
259 | 290 |
260 #endif /* EPC_ENB_APPLICATION_H */ | 291 #endif /* EPC_ENB_APPLICATION_H */ |
261 | 292 |
OLD | NEW |