Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-AMF
Commits
b1839609
Commit
b1839609
authored
Jan 12, 2023
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update GPRS Timer
parent
e4f9d058
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
167 additions
and
147 deletions
+167
-147
src/nas/common/Ie_Const.hpp
src/nas/common/Ie_Const.hpp
+1
-0
src/nas/common/NasIeHeader.hpp
src/nas/common/NasIeHeader.hpp
+2
-2
src/nas/ies/GprsTimer2.cpp
src/nas/ies/GprsTimer2.cpp
+8
-8
src/nas/ies/GprsTimer2.hpp
src/nas/ies/GprsTimer2.hpp
+4
-4
src/nas/ies/GprsTimer3.cpp
src/nas/ies/GprsTimer3.cpp
+9
-9
src/nas/ies/GprsTimer3.hpp
src/nas/ies/GprsTimer3.hpp
+4
-4
src/nas/ies/SOR_Transparent_Container.cpp
src/nas/ies/SOR_Transparent_Container.cpp
+80
-58
src/nas/ies/SOR_Transparent_Container.hpp
src/nas/ies/SOR_Transparent_Container.hpp
+17
-19
src/nas/msgs/DLNASTransport.cpp
src/nas/msgs/DLNASTransport.cpp
+2
-2
src/nas/msgs/DLNASTransport.hpp
src/nas/msgs/DLNASTransport.hpp
+1
-1
src/nas/msgs/RegistrationAccept.cpp
src/nas/msgs/RegistrationAccept.cpp
+20
-20
src/nas/msgs/RegistrationAccept.hpp
src/nas/msgs/RegistrationAccept.hpp
+8
-8
src/nas/msgs/RegistrationComplete.cpp
src/nas/msgs/RegistrationComplete.cpp
+2
-3
src/nas/msgs/RegistrationComplete.hpp
src/nas/msgs/RegistrationComplete.hpp
+1
-1
src/nas/msgs/RegistrationReject.cpp
src/nas/msgs/RegistrationReject.cpp
+6
-6
src/nas/msgs/RegistrationReject.hpp
src/nas/msgs/RegistrationReject.hpp
+2
-2
No files found.
src/nas/common/Ie_Const.hpp
View file @
b1839609
...
...
@@ -132,6 +132,7 @@ constexpr uint8_t kIeiGprsTimer2T3546 = 0x5F;
constexpr
uint8_t
kIeiEpsNasMessageContainer
=
0x70
;
constexpr
uint8_t
kIeiNasMessageContainer
=
0x71
;
constexpr
uint8_t
kIeiPduSessionReactivationResultErrorCause
=
0x72
;
constexpr
uint8_t
kIeiSorTransparentContainer
=
0x73
;
constexpr
uint8_t
kIeiLadnIndication
=
0x74
;
constexpr
uint8_t
kIeiLadnInformation
=
0x79
;
constexpr
uint8_t
kIei5gGuti
=
0x77
;
...
...
src/nas/common/NasIeHeader.hpp
View file @
b1839609
...
...
@@ -41,8 +41,8 @@
#include "EPS_NAS_Message_Container.hpp"
#include "EPS_NAS_Security_Algorithms.hpp"
#include "Extended_DRX_Parameters.hpp"
#include "G
PRS_Timer_
2.hpp"
#include "G
PRS_Timer_
3.hpp"
#include "G
prsTimer
2.hpp"
#include "G
prsTimer
3.hpp"
#include "IMEISV_Request.hpp"
#include "LADN_Indication.hpp"
#include "MA_PDU_Session_Information.hpp"
...
...
src/nas/ies/G
PRS_Timer_
2.cpp
→
src/nas/ies/G
prsTimer
2.cpp
View file @
b1839609
...
...
@@ -19,38 +19,38 @@
* contact@openairinterface.org
*/
#include "G
PRS_Timer_
2.hpp"
#include "G
prsTimer
2.hpp"
using
namespace
nas
;
//------------------------------------------------------------------------------
G
PRS_Timer_2
::
GPRS_Timer_
2
(
uint8_t
iei
)
:
Type4NasIe
(
iei
),
value_
()
{
G
prsTimer2
::
GprsTimer
2
(
uint8_t
iei
)
:
Type4NasIe
(
iei
),
value_
()
{
SetLengthIndicator
(
1
);
SetIeName
(
kGprsTimer2IeName
);
}
//------------------------------------------------------------------------------
G
PRS_Timer_2
::
GPRS_Timer_
2
(
const
uint8_t
iei
,
uint8_t
value
)
:
Type4NasIe
(
iei
)
{
G
prsTimer2
::
GprsTimer
2
(
const
uint8_t
iei
,
uint8_t
value
)
:
Type4NasIe
(
iei
)
{
value_
=
value
;
SetLengthIndicator
(
1
);
SetIeName
(
kGprsTimer2IeName
);
}
//------------------------------------------------------------------------------
G
PRS_Timer_2
::~
GPRS_Timer_
2
()
{}
G
prsTimer2
::~
GprsTimer
2
()
{}
//------------------------------------------------------------------------------
void
G
PRS_Timer_
2
::
setValue
(
uint8_t
value
)
{
void
G
prsTimer
2
::
setValue
(
uint8_t
value
)
{
value_
=
value
;
}
//------------------------------------------------------------------------------
uint8_t
G
PRS_Timer_
2
::
getValue
()
const
{
uint8_t
G
prsTimer
2
::
getValue
()
const
{
return
value_
;
}
//------------------------------------------------------------------------------
int
G
PRS_Timer_
2
::
Encode
(
uint8_t
*
buf
,
int
len
)
{
int
G
prsTimer
2
::
Encode
(
uint8_t
*
buf
,
int
len
)
{
Logger
::
nas_mm
().
debug
(
"Encoding %s"
,
GetIeName
().
c_str
());
int
ie_len
=
GetIeLength
();
...
...
@@ -74,7 +74,7 @@ int GPRS_Timer_2::Encode(uint8_t* buf, int len) {
}
//------------------------------------------------------------------------------
int
G
PRS_Timer_
2
::
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_iei
)
{
int
G
prsTimer
2
::
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_iei
)
{
if
(
len
<
kGprsTimer2Length
)
{
Logger
::
nas_mm
().
error
(
"Buffer length is less than the minimum length of this IE (%d octet)"
,
...
...
src/nas/ies/G
PRS_Timer_
2.hpp
→
src/nas/ies/G
prsTimer
2.hpp
View file @
b1839609
...
...
@@ -31,11 +31,11 @@ constexpr auto kGprsTimer2IeName = "GPRS Timer 2";
namespace
nas
{
class
G
PRS_Timer_
2
:
public
Type4NasIe
{
class
G
prsTimer
2
:
public
Type4NasIe
{
public:
G
PRS_Timer_
2
(
uint8_t
iei
);
G
PRS_Timer_
2
(
const
uint8_t
iei
,
uint8_t
value
);
~
G
PRS_Timer_
2
();
G
prsTimer
2
(
uint8_t
iei
);
G
prsTimer
2
(
const
uint8_t
iei
,
uint8_t
value
);
~
G
prsTimer
2
();
int
Encode
(
uint8_t
*
buf
,
int
len
);
int
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_iei
);
...
...
src/nas/ies/G
PRS_Timer_
3.cpp
→
src/nas/ies/G
prsTimer
3.cpp
View file @
b1839609
...
...
@@ -19,18 +19,18 @@
* contact@openairinterface.org
*/
#include "G
PRS_Timer_
3.hpp"
#include "G
prsTimer
3.hpp"
using
namespace
nas
;
//------------------------------------------------------------------------------
G
PRS_Timer_3
::
GPRS_Timer_
3
(
uint8_t
iei
)
:
Type4NasIe
(
iei
),
unit_
(),
value_
()
{
G
prsTimer3
::
GprsTimer
3
(
uint8_t
iei
)
:
Type4NasIe
(
iei
),
unit_
(),
value_
()
{
SetLengthIndicator
(
1
);
SetIeName
(
kGprsTimer3IeName
);
}
//------------------------------------------------------------------------------
G
PRS_Timer_3
::
GPRS_Timer_
3
(
const
uint8_t
iei
,
uint8_t
unit
,
uint8_t
value
)
G
prsTimer3
::
GprsTimer
3
(
const
uint8_t
iei
,
uint8_t
unit
,
uint8_t
value
)
:
Type4NasIe
(
iei
)
{
unit_
=
unit
;
value_
=
value
;
...
...
@@ -39,26 +39,26 @@ GPRS_Timer_3::GPRS_Timer_3(const uint8_t iei, uint8_t unit, uint8_t value)
}
//------------------------------------------------------------------------------
G
PRS_Timer_3
::~
GPRS_Timer_
3
()
{}
G
prsTimer3
::~
GprsTimer
3
()
{}
//------------------------------------------------------------------------------
void
G
PRS_Timer_
3
::
setValue
(
uint8_t
unit
,
uint8_t
value
)
{
void
G
prsTimer
3
::
setValue
(
uint8_t
unit
,
uint8_t
value
)
{
unit_
=
unit
;
value_
=
value
;
}
//------------------------------------------------------------------------------
uint8_t
G
PRS_Timer_
3
::
getUnit
()
const
{
uint8_t
G
prsTimer
3
::
getUnit
()
const
{
return
unit_
;
}
//------------------------------------------------------------------------------
uint8_t
G
PRS_Timer_
3
::
getValue
()
const
{
uint8_t
G
prsTimer
3
::
getValue
()
const
{
return
value_
;
}
//------------------------------------------------------------------------------
int
G
PRS_Timer_
3
::
Encode
(
uint8_t
*
buf
,
int
len
)
{
int
G
prsTimer
3
::
Encode
(
uint8_t
*
buf
,
int
len
)
{
Logger
::
nas_mm
().
debug
(
"Encoding %s"
,
GetIeName
().
c_str
());
int
ie_len
=
GetIeLength
();
...
...
@@ -83,7 +83,7 @@ int GPRS_Timer_3::Encode(uint8_t* buf, int len) {
}
//------------------------------------------------------------------------------
int
G
PRS_Timer_
3
::
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_iei
)
{
int
G
prsTimer
3
::
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_iei
)
{
if
(
len
<
kGprsTimer3Length
)
{
Logger
::
nas_mm
().
error
(
"Buffer length is less than the minimum length of this IE (%d octet)"
,
...
...
src/nas/ies/G
PRS_Timer_
3.hpp
→
src/nas/ies/G
prsTimer
3.hpp
View file @
b1839609
...
...
@@ -30,11 +30,11 @@ constexpr auto kGprsTimer3IeName = "GPRS Timer 3";
namespace
nas
{
class
G
PRS_Timer_
3
:
public
Type4NasIe
{
class
G
prsTimer
3
:
public
Type4NasIe
{
public:
G
PRS_Timer_
3
(
uint8_t
iei
);
G
PRS_Timer_
3
(
uint8_t
iei
,
uint8_t
unit
,
uint8_t
value
);
~
G
PRS_Timer_
3
();
G
prsTimer
3
(
uint8_t
iei
);
G
prsTimer
3
(
uint8_t
iei
,
uint8_t
unit
,
uint8_t
value
);
~
G
prsTimer
3
();
int
Encode
(
uint8_t
*
buf
,
int
len
);
int
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_option
);
...
...
src/nas/ies/SOR_Transparent_Container.cpp
View file @
b1839609
...
...
@@ -19,100 +19,122 @@
* contact@openairinterface.org
*/
/*! \file
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "SOR_Transparent_Container.hpp"
#include "logger.hpp"
using
namespace
nas
;
//------------------------------------------------------------------------------
SOR_Transparent_Container
::
SOR_Transparent_Container
(
uint8_t
iei
)
:
_value
()
{
_iei
=
iei
;
HEADER
=
0
;
SOR_Transparent_Container
::
SOR_Transparent_Container
()
:
Type6NasIe
(
kIeiSorTransparentContainer
),
header_
(),
sor_mac_i_
()
{
SetLengthIndicator
(
kSorTransparentContainerIeMinimumLength
);
SetIeName
(
kSorTransparentContainerIeName
);
}
//------------------------------------------------------------------------------
SOR_Transparent_Container
::
SOR_Transparent_Container
(
const
uint8_t
iei
,
uint8_t
header
,
uint8_t
*
value
)
{
_iei
=
iei
;
HEADER
=
header
;
uint8_t
header
,
const
uint8_t
(
&
value
)[
16
])
{
header_
=
header
;
for
(
int
i
=
0
;
i
<
16
;
i
++
)
{
this
->
_value
[
i
]
=
value
[
i
];
this
->
sor_mac_i_
[
i
]
=
value
[
i
];
}
SetLengthIndicator
(
kSorTransparentContainerIeMinimumLength
);
SetIeName
(
kSorTransparentContainerIeName
);
}
//------------------------------------------------------------------------------
SOR_Transparent_Container
::
SOR_Transparent_Container
()
:
_iei
(),
HEADER
(),
_value
()
{}
//------------------------------------------------------------------------------
SOR_Transparent_Container
::~
SOR_Transparent_Container
()
{}
//------------------------------------------------------------------------------
uint8_t
SOR_Transparent_Container
::
getValue
()
{
for
(
int
j
=
0
;
j
<
16
;
j
++
)
{
Logger
::
nas_mm
().
debug
(
"decoded SOR_Transparent_Container value(0x%2x)"
,
_value
[
j
]);
void
SOR_Transparent_Container
::
getValue
(
uint8_t
(
&
value
)[
16
])
const
{
for
(
int
i
=
0
;
i
<
16
;
i
++
)
{
value
[
i
]
=
sor_mac_i_
[
i
];
}
return
1
;
}
//------------------------------------------------------------------------------
int
SOR_Transparent_Container
::
Encode
(
uint8_t
*
buf
,
int
len
)
{
Logger
::
nas_mm
().
debug
(
"encoding SOR_Transparent_Container iei(0x%x)"
,
_iei
);
if
(
len
<
18
)
{
Logger
::
nas_mm
().
error
(
"len is less than 18"
);
return
0
;
Logger
::
nas_mm
().
debug
(
"Encoding %s"
,
GetIeName
().
c_str
());
int
ie_len
=
GetIeLength
();
if
(
len
<
ie_len
)
{
// Length of the content + IEI/Len
Logger
::
nas_mm
().
error
(
"Size of the buffer is not enough to store this IE (IE len %d)"
,
ie_len
);
return
KEncodeDecodeError
;
}
int
encoded_size
=
0
;
if
(
_iei
)
{
*
(
buf
+
encoded_size
)
=
_iei
;
encoded_size
++
;
*
(
buf
+
encoded_size
)
=
17
;
encoded_size
++
;
encoded_size
++
;
*
(
buf
+
encoded_size
)
=
HEADER
;
encoded_size
++
;
for
(
int
i
=
0
;
i
<
16
;
i
++
)
{
*
(
buf
+
encoded_size
)
=
_value
[
i
];
encoded_size
++
;
}
return
encoded_size
;
}
else
{
// *(buf + encoded_size) = length - 1; encoded_size++;
// *(buf + encoded_size) = _value; encoded_size++; encoded_size++;
// IEI and Length (later)
int
len_pos
=
0
;
int
encoded_header_size
=
Type6NasIe
::
Encode
(
buf
+
encoded_size
,
len
,
len_pos
);
if
(
encoded_header_size
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
encoded_size
+=
encoded_header_size
;
// Header
ENCODE_U8
(
buf
+
encoded_size
,
header_
,
encoded_size
);
// SOR-MAC-I
for
(
int
i
=
0
;
i
<
16
;
i
++
)
{
ENCODE_U8
(
buf
+
encoded_size
,
sor_mac_i_
[
i
],
encoded_size
);
}
// TODO: Encode spare for the rest
uint8_t
spare
=
0
;
int
spare_len
=
ie_len
-
encoded_size
;
for
(
int
i
=
0
;
i
<
spare_len
;
i
++
)
{
ENCODE_U8
(
buf
+
encoded_size
,
spare
,
encoded_size
);
}
// Encode length
int
encoded_len_ie
=
0
;
ENCODE_U16
(
buf
+
len_pos
,
encoded_size
-
GetHeaderLength
(),
encoded_len_ie
);
Logger
::
nas_mm
().
debug
(
"
encoded SOR_Transparent_Container len(%d)"
,
encoded_size
);
"
Encoded %s, len (%d)"
,
GetIeName
().
c_str
()
,
encoded_size
);
return
encoded_size
;
}
//------------------------------------------------------------------------------
int
SOR_Transparent_Container
::
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_option
)
{
Logger
::
nas_mm
().
debug
(
"decoding SOR_Transparent_Container iei(0x%x)"
,
*
buf
);
int
decoded_size
=
0
;
if
(
is_option
)
{
decoded_size
++
;
int
SOR_Transparent_Container
::
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_iei
)
{
if
(
len
<
kSorTransparentContainerMinimumLength
)
{
Logger
::
nas_mm
().
error
(
"Buffer length is less than the minimum length of this IE (%d octet)"
,
kSorTransparentContainerMinimumLength
);
return
KEncodeDecodeError
;
}
decoded_size
++
;
decoded_size
++
;
HEADER
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
uint8_t
decoded_size
=
0
;
uint8_t
octet
=
0
;
Logger
::
nas_mm
().
debug
(
"Decoding %s"
,
GetIeName
().
c_str
());
// IEI and Length
int
decoded_header_size
=
Type6NasIe
::
Decode
(
buf
+
decoded_size
,
len
,
is_iei
);
if
(
decoded_header_size
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
decoded_size
+=
decoded_header_size
;
DECODE_U8
(
buf
+
decoded_size
,
header_
,
decoded_size
);
// Decode SOR-MAC-I
for
(
int
i
=
0
;
i
<
16
;
i
++
)
{
_value
[
i
]
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
DECODE_U8
(
buf
+
decoded_size
,
sor_mac_i_
[
i
],
decoded_size
);
}
// TODO: decode the rest as spare for now
uint8_t
spare
=
0
;
for
(
int
i
=
0
;
i
<
(
GetLengthIndicator
()
-
kSorTransparentContainerIeMinimumLength
);
i
++
)
{
DECODE_U8
(
buf
+
decoded_size
,
spare
,
decoded_size
);
}
Logger
::
nas_mm
().
debug
(
"Decoded SOR-MAC-I"
);
for
(
int
j
=
0
;
j
<
16
;
j
++
)
{
Logger
::
nas_mm
().
debug
(
"decoded SOR_Transparent_Container value(0x%2x)"
,
_value
[
j
]);
Logger
::
nas_mm
().
debug
(
"Value 0x%2x"
,
sor_mac_i_
[
j
]);
}
Logger
::
nas_mm
().
debug
(
"
decoded SOR_Transparent_Container len(%d)"
,
decoded_size
);
"
Decoded %s, len (%d)"
,
GetIeName
().
c_str
()
,
decoded_size
);
return
decoded_size
;
}
src/nas/ies/SOR_Transparent_Container.hpp
View file @
b1839609
...
...
@@ -18,36 +18,34 @@
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _SOR_TRANSPARENT_CONTAINER_H_
#define _SOR_TRANSPARENT_CONTAINER_H_
/*! \file
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef __SOR_Transparent_Container_H_
#define __SOR_Transparent_Container_H_
#include "Type6NasIe.hpp"
#include <stdint.h>
constexpr
uint8_t
kSorTransparentContainerMinimumLength
=
20
;
constexpr
uint8_t
kSorTransparentContainerIeMinimumLength
=
17
;
constexpr
auto
kSorTransparentContainerIeName
=
"SOR Transparent Container"
;
namespace
nas
{
class
SOR_Transparent_Container
{
class
SOR_Transparent_Container
:
Type6NasIe
{
public:
SOR_Transparent_Container
();
SOR_Transparent_Container
(
uint8_t
iei
);
SOR_Transparent_Container
(
const
uint8_t
iei
,
uint8_t
header
,
uint8_t
*
value
);
SOR_Transparent_Container
(
uint8_t
header
,
const
uint8_t
(
&
value
)[
16
]);
~
SOR_Transparent_Container
();
// void setValue(uint8_t iei, uint8_t value);
int
Encode
(
uint8_t
*
buf
,
int
len
);
int
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_option
);
uint8_t
getValue
();
int
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_iei
);
void
getValue
(
uint8_t
(
&
value
)[
16
])
const
;
private:
uint8_t
_iei
;
uint8_t
HEADER
;
uint8_t
_value
[
16
];
uint8_t
header_
;
uint8_t
sor_mac_i_
[
16
];
std
::
optional
<
uint8_t
>
counter_
;
// Other IEs
};
}
// namespace nas
...
...
src/nas/msgs/DLNASTransport.cpp
View file @
b1839609
...
...
@@ -89,7 +89,7 @@ void DLNASTransport::set_5GMM_Cause(uint8_t value) {
//------------------------------------------------------------------------------
void
DLNASTransport
::
setBack_off_timer_value
(
uint8_t
unit
,
uint8_t
value
)
{
ie_back_off_timer_value
=
new
G
PRS_Timer_
3
(
0x37
,
unit
,
value
);
ie_back_off_timer_value
=
new
G
prsTimer
3
(
0x37
,
unit
,
value
);
}
//------------------------------------------------------------------------------
...
...
@@ -219,7 +219,7 @@ int DLNASTransport::Decode(NasMmPlainHeader* header, uint8_t* buf, int len) {
}
break
;
case
0x37
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI (0x37)"
);
ie_back_off_timer_value
=
new
G
PRS_Timer_
3
(
kIeiGprsTimer3BackOffTimer
);
ie_back_off_timer_value
=
new
G
prsTimer
3
(
kIeiGprsTimer3BackOffTimer
);
decoded_size
+=
ie_back_off_timer_value
->
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
octet
=
*
(
buf
+
decoded_size
);
...
...
src/nas/msgs/DLNASTransport.hpp
View file @
b1839609
...
...
@@ -55,7 +55,7 @@ class DLNASTransport {
PDU_Session_Identity_2
*
ie_pdu_session_identity_2
;
Additional_Information
*
ie_additional_information
;
_5GMM_Cause
*
ie_5gmm_cause
;
G
PRS_Timer_
3
*
ie_back_off_timer_value
;
G
prsTimer
3
*
ie_back_off_timer_value
;
};
}
// namespace nas
...
...
src/nas/msgs/RegistrationAccept.cpp
View file @
b1839609
...
...
@@ -209,26 +209,26 @@ void RegistrationAccept::setNetwork_Slicing_Indication(bool dcni, bool nssci) {
//------------------------------------------------------------------------------
void
RegistrationAccept
::
setT3512_Value
(
uint8_t
unit
,
uint8_t
value
)
{
ie_T3512_value
=
std
::
make_optional
<
G
PRS_Timer_
3
>
(
kIeiGprsTimer3T3512
,
unit
,
value
);
std
::
make_optional
<
G
prsTimer
3
>
(
kIeiGprsTimer3T3512
,
unit
,
value
);
}
//------------------------------------------------------------------------------
void
RegistrationAccept
::
setNon_3GPP_de_registration_timer_value
(
uint8_t
value
)
{
ie_Non_3GPP_de_registration_timer_value
=
std
::
make_optional
<
G
PRS_Timer_
2
>
(
ie_Non_3GPP_de_registration_timer_value
=
std
::
make_optional
<
G
prsTimer
2
>
(
kIeiGprsTimer2Non3gppDeregistration
,
value
);
}
//------------------------------------------------------------------------------
void
RegistrationAccept
::
setT3502_value
(
uint8_t
value
)
{
ie_T3502_value
=
std
::
make_optional
<
G
PRS_Timer_
2
>
(
kIeiGprsTimer2T3502
,
value
);
ie_T3502_value
=
std
::
make_optional
<
G
prsTimer
2
>
(
kIeiGprsTimer2T3502
,
value
);
}
//------------------------------------------------------------------------------
void
RegistrationAccept
::
setSOR_Transparent_Container
(
uint8_t
header
,
uint8_t
*
value
)
{
uint8_t
header
,
const
uint8_t
(
&
value
)[
16
]
)
{
ie_sor_transparent_container
=
std
::
make_optional
<
SOR_Transparent_Container
>
(
0x73
,
header
,
value
);
std
::
make_optional
<
SOR_Transparent_Container
>
(
header
,
value
);
}
//------------------------------------------------------------------------------
...
...
@@ -268,17 +268,17 @@ void RegistrationAccept::setExtended_DRX_Parameters(
//------------------------------------------------------------------------------
void
RegistrationAccept
::
setT3447_Value
(
uint8_t
unit
,
uint8_t
value
)
{
ie_T3447_value
=
std
::
make_optional
<
G
PRS_Timer_
3
>
(
0x6C
,
unit
,
value
);
ie_T3447_value
=
std
::
make_optional
<
G
prsTimer
3
>
(
0x6C
,
unit
,
value
);
}
//------------------------------------------------------------------------------
void
RegistrationAccept
::
setT3448_Value
(
uint8_t
unit
,
uint8_t
value
)
{
ie_T3448_value
=
std
::
make_optional
<
G
PRS_Timer_
3
>
(
0x6B
,
unit
,
value
);
ie_T3448_value
=
std
::
make_optional
<
G
prsTimer
3
>
(
0x6B
,
unit
,
value
);
}
//------------------------------------------------------------------------------
void
RegistrationAccept
::
setT3324_Value
(
uint8_t
unit
,
uint8_t
value
)
{
ie_T3324_value
=
std
::
make_optional
<
G
PRS_Timer_
3
>
(
0x6A
,
unit
,
value
);
ie_T3324_value
=
std
::
make_optional
<
G
prsTimer
3
>
(
0x6A
,
unit
,
value
);
}
//------------------------------------------------------------------------------
...
...
@@ -792,31 +792,31 @@ int RegistrationAccept::Decode(uint8_t* buf, int len) {
*/
case
kIeiGprsTimer3T3512
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiGprsTimer3T3512
);
G
PRS_Timer_
3
ie_T3512_value_tmp
(
kIeiGprsTimer3T3512
);
G
prsTimer
3
ie_T3512_value_tmp
(
kIeiGprsTimer3T3512
);
decoded_size
+=
ie_T3512_value_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
ie_T3512_value
=
std
::
optional
<
G
PRS_Timer_
3
>
(
ie_T3512_value_tmp
);
ie_T3512_value
=
std
::
optional
<
G
prsTimer
3
>
(
ie_T3512_value_tmp
);
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiGprsTimer2Non3gppDeregistration
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiGprsTimer2Non3gppDeregistration
);
G
PRS_Timer_
2
ie_Non_3GPP_de_registration_timer_value_tmp
(
G
prsTimer
2
ie_Non_3GPP_de_registration_timer_value_tmp
(
kIeiGprsTimer2Non3gppDeregistration
);
decoded_size
+=
ie_Non_3GPP_de_registration_timer_value_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
ie_Non_3GPP_de_registration_timer_value
=
std
::
optional
<
G
PRS_Timer_
2
>
(
ie_Non_3GPP_de_registration_timer_value
=
std
::
optional
<
G
prsTimer
2
>
(
ie_Non_3GPP_de_registration_timer_value_tmp
);
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiGprsTimer2T3502
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiGprsTimer2T3502
);
G
PRS_Timer_
2
ie_T3502_value_tmp
(
kIeiGprsTimer2T3502
);
G
prsTimer
2
ie_T3502_value_tmp
(
kIeiGprsTimer2T3502
);
decoded_size
+=
ie_T3502_value_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
ie_T3502_value
=
std
::
optional
<
G
PRS_Timer_
2
>
(
ie_T3502_value_tmp
);
ie_T3502_value
=
std
::
optional
<
G
prsTimer
2
>
(
ie_T3502_value_tmp
);
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
...
...
@@ -871,28 +871,28 @@ int RegistrationAccept::Decode(uint8_t* buf, int len) {
}
break
;
case
kIeiGprsTimer3T3447
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiGprsTimer3T3447
);
G
PRS_Timer_
3
ie_T3447_value_tmp
(
kIeiGprsTimer3T3447
);
G
prsTimer
3
ie_T3447_value_tmp
(
kIeiGprsTimer3T3447
);
decoded_size
+=
ie_T3447_value_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
ie_T3447_value
=
std
::
optional
<
G
PRS_Timer_
3
>
(
ie_T3447_value_tmp
);
ie_T3447_value
=
std
::
optional
<
G
prsTimer
3
>
(
ie_T3447_value_tmp
);
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiGprsTimer3T3348
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiGprsTimer3T3348
);
G
PRS_Timer_
3
ie_T3448_value_tmp
(
kIeiGprsTimer3T3348
);
G
prsTimer
3
ie_T3448_value_tmp
(
kIeiGprsTimer3T3348
);
decoded_size
+=
ie_T3448_value_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
ie_T3448_value
=
std
::
optional
<
G
PRS_Timer_
3
>
(
ie_T3448_value_tmp
);
ie_T3448_value
=
std
::
optional
<
G
prsTimer
3
>
(
ie_T3448_value_tmp
);
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kIeiGprsTimer3T3324
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiGprsTimer3T3324
);
G
PRS_Timer_
3
ie_T3324_value_tmp
(
kIeiGprsTimer3T3324
);
G
prsTimer
3
ie_T3324_value_tmp
(
kIeiGprsTimer3T3324
);
decoded_size
+=
ie_T3324_value_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
ie_T3324_value
=
std
::
optional
<
G
PRS_Timer_
3
>
(
ie_T3324_value_tmp
);
ie_T3324_value
=
std
::
optional
<
G
prsTimer
3
>
(
ie_T3324_value_tmp
);
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
...
...
src/nas/msgs/RegistrationAccept.hpp
View file @
b1839609
...
...
@@ -107,7 +107,7 @@ class RegistrationAccept : public NasMmPlainHeader {
// TODO: Emergency number list
// TODO: Extended emergency number list
void
setSOR_Transparent_Container
(
uint8_t
header
,
uint8_t
*
value
);
void
setSOR_Transparent_Container
(
uint8_t
header
,
const
uint8_t
(
&
value
)[
16
]
);
// TODO: Get
void
setEAP_Message
(
bstring
eap
);
...
...
@@ -167,10 +167,10 @@ class RegistrationAccept : public NasMmPlainHeader {
std
::
optional
<
NetworkSlicingIndication
>
ie_network_slicing_indication
;
// Optional
// TODO: Service Area List
std
::
optional
<
G
PRS_Timer_
3
>
ie_T3512_value
;
// Optional
std
::
optional
<
G
PRS_Timer_
2
>
std
::
optional
<
G
prsTimer
3
>
ie_T3512_value
;
// Optional
std
::
optional
<
G
prsTimer
2
>
ie_Non_3GPP_de_registration_timer_value
;
// Optional
std
::
optional
<
G
PRS_Timer_2
>
ie_T3502_value
;
// Optional
std
::
optional
<
G
prsTimer2
>
ie_T3502_value
;
// Optional
// TODO: Emergency number list
// TODO: Extended emergency number list
std
::
optional
<
SOR_Transparent_Container
>
...
...
@@ -184,10 +184,10 @@ class RegistrationAccept : public NasMmPlainHeader {
std
::
optional
<
EpsBearerContextStatus
>
ie_eps_bearer_context_status
;
// Optional
std
::
optional
<
Extended_DRX_Parameters
>
ie_extended_drx_parameters
;
// Optional
std
::
optional
<
G
PRS_Timer_
3
>
ie_T3447_value
;
// Optional
std
::
optional
<
G
PRS_Timer_
3
>
ie_T3448_value
;
// Optional
std
::
optional
<
G
PRS_Timer_
3
>
ie_T3324_value
;
// Optional
ie_extended_drx_parameters
;
// Optional
std
::
optional
<
G
prsTimer
3
>
ie_T3447_value
;
// Optional
std
::
optional
<
G
prsTimer
3
>
ie_T3448_value
;
// Optional
std
::
optional
<
G
prsTimer
3
>
ie_T3324_value
;
// Optional
std
::
optional
<
UE_Radio_Capability_ID
>
ie_ue_radio_capability_id
;
// Which Release 16.x.x?
std
::
optional
<
NSSAI
>
ie_pending_nssai
;
// Which Release 16.x.x?
...
...
src/nas/msgs/RegistrationComplete.cpp
View file @
b1839609
...
...
@@ -52,9 +52,8 @@ void RegistrationComplete::setHeader(uint8_t security_header_type) {
//------------------------------------------------------------------------------
void
RegistrationComplete
::
setSOR_Transparent_Container
(
uint8_t
header
,
uint8_t
*
value
)
{
ie_sor_transparent_container
=
new
SOR_Transparent_Container
(
0x73
,
header
,
value
);
uint8_t
header
,
const
uint8_t
(
&
value
)[
16
])
{
ie_sor_transparent_container
=
new
SOR_Transparent_Container
(
header
,
value
);
}
//------------------------------------------------------------------------------
...
...
src/nas/msgs/RegistrationComplete.hpp
View file @
b1839609
...
...
@@ -40,7 +40,7 @@ class RegistrationComplete {
int
Encode
(
uint8_t
*
buf
,
int
len
);
int
Decode
(
NasMmPlainHeader
*
header
,
uint8_t
*
buf
,
int
len
);
void
setHeader
(
uint8_t
security_header_type
);
void
setSOR_Transparent_Container
(
uint8_t
header
,
uint8_t
*
value
);
void
setSOR_Transparent_Container
(
uint8_t
header
,
const
uint8_t
(
&
value
)[
16
]
);
public:
NasMmPlainHeader
*
plain_header
;
...
...
src/nas/msgs/RegistrationReject.cpp
View file @
b1839609
...
...
@@ -51,12 +51,12 @@ void RegistrationReject::set_5GMM_Cause(uint8_t value) {
//------------------------------------------------------------------------------
void
RegistrationReject
::
setGPRS_Timer_2_3346
(
uint8_t
value
)
{
ie_T3346_value
=
std
::
make_optional
<
G
PRS_Timer_
2
>
(
kT3346Value
,
value
);
ie_T3346_value
=
std
::
make_optional
<
G
prsTimer
2
>
(
kT3346Value
,
value
);
}
//------------------------------------------------------------------------------
void
RegistrationReject
::
setGPRS_Timer_2_3502
(
uint8_t
value
)
{
ie_T3502_value
=
std
::
make_optional
<
G
PRS_Timer_
2
>
(
kT3502Value
,
value
);
ie_T3502_value
=
std
::
make_optional
<
G
prsTimer
2
>
(
kT3502Value
,
value
);
}
//------------------------------------------------------------------------------
...
...
@@ -154,19 +154,19 @@ int RegistrationReject::Decode(
switch
(
octet
)
{
case
kT3346Value
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x5F: T3346 Value"
);
G
PRS_Timer_
2
ie_T3346_value_tmp
(
kT3346Value
);
G
prsTimer
2
ie_T3346_value_tmp
(
kT3346Value
);
decoded_size
+=
ie_T3346_value_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
ie_T3346_value
=
std
::
optional
<
G
PRS_Timer_
2
>
(
ie_T3346_value_tmp
);
ie_T3346_value
=
std
::
optional
<
G
prsTimer
2
>
(
ie_T3346_value_tmp
);
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
case
kT3502Value
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x16: T3502 Value"
);
G
PRS_Timer_
2
ie_T3502_value_tmp
(
kT3502Value
);
G
prsTimer
2
ie_T3502_value_tmp
(
kT3502Value
);
decoded_size
+=
ie_T3502_value_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
ie_T3502_value
=
std
::
optional
<
G
PRS_Timer_
2
>
(
ie_T3502_value_tmp
);
ie_T3502_value
=
std
::
optional
<
G
prsTimer
2
>
(
ie_T3502_value_tmp
);
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
...
...
src/nas/msgs/RegistrationReject.hpp
View file @
b1839609
...
...
@@ -53,8 +53,8 @@ class RegistrationReject : public NasMmPlainHeader {
public:
_5GMM_Cause
ie_5gmm_cause
;
// Mandatory
std
::
optional
<
G
PRS_Timer_2
>
ie_T3346_value
;
// Optional
std
::
optional
<
G
PRS_Timer_2
>
ie_T3502_value
;
// Optional
std
::
optional
<
G
prsTimer2
>
ie_T3346_value
;
// Optional
std
::
optional
<
G
prsTimer2
>
ie_T3502_value
;
// Optional
std
::
optional
<
EAP_Message
>
ie_eap_message
;
// Optional
std
::
optional
<
Rejected_NSSAI
>
ie_rejected_nssai
;
// Release 16.4.1
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment