/usr/include/ns3.27/ns3/epc-x2.h is in libns3-dev 3.27+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Manuel Requena <manuel.requena@cttc.es>
*/
#ifndef EPC_X2_H
#define EPC_X2_H
#include "ns3/socket.h"
#include "ns3/callback.h"
#include "ns3/ptr.h"
#include "ns3/object.h"
#include "ns3/epc-x2-sap.h"
#include <map>
namespace ns3 {
/**
* X2IfaceInfo
*/
class X2IfaceInfo : public SimpleRefCount<X2IfaceInfo>
{
public:
/**
* Constructor
*
* \param remoteIpAddr remote IP address
* \param localCtrlPlaneSocket control plane socket
* \param localUserPlaneSocket user plane socket
*/
X2IfaceInfo (Ipv4Address remoteIpAddr, Ptr<Socket> localCtrlPlaneSocket, Ptr<Socket> localUserPlaneSocket);
virtual ~X2IfaceInfo (void);
/**
* Assignment operator
*
* \returns X2IfaceInfo&
*/
X2IfaceInfo& operator= (const X2IfaceInfo &);
public:
Ipv4Address m_remoteIpAddr; ///< remote IP address
Ptr<Socket> m_localCtrlPlaneSocket; ///< local control plane socket
Ptr<Socket> m_localUserPlaneSocket; ///< local user plane socket
};
/**
* X2CellInfo
*/
class X2CellInfo : public SimpleRefCount<X2CellInfo>
{
public:
/**
* Constructor
*
* \param localCellId local cell ID
* \param remoteCellId remote cell ID
*/
X2CellInfo (uint16_t localCellId, uint16_t remoteCellId);
virtual ~X2CellInfo (void);
/**
* Assignment operator
*
* \returns X2CellInfo&
*/
X2CellInfo& operator= (const X2CellInfo &);
public:
uint16_t m_localCellId; ///< local cell ID
uint16_t m_remoteCellId; ///< remote cell ID
};
/**
* \ingroup lte
*
* This entity is installed inside an eNB and provides the functionality for the X2 interface
*/
class EpcX2 : public Object
{
/// allow EpcX2SpecificEpcX2SapProvider<EpcX2> class friend access
friend class EpcX2SpecificEpcX2SapProvider<EpcX2>;
public:
/**
* Constructor
*/
EpcX2 ();
/**
* Destructor
*/
virtual ~EpcX2 (void);
/**
* \brief Get the type ID.
* \return the object TypeId
*/
static TypeId GetTypeId (void);
virtual void DoDispose (void);
/**
* \param s the X2 SAP User to be used by this EPC X2 entity
*/
void SetEpcX2SapUser (EpcX2SapUser * s);
/**
* \return the X2 SAP Provider interface offered by this EPC X2 entity
*/
EpcX2SapProvider* GetEpcX2SapProvider ();
/**
* Add an X2 interface to this EPC X2 entity
* \param enb1CellId the cell ID of the current eNodeB
* \param enb1X2Address the address of the current eNodeB
* \param enb2CellId the cell ID of the neighbouring eNodeB
* \param enb2X2Address the address of the neighbouring eNodeB
*/
void AddX2Interface (uint16_t enb1CellId, Ipv4Address enb1X2Address,
uint16_t enb2CellId, Ipv4Address enb2X2Address);
/**
* Method to be assigned to the recv callback of the X2-C (X2 Control Plane) socket.
* It is called when the eNB receives a packet from the peer eNB of the X2-C interface
*
* \param socket socket of the X2-C interface
*/
void RecvFromX2cSocket (Ptr<Socket> socket);
/**
* Method to be assigned to the recv callback of the X2-U (X2 User Plane) socket.
* It is called when the eNB receives a packet from the peer eNB of the X2-U interface
*
* \param socket socket of the X2-U interface
*/
void RecvFromX2uSocket (Ptr<Socket> socket);
protected:
// Interface provided by EpcX2SapProvider
/**
* Send handover request function
* \param params the send handover request parameters
*/
virtual void DoSendHandoverRequest (EpcX2SapProvider::HandoverRequestParams params);
/**
* Send handover request ack function
* \param params the send handover request ack parameters
*/
virtual void DoSendHandoverRequestAck (EpcX2SapProvider::HandoverRequestAckParams params);
/**
* Send handover preparation failure function
* \param params the handover preparation failure parameters
*/
virtual void DoSendHandoverPreparationFailure (EpcX2SapProvider::HandoverPreparationFailureParams params);
/**
* Send SN status transfer function
* \param params the SN status transer parameters
*/
virtual void DoSendSnStatusTransfer (EpcX2SapProvider::SnStatusTransferParams params);
/**
* Send UE context release function
* \param params the UE context release parameters
*/
virtual void DoSendUeContextRelease (EpcX2SapProvider::UeContextReleaseParams params);
/**
* Send load information function
* \param params the send load information parameters
*/
virtual void DoSendLoadInformation (EpcX2SapProvider::LoadInformationParams params);
/**
* Send resource status update function
* \param params the sedn reosurce status update parameters
*/
virtual void DoSendResourceStatusUpdate (EpcX2SapProvider::ResourceStatusUpdateParams params);
/**
* Send UE data function
*
* \param params EpcX2SapProvider::UeDataParams
*/
virtual void DoSendUeData (EpcX2SapProvider::UeDataParams params);
EpcX2SapUser* m_x2SapUser; ///< X2 SAP user
EpcX2SapProvider* m_x2SapProvider; ///< X2 SAP provider
private:
/**
* Map the targetCellId to the corresponding (sourceSocket, remoteIpAddr) to be used
* to send the X2 message
*/
std::map < uint16_t, Ptr<X2IfaceInfo> > m_x2InterfaceSockets;
/**
* Map the localSocket (the one receiving the X2 message)
* to the corresponding (sourceCellId, targetCellId) associated with the X2 interface
*/
std::map < Ptr<Socket>, Ptr<X2CellInfo> > m_x2InterfaceCellIds;
/**
* UDP ports to be used for the X2-C interface
*/
uint16_t m_x2cUdpPort;
/**
* UDP ports to be used for the X2-U interface
*/
uint16_t m_x2uUdpPort;
};
} //namespace ns3
#endif // EPC_X2_H
|