Commit 564e4d9b authored by Tien Thinh NGUYEN's avatar Tien Thinh NGUYEN

Code refactor for RegistrationRequest

parent f70921a9
......@@ -34,7 +34,7 @@ constexpr uint8_t kIei5gsMobileIdentityNonImeiSvPei = 0x78;
constexpr uint8_t kIei5gsRegistrationResult = 0x44;
constexpr uint8_t kIei5gsTrackingAreaIdentity = 0x52;
constexpr uint8_t kIei5gsTrackingAreaIdentityList = 0x54;
constexpr uint8_t kIei5gsUpdateType = 0x53;
constexpr uint8_t kIei5gsUpdateType = 0x53; // OK
constexpr uint8_t kIeiAdditionalInformation = 0x24;
constexpr uint8_t kIeiAllowedSscMode = 0x0f;
constexpr uint8_t kIeiAlwaysOnPduSessionIndication = 0x08;
......@@ -84,4 +84,9 @@ constexpr uint8_t kIeiSuggestedInterfaceIdentifier = 0x29;
constexpr uint8_t kIeiUeDsTtResidenceTime = 0x6f;
constexpr uint8_t kIeiEpsNasMessageContainer = 0x70; // OK
constexpr uint8_t kIeiNasMessageContainer = 0x71; // OK
constexpr uint8_t kIeiPayloadContainerType = 0x08; // Should be verified
constexpr uint8_t kIeiPayloadContainer =
0x7b; // Should be verified (kIeiExtendedProtocolConfigurationOptions)
constexpr uint8_t kIeiNetworkSlicingIndication = 0x09; // 9-(4 higher bits)
constexpr uint8_t kIeiEpsBearerContextStatus = 0x60;
......@@ -21,6 +21,7 @@
#include "../ies/5GSMobileIdentity.hpp"
#include "../ies/MICOIndication.hpp"
#include "../ies/NetworkSlicingIndication.hpp"
#include "../ies/PDUSessionStatus.hpp"
#include "../ies/UEStatus.hpp"
#include "NasMmPlainHeader.hpp"
......@@ -50,7 +51,6 @@
#include "NSSAI.hpp"
#include "NSSAI_Inclusion_Mode.hpp"
#include "NasKeySetIdentifier.hpp"
#include "Network_Slicing_Indication.hpp"
#include "Non_3GPP_NW_Provided_Policies.hpp"
#include "PDU_Session_Identity_2.hpp"
#include "PDU_Session_Reactivation_Result.hpp"
......
......@@ -19,15 +19,10 @@
* contact@openairinterface.org
*/
/*! \file
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "EPS_Bearer_Context_Status.hpp"
#include "3gpp_24.501.hpp"
#include "common_defs.h"
#include "logger.hpp"
using namespace nas;
......@@ -43,7 +38,7 @@ EPS_Bearer_Context_Status::EPS_Bearer_Context_Status(
const uint8_t iei, uint16_t value) {
_iei = iei;
_value = value;
length = 4;
length = kEpsBearerContextStatusLength;
}
//------------------------------------------------------------------------------
......@@ -66,48 +61,44 @@ uint16_t EPS_Bearer_Context_Status::getValue() {
//------------------------------------------------------------------------------
int EPS_Bearer_Context_Status::encode2Buffer(uint8_t* buf, int len) {
Logger::nas_mm().debug("encoding EPS_Bearer_Context_Status iei(0x%x)", _iei);
if (len < length) {
Logger::nas_mm().error("len is less than %d", length);
return 0;
Logger::nas_mm().debug("Encoding EPS_Bearer_Context_Status");
if (len < kEpsBearerContextStatusLength) {
Logger::nas_mm().error(
"Buffer length is less than the minimum length of this IE (%d octet)",
kEpsBearerContextStatusLength);
return KEncodeDecodeError;
}
int encoded_size = 0;
if (_iei) {
*(buf + encoded_size) = _iei;
encoded_size++;
*(buf + encoded_size) = length - 2;
encoded_size++;
*(buf + encoded_size) = (_value & 0x00ff);
encoded_size++;
*(buf + encoded_size) = (_value & 0xff00) >> 8;
encoded_size++;
} else {
//*(buf + encoded_size) = length - 1; encoded_size++;
//*(buf + encoded_size) = _value; encoded_size++; encoded_size++;
ENCODE_U8(buf + encoded_size, _iei, encoded_size);
}
// Length
ENCODE_U8(buf + encoded_size, length, encoded_size);
// Value
ENCODE_U16(buf + encoded_size, _value, encoded_size);
Logger::nas_mm().debug(
"encoded EPS_Bearer_Context_Status len(%d)", encoded_size);
"encoded EPS_Bearer_Context_Status (len %d)", encoded_size);
return encoded_size;
}
//------------------------------------------------------------------------------
int EPS_Bearer_Context_Status::decodeFromBuffer(
uint8_t* buf, int len, bool is_option) {
Logger::nas_mm().debug("decoding EPS_Bearer_Context_Status iei(0x%x)", *buf);
Logger::nas_mm().debug("Decoding EPS_Bearer_Context_Status");
int decoded_size = 0;
if (is_option) {
decoded_size++;
DECODE_U8(buf + decoded_size, _iei, decoded_size); // for IE
}
_value = 0x0000;
length = *(buf + decoded_size);
decoded_size++;
_value |= *(buf + decoded_size);
decoded_size++;
_value |= (*(buf + decoded_size)) << 8;
decoded_size++;
// Length
DECODE_U8(buf + decoded_size, length, decoded_size); // for IE
// Value
DECODE_U16(buf + decoded_size, _value, decoded_size); // for IE
Logger::nas_mm().debug(
"decoded EPS_Bearer_Context_Status value(0x%4x)", _value);
"decoded EPS_Bearer_Context_Status, value 0x%4x", _value);
Logger::nas_mm().debug(
"decoded EPS_Bearer_Context_Status len(%d)", decoded_size);
"decoded EPS_Bearer_Context_Status (len %d)", decoded_size);
return decoded_size;
}
......@@ -19,18 +19,13 @@
* contact@openairinterface.org
*/
/*! \file
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef __EPS_Bearer_Context_Status_H_
#define __EPS_Bearer_Context_Status_H_
#ifndef _EPS_Bearer_Context_Status_H_
#define _EPS_Bearer_Context_Status_H_
#include <stdint.h>
constexpr uint8_t kEpsBearerContextStatusLength = 4;
namespace nas {
class EPS_Bearer_Context_Status {
......
......@@ -90,7 +90,7 @@ int LADN_Indication::decodeFromBuffer(uint8_t* buf, int len, bool is_option) {
Logger::nas_mm().debug("Decoding LADN_Indication");
int decoded_size = 0;
if (is_option) {
decoded_size++;
DECODE_U8(buf + decoded_size, _iei, decoded_size);
}
length = 0;
DECODE_U16(buf + decoded_size, length, decoded_size);
......
......@@ -19,15 +19,10 @@
* contact@openairinterface.org
*/
/*! \file
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "NAS_Message_Container.hpp"
#include "3gpp_24.501.hpp"
#include "common_defs.h"
#include "logger.hpp"
using namespace nas;
......@@ -41,7 +36,7 @@ NAS_Message_Container::NAS_Message_Container(uint8_t iei) : _value() {
NAS_Message_Container::NAS_Message_Container(const uint8_t iei, bstring value) {
_iei = iei;
_value = bstrcpy(value);
length = blength(value) + 3;
length = blength(value);
}
//------------------------------------------------------------------------------
......@@ -63,26 +58,24 @@ void NAS_Message_Container::getValue(bstring& value) {
//------------------------------------------------------------------------------
int NAS_Message_Container::encode2Buffer(uint8_t* buf, int len) {
Logger::nas_mm().debug("Encoding NAS_Message_Container IEI 0x%x", _iei);
if (len < length) {
Logger::nas_mm().error("Len is less than %d", length);
return 0;
Logger::nas_mm().debug("Encoding NAS_Message_Container IEI");
if (len < kNasMessageContainerMinimumLength) {
Logger::nas_mm().error(
"Buffer length is less than the minimum length of this IE (%d octet)",
kNasMessageContainerMinimumLength);
return KEncodeDecodeError;
}
int encoded_size = 0;
if (_iei) {
*(buf + encoded_size) = _iei;
encoded_size++;
*(buf + encoded_size) = (length - 3) & 0x00ff;
encoded_size++;
*(buf + encoded_size) = ((length - 3) & 0xff000) >> 8;
encoded_size++;
ENCODE_U8(buf + encoded_size, _iei, encoded_size);
}
// Length
ENCODE_U16(buf + encoded_size, length, encoded_size);
// Value
int size = encode_bstring(_value, (buf + encoded_size), len - encoded_size);
encoded_size += size;
} else {
// *(buf + encoded_size) = length - 1; encoded_size++;
// *(buf + encoded_size) = _value; encoded_size++; encoded_size++;
}
Logger::nas_mm().debug(
"Encoded NAS_Message_Container (len %d)", encoded_size);
return encoded_size;
......@@ -91,17 +84,14 @@ int NAS_Message_Container::encode2Buffer(uint8_t* buf, int len) {
//------------------------------------------------------------------------------
int NAS_Message_Container::decodeFromBuffer(
uint8_t* buf, int len, bool is_option) {
Logger::nas_mm().debug("Decoding NAS_Message_Container iei (0x%x)", *buf);
Logger::nas_mm().debug("Decoding NAS_Message_Container");
int decoded_size = 0;
if (is_option) {
decoded_size++; // for IE
DECODE_U8(buf + decoded_size, _iei, decoded_size); // for IE
}
length = 0;
length |= (*(buf + decoded_size)) << 8;
decoded_size++;
length |= *(buf + decoded_size);
decoded_size++;
// Length
DECODE_U16(buf + decoded_size, length, decoded_size);
// Value
decode_bstring(&_value, length, (buf + decoded_size), len - decoded_size);
decoded_size += length;
for (int i = 0; i < length; i++) {
......
......@@ -19,24 +19,19 @@
* contact@openairinterface.org
*/
/*! \file
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef __NAS_Message_Container_H_
#define __NAS_Message_Container_H_
#ifndef _NAS_Message_Container_H_
#define _NAS_Message_Container_H_
#include <stdint.h>
#include <iostream>
extern "C" {
#include "TLVDecoder.h"
#include "TLVEncoder.h"
#include "bstrlib.h"
}
constexpr uint8_t kNasMessageContainerMinimumLength = 3;
constexpr uint32_t kNasMessageContainerMaximumLength = 65535;
namespace nas {
class NAS_Message_Container {
......
......@@ -19,27 +19,23 @@
* contact@openairinterface.org
*/
/*! \file
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "Network_Slicing_Indication.hpp"
#include "NetworkSlicingIndication.hpp"
#include "3gpp_24.501.hpp"
#include "common_defs.h"
#include "logger.hpp"
using namespace nas;
//------------------------------------------------------------------------------
Network_Slicing_Indication::Network_Slicing_Indication(uint8_t iei) {
NetworkSlicingIndication::NetworkSlicingIndication(uint8_t iei) {
_iei = iei;
DCNI = false;
NSSCI = false;
}
//------------------------------------------------------------------------------
Network_Slicing_Indication::Network_Slicing_Indication(
NetworkSlicingIndication::NetworkSlicingIndication(
const uint8_t iei, bool dcni, bool nssci) {
_iei = iei;
DCNI = dcni;
......@@ -47,79 +43,84 @@ Network_Slicing_Indication::Network_Slicing_Indication(
}
//------------------------------------------------------------------------------
Network_Slicing_Indication::Network_Slicing_Indication()
NetworkSlicingIndication::NetworkSlicingIndication()
: _iei(), DCNI(), NSSCI() {}
//------------------------------------------------------------------------------
Network_Slicing_Indication::~Network_Slicing_Indication() {}
NetworkSlicingIndication::~NetworkSlicingIndication() {}
//------------------------------------------------------------------------------
void Network_Slicing_Indication::setDCNI(bool value) {
void NetworkSlicingIndication::setDCNI(bool value) {
DCNI = value;
}
//------------------------------------------------------------------------------
void Network_Slicing_Indication::setNSSCI(bool value) {
void NetworkSlicingIndication::setNSSCI(bool value) {
NSSCI = value;
}
//------------------------------------------------------------------------------
bool Network_Slicing_Indication::getDCNI() {
bool NetworkSlicingIndication::getDCNI() {
return DCNI;
}
//------------------------------------------------------------------------------
bool Network_Slicing_Indication::getNSSCI() {
bool NetworkSlicingIndication::getNSSCI() {
return NSSCI;
}
//------------------------------------------------------------------------------
int Network_Slicing_Indication::encode2Buffer(uint8_t* buf, int len) {
Logger::nas_mm().debug(
"Encoding Network_Slicing_Indication iei (0x%x)", _iei);
if (len < 1) {
// Logger::nas_mm().error("len is less than %d", length);
return 0;
int NetworkSlicingIndication::encode2Buffer(uint8_t* buf, int len) {
Logger::nas_mm().debug("Encoding Network Slicing Indication");
if (len < kNetworkSlicingIndicationLength) {
Logger::nas_mm().error(
"Buffer length is less than the minimum length of this IE (%d octet)",
kNetworkSlicingIndicationLength);
return KEncodeDecodeError;
}
int encoded_size = 0;
uint8_t octet = 0;
if (!(_iei & 0x0f)) {
// octet = (0x0f) & ((tsc << 3) | key_id);
//*buf = octet;
// Logger::nas_mm().debug("encoded Payload_Container_Type IE(len(1/2
// octet))"); return 0;
} else {
if (_iei) {
octet = (_iei << 4) | (DCNI << 1) | NSSCI;
} else {
octet = 0x0f & ((DCNI << 1) | NSSCI);
}
ENCODE_U8(buf + encoded_size, octet, encoded_size);
Logger::nas_mm().debug(
"Decoded Network_Slicing_Indication DCNI (0x%x) NSSCI (0x%x)", octet,
NSSCI);
*buf = octet;
"Encoded NetworkSlicingIndication DCNI (0x%x) NSSCI (0x%x)", DCNI, NSSCI);
Logger::nas_mm().debug(
"Encoded Network_Slicing_Indication IE (len, 1 octet)");
return 1;
}
return 1;
"Encoded NetworkSlicingIndication IE (len, %d octet)", encoded_size);
return encoded_size;
}
//------------------------------------------------------------------------------
int Network_Slicing_Indication::decodeFromBuffer(
int NetworkSlicingIndication::decodeFromBuffer(
uint8_t* buf, int len, bool is_option) {
if (len < 1) {
Logger::nas_mm().error("Len is less than one");
return 0;
} else {
uint8_t octet = (*buf);
Logger::nas_mm().debug("Decoding Network Slicing Indication");
if (len < kNetworkSlicingIndicationLength) {
Logger::nas_mm().error(
"Buffer length is less than the minimum length of this IE (%d octet)",
kNetworkSlicingIndicationLength);
return KEncodeDecodeError;
}
int decoded_size = 0;
uint8_t octet = 0;
DECODE_U8(buf + decoded_size, octet, decoded_size);
if (is_option) {
_iei = (octet & 0xf0) >> 4;
} else {
_iei = 0;
}
DCNI = 0;
NSSCI = 0;
DCNI = octet & 0x02;
NSSCI = octet & 0x01;
Logger::nas_mm().debug(
"Decoded Network_Slicing_Indication DCNI (0x%x) NSSCI (0x%x)", DCNI,
NSSCI);
return 1;
}
"Decoded NetworkSlicingIndication DCNI (0x%x) NSSCI (0x%x)", DCNI, NSSCI);
return decoded_size;
}
......@@ -19,37 +19,35 @@
* contact@openairinterface.org
*/
/*! \file
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef __Network_Slicing_Indication_H_
#define __Network_Slicing_Indication_H_
#ifndef _Network_Slicing_Indication_H_
#define _Network_Slicing_Indication_H_
#include <stdint.h>
constexpr uint8_t kNetworkSlicingIndicationLength = 1;
namespace nas {
class Network_Slicing_Indication {
class NetworkSlicingIndication {
public:
Network_Slicing_Indication();
Network_Slicing_Indication(uint8_t iei);
Network_Slicing_Indication(const uint8_t iei, bool dcni, bool nssci);
~Network_Slicing_Indication();
NetworkSlicingIndication();
NetworkSlicingIndication(uint8_t iei);
NetworkSlicingIndication(const uint8_t iei, bool dcni, bool nssci);
~NetworkSlicingIndication();
int encode2Buffer(uint8_t* buf, int len);
int decodeFromBuffer(uint8_t* buf, int len, bool is_option);
void setDCNI(bool value);
void setNSSCI(bool value);
bool getDCNI();
void setNSSCI(bool value);
bool getNSSCI();
private:
uint8_t _iei;
bool NSSCI;
bool DCNI;
bool NSSCI;
};
} // namespace nas
......
......@@ -77,14 +77,21 @@ void Payload_Container::setValue(uint8_t iei, uint8_t value) {
}
//------------------------------------------------------------------------------
void Payload_Container::getValue(std::vector<PayloadContainerEntry>& content) {
if (CONTENT.has_value())
bool Payload_Container::getValue(std::vector<PayloadContainerEntry>& content) {
if (CONTENT.has_value()) {
content.assign(CONTENT.value().begin(), CONTENT.value().end());
return true;
}
return false;
}
//------------------------------------------------------------------------------
void Payload_Container::getValue(bstring& cnt) {
if (content.has_value()) cnt = content.value();
bool Payload_Container::getValue(bstring& cnt) {
if (content.has_value()) {
cnt = content.value();
return true;
}
return false;
}
//------------------------------------------------------------------------------
......
......@@ -48,8 +48,8 @@ class Payload_Container {
void setValue(uint8_t iei, uint8_t value);
int encode2Buffer(uint8_t* buf, int len, uint8_t type);
int decodeFromBuffer(uint8_t* buf, int len, bool is_option, uint8_t type);
void getValue(std::vector<PayloadContainerEntry>& content);
void getValue(bstring& cnt);
bool getValue(std::vector<PayloadContainerEntry>& content);
bool getValue(bstring& cnt);
private:
uint8_t _iei;
......
......@@ -19,20 +19,12 @@
* contact@openairinterface.org
*/
/*! \file _5GS_Update_Type.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "_5GS_Update_Type.hpp"
#include <iostream>
#include "3gpp_24.501.hpp"
#include "common_defs.h"
#include "logger.hpp"
using namespace nas;
using namespace std;
//------------------------------------------------------------------------------
_5GS_Update_Type::_5GS_Update_Type(uint8_t iei) {
......@@ -66,27 +58,27 @@ _5GS_Update_Type::_5GS_Update_Type(
_5GS_PNB_CIoT = _5gs_PNB_CIoT;
NG_RAN = ng_RAN;
SMS = sms;
length = 3;
length = k5gsUpdateTypeLength;
}
//------------------------------------------------------------------------------
void _5GS_Update_Type::setEPS_PNB_CIoT(uint8_t value) {
EPS_PNB_CIoT = value;
EPS_PNB_CIoT = value & 0x03; // 2 bits
}
//------------------------------------------------------------------------------
void _5GS_Update_Type::set_5GS_PNB_CIoT(uint8_t value) {
_5GS_PNB_CIoT = value;
_5GS_PNB_CIoT = value & 0x03; // 2 bits
}
//------------------------------------------------------------------------------
void _5GS_Update_Type::setNG_RAN(uint8_t value) {
NG_RAN = value;
NG_RAN = value & 0x01; // 1 bit
}
//------------------------------------------------------------------------------
void _5GS_Update_Type::setSMS(uint8_t value) {
SMS = value;
SMS = value & 0x01; // 1 bit
}
//------------------------------------------------------------------------------
......@@ -111,53 +103,49 @@ bool _5GS_Update_Type::getSMS() {
//------------------------------------------------------------------------------
int _5GS_Update_Type::encode2Buffer(uint8_t* buf, int len) {
Logger::nas_mm().debug("encoding _5GS_Update_Type iei(0x%x)", _iei);
if (len < length) {
Logger::nas_mm().error("len is less than %d", length);
return 0;
Logger::nas_mm().debug("Encoding _5GS_Update_Type");
if (len < k5gsUpdateTypeLength) {
Logger::nas_mm().error(
"Buffer length is less than the minimum length of this IE (%d octet)",
k5gsUpdateTypeLength);
return KEncodeDecodeError;
}
int encoded_size = 0;
if (_iei) {
ENCODE_U8(buf + encoded_size, _iei, encoded_size);
}
ENCODE_U8(buf + encoded_size, length, encoded_size);
uint8_t octet = 0;
octet = (EPS_PNB_CIoT << 4) | (_5GS_PNB_CIoT << 2) | (NG_RAN << 1) | SMS;
*(buf + encoded_size) = _iei;
encoded_size++;
*(buf + encoded_size) = length - 2;
encoded_size++;
*(buf + encoded_size) = octet;
encoded_size++;
} else {
//*(buf + encoded_size) = length - 1; encoded_size++;
//*(buf + encoded_size) = _value; encoded_size++; encoded_size++;
}
Logger::nas_mm().debug("encoded _5GS_Update_Type len(%d)", encoded_size);
ENCODE_U8(buf + encoded_size, octet, encoded_size);
Logger::nas_mm().debug("encoded _5GS_Update_Type (len %d)", encoded_size);
return encoded_size;
}
//------------------------------------------------------------------------------
int _5GS_Update_Type::decodeFromBuffer(uint8_t* buf, int len, bool is_option) {
Logger::nas_mm().debug("decoding _5GS_Update_Type iei(0x%x)", *buf);
Logger::nas_mm().debug("Decoding _5GS_Update_Type");
int decoded_size = 0;
if (is_option) {
decoded_size++;
DECODE_U8(buf + decoded_size, _iei, decoded_size);
}
// Length
DECODE_U8(buf + decoded_size, length, decoded_size);
uint8_t octet = 0;
EPS_PNB_CIoT = 0x00;
_5GS_PNB_CIoT = 0x00;
NG_RAN = 0;
SMS = 0;
length = *(buf + decoded_size);
decoded_size++;
octet = *(buf + decoded_size);
decoded_size++;
DECODE_U8(buf + decoded_size, octet, decoded_size);
EPS_PNB_CIoT = (octet & 0x30) >> 4;
_5GS_PNB_CIoT = (octet & 0x0c) >> 2;
NG_RAN = (octet & 0x02) >> 1;
SMS = (octet & 0x01);
Logger::nas_mm().debug(
"decoded _5GS_Update_Type "
"EPS_PNB_CIoT(0x%x),_5GS_PNB_CIoT(0x%x),NG_RAN(0x%x),SMS(0x%x)",
"decoded _5GS_Update_Type, "
"EPS_PNB_CIoT 0x%x, _5GS_PNB_CIoT 0x%x, NG_RAN 0x%x, SMS 0x%x",
EPS_PNB_CIoT, _5GS_PNB_CIoT, NG_RAN, SMS);
Logger::nas_mm().debug("decoded _5GS_Update_Type len(%d)", decoded_size);
Logger::nas_mm().debug("Decoded _5GS_Update_Type (len %d)", decoded_size);
return decoded_size;
}
......@@ -19,18 +19,12 @@
* contact@openairinterface.org
*/
/*! \file _5GS_Update_Type.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef ___5GS_Update_Type_H
#define ___5GS_Update_Type_H
#ifndef _5GS_Update_Type_H
#define _5GS_Update_Type_H
#include <stdint.h>
constexpr uint8_t k5gsUpdateTypeLength = 3;
namespace nas {
class _5GS_Update_Type {
......@@ -55,10 +49,10 @@ class _5GS_Update_Type {
private:
uint8_t _iei;
uint8_t length;
uint8_t EPS_PNB_CIoT;
uint8_t _5GS_PNB_CIoT;
bool NG_RAN;
bool SMS;
uint8_t EPS_PNB_CIoT; // bit 4,5
uint8_t _5GS_PNB_CIoT; // bit 2,3
bool NG_RAN; // bit 1
bool SMS; // bit 0
};
} // namespace nas
......
......@@ -180,7 +180,7 @@ void RegistrationAccept::setMICO_Indication(bool sprti, bool raai) {
//------------------------------------------------------------------------------
void RegistrationAccept::setNetwork_Slicing_Indication(bool dcni, bool nssci) {
ie_network_slicing_indication =
new Network_Slicing_Indication(0x09, dcni, nssci);
new NetworkSlicingIndication(0x09, dcni, nssci);
}
//------------------------------------------------------------------------------
......@@ -636,7 +636,7 @@ int RegistrationAccept::decodeFromBuffer(
} break;
case 0x9: {
Logger::nas_mm().debug("Decoding IEI (0x9)");
ie_network_slicing_indication = new Network_Slicing_Indication();
ie_network_slicing_indication = new NetworkSlicingIndication();
decoded_size += ie_network_slicing_indication->decodeFromBuffer(
buf + decoded_size, len - decoded_size, true);
octet = *(buf + decoded_size);
......
......@@ -98,7 +98,7 @@ class RegistrationAccept {
PDU_Session_Reactivation_Result_Error_Cause*
ie_pdu_session_reactivation_result_error_cause;
MICOIndication* ie_MICO_indicationl;
Network_Slicing_Indication* ie_network_slicing_indication;
NetworkSlicingIndication* ie_network_slicing_indication;
GPRS_Timer_3* ie_T3512_value;
GPRS_Timer_2* ie_Non_3GPP_de_registration_timer_value;
GPRS_Timer_2* ie_T3502_value;
......
This diff is collapsed.
......@@ -145,7 +145,7 @@ class RegistrationRequest : public NasMmPlainHeader {
// bool getEpsNasMessageContainer(bstring& epsNas);
void setEPS_Bearer_Context_Status(uint16_t value);
uint16_t getEpsBearerContextStatus();
bool getEpsBearerContextStatus(uint16_t& value);
public:
// NasMmPlainHeader* plain_header;
......@@ -173,14 +173,15 @@ class RegistrationRequest : public NasMmPlainHeader {
ie_eps_nas_message_container; // Optional
std::optional<LADN_Indication> ie_ladn_indication; // Optional
std::optional<Payload_Container_Type> ie_payload_container_type; // Optional
Payload_Container* ie_payload_container; // Optional
Network_Slicing_Indication* ie_network_slicing_indication; // Optional
_5GS_Update_Type* ie_5gs_update_type; // Optional
std::optional<Payload_Container> ie_payload_container; // Optional
std::optional<NetworkSlicingIndication>
ie_network_slicing_indication; // Optional
std::optional<_5GS_Update_Type> ie_5gs_update_type; // Optional
// TODO: Mobile station classmark 2
// TODO: Supported codecs
NAS_Message_Container* ie_nas_message_container; // Optional
EPS_Bearer_Context_Status* ie_eps_bearer_context_status; // Optional
std::optional<NAS_Message_Container> ie_nas_message_container; // Optional
std::optional<EPS_Bearer_Context_Status>
ie_eps_bearer_context_status; // Optional
// TODO: Requested extended DRX parameters
// TODO: T3324 value
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment