/usr/include/ns3.17/ns3/epc-ue-nas.h is in libns3-dev 3.17+dfsg-1build1.
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 | /* -*- 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: Nicola Baldo <nbaldo@cttc.es>
*/
#ifndef EPC_UE_NAS_H
#define EPC_UE_NAS_H
#include <ns3/object.h>
#include <ns3/lte-as-sap.h>
#include <ns3/epc-tft-classifier.h>
namespace ns3 {
class EpcHelper;
class EpcUeNas : public Object
{
friend class MemberLteAsSapUser<EpcUeNas>;
public:
/**
* Constructor
*/
EpcUeNas ();
/**
* Destructor
*/
virtual ~EpcUeNas ();
// inherited from Object
virtual void DoDispose (void);
static TypeId GetTypeId (void);
/**
*
* \param dev the UE NetDevice
*/
void SetDevice (Ptr<NetDevice> dev);
/**
*
*
* \param imsi the unique UE identifier
*/
void SetImsi (uint64_t imsi);
/**
* Set the AS SAP provider to interact with the NAS entity
*
* \param s the AS SAP provider
*/
void SetAsSapProvider (LteAsSapProvider* s);
/**
*
*
* \return the AS SAP user exported by this RRC
*/
LteAsSapUser* GetAsSapUser ();
/**
* set the callback used to forward data packets up the stack
*
* \param cb the callback
*/
void SetForwardUpCallback (Callback <void, Ptr<Packet> > cb);
/**
* instruct the NAS to go to ACTIVE state, i.e., EMM Registered + ECM Connected
* Since RRC Idle Mode cell selection is not supported yet, we
* force the UE RRC to be camped on a specific eNB.
*
* \param cellId the id of the eNB to camp on
* \param earfcn the DL frequency of the eNB
*/
void Connect (uint16_t cellId, uint16_t earfcn);
/**
* instruct the NAS to disconnect
*
*/
void Disconnect ();
/**
* Activate an EPS bearer
*
* \param bearer the characteristics of the bearer to be created
* \param tft the TFT identifying the traffic that will go on this bearer
*/
void ActivateEpsBearer (EpsBearer bearer, Ptr<EpcTft> tft);
/**
* Enqueue an IP packet on the proper bearer for uplink transmission
*
* \param p the packet
*
* \return true if successful, false if an error occurred
*/
bool Send (Ptr<Packet> p);
/**
* Definition of NAS states as per "LTE - From theory to practice",
* Section 3.2.3.2 "Connection Establishment and Release"
*
*/
enum State
{
OFF = 0,
ATTACHING,
IDLE_REGISTERED,
CONNECTING_TO_EPC,
ACTIVE,
NUM_STATES
};
private:
// LTE AS SAP methods
void DoNotifyConnectionSuccessful ();
void DoNotifyConnectionFailed ();
void DoNotifyConnectionReleased ();
void DoRecvData (Ptr<Packet> packet);
// internal methods
void DoActivateEpsBearer (EpsBearer bearer, Ptr<EpcTft> tft);
void SwitchToState (State s);
State m_state;
TracedCallback<State, State> m_stateTransitionCallback;
Ptr<NetDevice> m_device;
uint64_t m_imsi;
LteAsSapProvider* m_asSapProvider;
LteAsSapUser* m_asSapUser;
uint8_t m_bidCounter;
EpcTftClassifier m_tftClassifier;
Callback <void, Ptr<Packet> > m_forwardUpCallback;
struct BearerToBeActivated
{
EpsBearer bearer;
Ptr<EpcTft> tft;
};
std::list<BearerToBeActivated> m_bearersToBeActivatedList;
};
} // namespace ns3
#endif // EPC_UE_NAS_H
|