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
Show 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;
...
@@ -132,6 +132,7 @@ constexpr uint8_t kIeiGprsTimer2T3546 = 0x5F;
constexpr
uint8_t
kIeiEpsNasMessageContainer
=
0x70
;
constexpr
uint8_t
kIeiEpsNasMessageContainer
=
0x70
;
constexpr
uint8_t
kIeiNasMessageContainer
=
0x71
;
constexpr
uint8_t
kIeiNasMessageContainer
=
0x71
;
constexpr
uint8_t
kIeiPduSessionReactivationResultErrorCause
=
0x72
;
constexpr
uint8_t
kIeiPduSessionReactivationResultErrorCause
=
0x72
;
constexpr
uint8_t
kIeiSorTransparentContainer
=
0x73
;
constexpr
uint8_t
kIeiLadnIndication
=
0x74
;
constexpr
uint8_t
kIeiLadnIndication
=
0x74
;
constexpr
uint8_t
kIeiLadnInformation
=
0x79
;
constexpr
uint8_t
kIeiLadnInformation
=
0x79
;
constexpr
uint8_t
kIei5gGuti
=
0x77
;
constexpr
uint8_t
kIei5gGuti
=
0x77
;
...
...
src/nas/common/NasIeHeader.hpp
View file @
b1839609
...
@@ -41,8 +41,8 @@
...
@@ -41,8 +41,8 @@
#include "EPS_NAS_Message_Container.hpp"
#include "EPS_NAS_Message_Container.hpp"
#include "EPS_NAS_Security_Algorithms.hpp"
#include "EPS_NAS_Security_Algorithms.hpp"
#include "Extended_DRX_Parameters.hpp"
#include "Extended_DRX_Parameters.hpp"
#include "G
PRS_Timer_
2.hpp"
#include "G
prsTimer
2.hpp"
#include "G
PRS_Timer_
3.hpp"
#include "G
prsTimer
3.hpp"
#include "IMEISV_Request.hpp"
#include "IMEISV_Request.hpp"
#include "LADN_Indication.hpp"
#include "LADN_Indication.hpp"
#include "MA_PDU_Session_Information.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 @@
...
@@ -19,38 +19,38 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
#include "G
PRS_Timer_
2.hpp"
#include "G
prsTimer
2.hpp"
using
namespace
nas
;
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
);
SetLengthIndicator
(
1
);
SetIeName
(
kGprsTimer2IeName
);
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
;
value_
=
value
;
SetLengthIndicator
(
1
);
SetLengthIndicator
(
1
);
SetIeName
(
kGprsTimer2IeName
);
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
;
value_
=
value
;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
uint8_t
G
PRS_Timer_
2
::
getValue
()
const
{
uint8_t
G
prsTimer
2
::
getValue
()
const
{
return
value_
;
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
());
Logger
::
nas_mm
().
debug
(
"Encoding %s"
,
GetIeName
().
c_str
());
int
ie_len
=
GetIeLength
();
int
ie_len
=
GetIeLength
();
...
@@ -74,7 +74,7 @@ int GPRS_Timer_2::Encode(uint8_t* buf, int len) {
...
@@ -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
)
{
if
(
len
<
kGprsTimer2Length
)
{
Logger
::
nas_mm
().
error
(
Logger
::
nas_mm
().
error
(
"Buffer length is less than the minimum length of this IE (%d octet)"
,
"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";
...
@@ -31,11 +31,11 @@ constexpr auto kGprsTimer2IeName = "GPRS Timer 2";
namespace
nas
{
namespace
nas
{
class
G
PRS_Timer_
2
:
public
Type4NasIe
{
class
G
prsTimer
2
:
public
Type4NasIe
{
public:
public:
G
PRS_Timer_
2
(
uint8_t
iei
);
G
prsTimer
2
(
uint8_t
iei
);
G
PRS_Timer_
2
(
const
uint8_t
iei
,
uint8_t
value
);
G
prsTimer
2
(
const
uint8_t
iei
,
uint8_t
value
);
~
G
PRS_Timer_
2
();
~
G
prsTimer
2
();
int
Encode
(
uint8_t
*
buf
,
int
len
);
int
Encode
(
uint8_t
*
buf
,
int
len
);
int
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_iei
);
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 @@
...
@@ -19,18 +19,18 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
#include "G
PRS_Timer_
3.hpp"
#include "G
prsTimer
3.hpp"
using
namespace
nas
;
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
);
SetLengthIndicator
(
1
);
SetIeName
(
kGprsTimer3IeName
);
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
)
{
:
Type4NasIe
(
iei
)
{
unit_
=
unit
;
unit_
=
unit
;
value_
=
value
;
value_
=
value
;
...
@@ -39,26 +39,26 @@ GPRS_Timer_3::GPRS_Timer_3(const uint8_t iei, uint8_t unit, uint8_t 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
;
unit_
=
unit
;
value_
=
value
;
value_
=
value
;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
uint8_t
G
PRS_Timer_
3
::
getUnit
()
const
{
uint8_t
G
prsTimer
3
::
getUnit
()
const
{
return
unit_
;
return
unit_
;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
uint8_t
G
PRS_Timer_
3
::
getValue
()
const
{
uint8_t
G
prsTimer
3
::
getValue
()
const
{
return
value_
;
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
());
Logger
::
nas_mm
().
debug
(
"Encoding %s"
,
GetIeName
().
c_str
());
int
ie_len
=
GetIeLength
();
int
ie_len
=
GetIeLength
();
...
@@ -83,7 +83,7 @@ int GPRS_Timer_3::Encode(uint8_t* buf, int len) {
...
@@ -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
)
{
if
(
len
<
kGprsTimer3Length
)
{
Logger
::
nas_mm
().
error
(
Logger
::
nas_mm
().
error
(
"Buffer length is less than the minimum length of this IE (%d octet)"
,
"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";
...
@@ -30,11 +30,11 @@ constexpr auto kGprsTimer3IeName = "GPRS Timer 3";
namespace
nas
{
namespace
nas
{
class
G
PRS_Timer_
3
:
public
Type4NasIe
{
class
G
prsTimer
3
:
public
Type4NasIe
{
public:
public:
G
PRS_Timer_
3
(
uint8_t
iei
);
G
prsTimer
3
(
uint8_t
iei
);
G
PRS_Timer_
3
(
uint8_t
iei
,
uint8_t
unit
,
uint8_t
value
);
G
prsTimer
3
(
uint8_t
iei
,
uint8_t
unit
,
uint8_t
value
);
~
G
PRS_Timer_
3
();
~
G
prsTimer
3
();
int
Encode
(
uint8_t
*
buf
,
int
len
);
int
Encode
(
uint8_t
*
buf
,
int
len
);
int
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_option
);
int
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_option
);
...
...
src/nas/ies/SOR_Transparent_Container.cpp
View file @
b1839609
...
@@ -19,100 +19,122 @@
...
@@ -19,100 +19,122 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "SOR_Transparent_Container.hpp"
#include "SOR_Transparent_Container.hpp"
#include "logger.hpp"
#include "logger.hpp"
using
namespace
nas
;
using
namespace
nas
;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
SOR_Transparent_Container
::
SOR_Transparent_Container
(
uint8_t
iei
)
:
_value
()
{
SOR_Transparent_Container
::
SOR_Transparent_Container
()
_iei
=
iei
;
:
Type6NasIe
(
kIeiSorTransparentContainer
),
header_
(),
sor_mac_i_
()
{
HEADER
=
0
;
SetLengthIndicator
(
kSorTransparentContainerIeMinimumLength
);
SetIeName
(
kSorTransparentContainerIeName
);
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
SOR_Transparent_Container
::
SOR_Transparent_Container
(
SOR_Transparent_Container
::
SOR_Transparent_Container
(
const
uint8_t
iei
,
uint8_t
header
,
uint8_t
*
value
)
{
uint8_t
header
,
const
uint8_t
(
&
value
)[
16
])
{
_iei
=
iei
;
header_
=
header
;
HEADER
=
header
;
for
(
int
i
=
0
;
i
<
16
;
i
++
)
{
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
()
{}
SOR_Transparent_Container
::~
SOR_Transparent_Container
()
{}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
uint8_t
SOR_Transparent_Container
::
getValue
()
{
void
SOR_Transparent_Container
::
getValue
(
uint8_t
(
&
value
)[
16
])
const
{
for
(
int
j
=
0
;
j
<
16
;
j
++
)
{
for
(
int
i
=
0
;
i
<
16
;
i
++
)
{
Logger
::
nas_mm
().
debug
(
value
[
i
]
=
sor_mac_i_
[
i
];
"decoded SOR_Transparent_Container value(0x%2x)"
,
_value
[
j
]);
}
}
return
1
;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
int
SOR_Transparent_Container
::
Encode
(
uint8_t
*
buf
,
int
len
)
{
int
SOR_Transparent_Container
::
Encode
(
uint8_t
*
buf
,
int
len
)
{
Logger
::
nas_mm
().
debug
(
"encoding SOR_Transparent_Container iei(0x%x)"
,
_iei
);
Logger
::
nas_mm
().
debug
(
"Encoding %s"
,
GetIeName
().
c_str
());
if
(
len
<
18
)
{
Logger
::
nas_mm
().
error
(
"len is less than 18"
);
int
ie_len
=
GetIeLength
();
return
0
;
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
;
int
encoded_size
=
0
;
if
(
_iei
)
{
// IEI and Length (later)
*
(
buf
+
encoded_size
)
=
_iei
;
int
len_pos
=
0
;
encoded_size
++
;
int
encoded_header_size
=
*
(
buf
+
encoded_size
)
=
17
;
Type6NasIe
::
Encode
(
buf
+
encoded_size
,
len
,
len_pos
);
encoded_size
++
;
if
(
encoded_header_size
==
KEncodeDecodeError
)
return
KEncodeDecodeError
;
encoded_size
++
;
encoded_size
+=
encoded_header_size
;
*
(
buf
+
encoded_size
)
=
HEADER
;
encoded_size
++
;
// Header
ENCODE_U8
(
buf
+
encoded_size
,
header_
,
encoded_size
);
// SOR-MAC-I
for
(
int
i
=
0
;
i
<
16
;
i
++
)
{
for
(
int
i
=
0
;
i
<
16
;
i
++
)
{
*
(
buf
+
encoded_size
)
=
_value
[
i
];
ENCODE_U8
(
buf
+
encoded_size
,
sor_mac_i_
[
i
],
encoded_size
);
encoded_size
++
;
}
}
return
encoded_size
;
}
else
{
// TODO: Encode spare for the rest
// *(buf + encoded_size) = length - 1; encoded_size++;
uint8_t
spare
=
0
;
// *(buf + encoded_size) = _value; encoded_size++; encoded_size++;
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
(
Logger
::
nas_mm
().
debug
(
"
encoded SOR_Transparent_Container len(%d)"
,
encoded_size
);
"
Encoded %s, len (%d)"
,
GetIeName
().
c_str
()
,
encoded_size
);
return
encoded_size
;
return
encoded_size
;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
int
SOR_Transparent_Container
::
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_option
)
{
int
SOR_Transparent_Container
::
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_iei
)
{
Logger
::
nas_mm
().
debug
(
"decoding SOR_Transparent_Container iei(0x%x)"
,
*
buf
);
if
(
len
<
kSorTransparentContainerMinimumLength
)
{
int
decoded_size
=
0
;
Logger
::
nas_mm
().
error
(
if
(
is_option
)
{
"Buffer length is less than the minimum length of this IE (%d octet)"
,
decoded_size
++
;
kSorTransparentContainerMinimumLength
);
return
KEncodeDecodeError
;
}
}
decoded_size
++
;
decoded_size
++
;
uint8_t
decoded_size
=
0
;
HEADER
=
*
(
buf
+
decoded_size
);
uint8_t
octet
=
0
;
decoded_size
++
;
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
++
)
{
for
(
int
i
=
0
;
i
<
16
;
i
++
)
{
_value
[
i
]
=
*
(
buf
+
decoded_size
);
DECODE_U8
(
buf
+
decoded_size
,
sor_mac_i_
[
i
],
decoded_size
);
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
++
)
{
for
(
int
j
=
0
;
j
<
16
;
j
++
)
{
Logger
::
nas_mm
().
debug
(
Logger
::
nas_mm
().
debug
(
"Value 0x%2x"
,
sor_mac_i_
[
j
]);
"decoded SOR_Transparent_Container value(0x%2x)"
,
_value
[
j
]);
}
}
Logger
::
nas_mm
().
debug
(
Logger
::
nas_mm
().
debug
(
"
decoded SOR_Transparent_Container len(%d)"
,
decoded_size
);
"
Decoded %s, len (%d)"
,
GetIeName
().
c_str
()
,
decoded_size
);
return
decoded_size
;
return
decoded_size
;
}
}
src/nas/ies/SOR_Transparent_Container.hpp
View file @
b1839609
...
@@ -18,36 +18,34 @@
...
@@ -18,36 +18,34 @@
* For more information about the OpenAirInterface (OAI) Software Alliance:
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
#ifndef _SOR_TRANSPARENT_CONTAINER_H_
#define _SOR_TRANSPARENT_CONTAINER_H_
/*! \file
#include "Type6NasIe.hpp"
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef __SOR_Transparent_Container_H_
#define __SOR_Transparent_Container_H_
#include <stdint.h>
#include <stdint.h>
constexpr
uint8_t
kSorTransparentContainerMinimumLength
=
20
;
constexpr
uint8_t
kSorTransparentContainerIeMinimumLength
=
17
;
constexpr
auto
kSorTransparentContainerIeName
=
"SOR Transparent Container"
;
namespace
nas
{
namespace
nas
{
class
SOR_Transparent_Container
{
class
SOR_Transparent_Container
:
Type6NasIe
{
public:
public:
SOR_Transparent_Container
();
SOR_Transparent_Container
();
SOR_Transparent_Container
(
uint8_t
iei
);
SOR_Transparent_Container
(
uint8_t
header
,
const
uint8_t
(
&
value
)[
16
]);
SOR_Transparent_Container
(
const
uint8_t
iei
,
uint8_t
header
,
uint8_t
*
value
);
~
SOR_Transparent_Container
();
~
SOR_Transparent_Container
();
// void setValue(uint8_t iei, uint8_t value);
int
Encode
(
uint8_t
*
buf
,
int
len
);
int
Encode
(
uint8_t
*
buf
,
int
len
);
int
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_option
);
int
Decode
(
uint8_t
*
buf
,
int
len
,
bool
is_iei
);
uint8_t
getValue
();
void
getValue
(
uint8_t
(
&
value
)[
16
])
const
;
private:
private:
uint8_t
_iei
;
uint8_t
header_
;
uint8_t
HEADER
;
uint8_t
sor_mac_i_
[
16
];
uint8_t
_value
[
16
];
std
::
optional
<
uint8_t
>
counter_
;
// Other IEs
};
};
}
// namespace nas
}
// namespace nas
...
...
src/nas/msgs/DLNASTransport.cpp
View file @
b1839609
...
@@ -89,7 +89,7 @@ void DLNASTransport::set_5GMM_Cause(uint8_t value) {
...
@@ -89,7 +89,7 @@ void DLNASTransport::set_5GMM_Cause(uint8_t value) {
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
DLNASTransport
::
setBack_off_timer_value
(
uint8_t
unit
,
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) {
...
@@ -219,7 +219,7 @@ int DLNASTransport::Decode(NasMmPlainHeader* header, uint8_t* buf, int len) {
}
break
;
}
break
;
case
0x37
:
{
case
0x37
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI (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
(
decoded_size
+=
ie_back_off_timer_value
->
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
octet
=
*
(
buf
+
decoded_size
);
octet
=
*
(
buf
+
decoded_size
);
...
...
src/nas/msgs/DLNASTransport.hpp
View file @
b1839609
...
@@ -55,7 +55,7 @@ class DLNASTransport {
...
@@ -55,7 +55,7 @@ class DLNASTransport {
PDU_Session_Identity_2
*
ie_pdu_session_identity_2
;
PDU_Session_Identity_2
*
ie_pdu_session_identity_2
;
Additional_Information
*
ie_additional_information
;
Additional_Information
*
ie_additional_information
;
_5GMM_Cause
*
ie_5gmm_cause
;
_5GMM_Cause
*
ie_5gmm_cause
;
G
PRS_Timer_
3
*
ie_back_off_timer_value
;
G
prsTimer
3
*
ie_back_off_timer_value
;
};
};
}
// namespace nas
}
// namespace nas
...
...
src/nas/msgs/RegistrationAccept.cpp
View file @
b1839609
...
@@ -209,26 +209,26 @@ void RegistrationAccept::setNetwork_Slicing_Indication(bool dcni, bool nssci) {
...
@@ -209,26 +209,26 @@ void RegistrationAccept::setNetwork_Slicing_Indication(bool dcni, bool nssci) {
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
RegistrationAccept
::
setT3512_Value
(
uint8_t
unit
,
uint8_t
value
)
{
void
RegistrationAccept
::
setT3512_Value
(
uint8_t
unit
,
uint8_t
value
)
{
ie_T3512_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
(
void
RegistrationAccept
::
setNon_3GPP_de_registration_timer_value
(
uint8_t
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
);
kIeiGprsTimer2Non3gppDeregistration
,
value
);
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
RegistrationAccept
::
setT3502_value
(
uint8_t
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
(
void
RegistrationAccept
::
setSOR_Transparent_Container
(
uint8_t
header
,
uint8_t
*
value
)
{
uint8_t
header
,
const
uint8_t
(
&
value
)[
16
]
)
{
ie_sor_transparent_container
=
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(
...
@@ -268,17 +268,17 @@ void RegistrationAccept::setExtended_DRX_Parameters(
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
RegistrationAccept
::
setT3447_Value
(
uint8_t
unit
,
uint8_t
value
)
{
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
)
{
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
)
{
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) {
...
@@ -792,31 +792,31 @@ int RegistrationAccept::Decode(uint8_t* buf, int len) {
*/
*/
case
kIeiGprsTimer3T3512
:
{
case
kIeiGprsTimer3T3512
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
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
(
decoded_size
+=
ie_T3512_value_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
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
);
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
}
break
;
case
kIeiGprsTimer2Non3gppDeregistration
:
{
case
kIeiGprsTimer2Non3gppDeregistration
:
{
Logger
::
nas_mm
().
debug
(
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
kIeiGprsTimer2Non3gppDeregistration
);
"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
);
kIeiGprsTimer2Non3gppDeregistration
);
decoded_size
+=
ie_Non_3GPP_de_registration_timer_value_tmp
.
Decode
(
decoded_size
+=
ie_Non_3GPP_de_registration_timer_value_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
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
);
ie_Non_3GPP_de_registration_timer_value_tmp
);
octet
=
*
(
buf
+
decoded_size
);
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
}
break
;
case
kIeiGprsTimer2T3502
:
{
case
kIeiGprsTimer2T3502
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
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
(
decoded_size
+=
ie_T3502_value_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
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
);
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
}
break
;
...
@@ -871,28 +871,28 @@ int RegistrationAccept::Decode(uint8_t* buf, int len) {
...
@@ -871,28 +871,28 @@ int RegistrationAccept::Decode(uint8_t* buf, int len) {
}
break
;
}
break
;
case
kIeiGprsTimer3T3447
:
{
case
kIeiGprsTimer3T3447
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
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
(
decoded_size
+=
ie_T3447_value_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
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
);
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
}
break
;
case
kIeiGprsTimer3T3348
:
{
case
kIeiGprsTimer3T3348
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
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
(
decoded_size
+=
ie_T3448_value_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
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
);
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
}
break
;
case
kIeiGprsTimer3T3324
:
{
case
kIeiGprsTimer3T3324
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x%x"
,
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
(
decoded_size
+=
ie_T3324_value_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
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
);
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
}
break
;
...
...
src/nas/msgs/RegistrationAccept.hpp
View file @
b1839609
...
@@ -107,7 +107,7 @@ class RegistrationAccept : public NasMmPlainHeader {
...
@@ -107,7 +107,7 @@ class RegistrationAccept : public NasMmPlainHeader {
// TODO: Emergency number list
// TODO: Emergency number list
// TODO: Extended 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
// TODO: Get
void
setEAP_Message
(
bstring
eap
);
void
setEAP_Message
(
bstring
eap
);
...
@@ -167,10 +167,10 @@ class RegistrationAccept : public NasMmPlainHeader {
...
@@ -167,10 +167,10 @@ class RegistrationAccept : public NasMmPlainHeader {
std
::
optional
<
NetworkSlicingIndication
>
std
::
optional
<
NetworkSlicingIndication
>
ie_network_slicing_indication
;
// Optional
ie_network_slicing_indication
;
// Optional
// TODO: Service Area List
// TODO: Service Area List
std
::
optional
<
G
PRS_Timer_
3
>
ie_T3512_value
;
// Optional
std
::
optional
<
G
prsTimer
3
>
ie_T3512_value
;
// Optional
std
::
optional
<
G
PRS_Timer_
2
>
std
::
optional
<
G
prsTimer
2
>
ie_Non_3GPP_de_registration_timer_value
;
// Optional
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: Emergency number list
// TODO: Extended emergency number list
// TODO: Extended emergency number list
std
::
optional
<
SOR_Transparent_Container
>
std
::
optional
<
SOR_Transparent_Container
>
...
@@ -185,9 +185,9 @@ class RegistrationAccept : public NasMmPlainHeader {
...
@@ -185,9 +185,9 @@ class RegistrationAccept : public NasMmPlainHeader {
ie_eps_bearer_context_status
;
// Optional
ie_eps_bearer_context_status
;
// Optional
std
::
optional
<
Extended_DRX_Parameters
>
std
::
optional
<
Extended_DRX_Parameters
>
ie_extended_drx_parameters
;
// Optional
ie_extended_drx_parameters
;
// Optional
std
::
optional
<
G
PRS_Timer_
3
>
ie_T3447_value
;
// Optional
std
::
optional
<
G
prsTimer
3
>
ie_T3447_value
;
// Optional
std
::
optional
<
G
PRS_Timer_
3
>
ie_T3448_value
;
// Optional
std
::
optional
<
G
prsTimer
3
>
ie_T3448_value
;
// Optional
std
::
optional
<
G
PRS_Timer_
3
>
ie_T3324_value
;
// Optional
std
::
optional
<
G
prsTimer
3
>
ie_T3324_value
;
// Optional
std
::
optional
<
UE_Radio_Capability_ID
>
std
::
optional
<
UE_Radio_Capability_ID
>
ie_ue_radio_capability_id
;
// Which Release 16.x.x?
ie_ue_radio_capability_id
;
// Which Release 16.x.x?
std
::
optional
<
NSSAI
>
ie_pending_nssai
;
// 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) {
...
@@ -52,9 +52,8 @@ void RegistrationComplete::setHeader(uint8_t security_header_type) {
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
RegistrationComplete
::
setSOR_Transparent_Container
(
void
RegistrationComplete
::
setSOR_Transparent_Container
(
uint8_t
header
,
uint8_t
*
value
)
{
uint8_t
header
,
const
uint8_t
(
&
value
)[
16
])
{
ie_sor_transparent_container
=
ie_sor_transparent_container
=
new
SOR_Transparent_Container
(
header
,
value
);
new
SOR_Transparent_Container
(
0x73
,
header
,
value
);
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
...
...
src/nas/msgs/RegistrationComplete.hpp
View file @
b1839609
...
@@ -40,7 +40,7 @@ class RegistrationComplete {
...
@@ -40,7 +40,7 @@ class RegistrationComplete {
int
Encode
(
uint8_t
*
buf
,
int
len
);
int
Encode
(
uint8_t
*
buf
,
int
len
);
int
Decode
(
NasMmPlainHeader
*
header
,
uint8_t
*
buf
,
int
len
);
int
Decode
(
NasMmPlainHeader
*
header
,
uint8_t
*
buf
,
int
len
);
void
setHeader
(
uint8_t
security_header_type
);
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:
public:
NasMmPlainHeader
*
plain_header
;
NasMmPlainHeader
*
plain_header
;
...
...
src/nas/msgs/RegistrationReject.cpp
View file @
b1839609
...
@@ -51,12 +51,12 @@ void RegistrationReject::set_5GMM_Cause(uint8_t value) {
...
@@ -51,12 +51,12 @@ void RegistrationReject::set_5GMM_Cause(uint8_t value) {
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
RegistrationReject
::
setGPRS_Timer_2_3346
(
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
)
{
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(
...
@@ -154,19 +154,19 @@ int RegistrationReject::Decode(
switch
(
octet
)
{
switch
(
octet
)
{
case
kT3346Value
:
{
case
kT3346Value
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x5F: T3346 Value"
);
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
(
decoded_size
+=
ie_T3346_value_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
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
);
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
}
break
;
case
kT3502Value
:
{
case
kT3502Value
:
{
Logger
::
nas_mm
().
debug
(
"Decoding IEI 0x16: T3502 Value"
);
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
(
decoded_size
+=
ie_T3502_value_tmp
.
Decode
(
buf
+
decoded_size
,
len
-
decoded_size
,
true
);
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
);
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
Logger
::
nas_mm
().
debug
(
"Next IEI (0x%x)"
,
octet
);
}
break
;
}
break
;
...
...
src/nas/msgs/RegistrationReject.hpp
View file @
b1839609
...
@@ -53,8 +53,8 @@ class RegistrationReject : public NasMmPlainHeader {
...
@@ -53,8 +53,8 @@ class RegistrationReject : public NasMmPlainHeader {
public:
public:
_5GMM_Cause
ie_5gmm_cause
;
// Mandatory
_5GMM_Cause
ie_5gmm_cause
;
// Mandatory
std
::
optional
<
G
PRS_Timer_2
>
ie_T3346_value
;
// Optional
std
::
optional
<
G
prsTimer2
>
ie_T3346_value
;
// Optional
std
::
optional
<
G
PRS_Timer_2
>
ie_T3502_value
;
// Optional
std
::
optional
<
G
prsTimer2
>
ie_T3502_value
;
// Optional
std
::
optional
<
EAP_Message
>
ie_eap_message
;
// Optional
std
::
optional
<
EAP_Message
>
ie_eap_message
;
// Optional
std
::
optional
<
Rejected_NSSAI
>
ie_rejected_nssai
;
// Release 16.4.1
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