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-Simple
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
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
CommunityXG
OpenXG-AMF-Simple
Commits
62847c81
Commit
62847c81
authored
Mar 08, 2021
by
luhan Wang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.opensource5g.org/openxg/amf
parents
135a390e
c76cc89b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
4 deletions
+15
-4
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+5
-2
src/nas/ies/5GSMobilityIdentity.cpp
src/nas/ies/5GSMobilityIdentity.cpp
+7
-0
src/nas/msgs/ServiceRequest.cpp
src/nas/msgs/ServiceRequest.cpp
+2
-1
src/sctp/sctp_server.hpp
src/sctp/sctp_server.hpp
+1
-1
No files found.
src/amf-app/amf_n1.cpp
View file @
62847c81
...
...
@@ -604,7 +604,9 @@ void amf_n1::service_request_handle(
if
(
serReq
->
getNasMessageContainer
(
nas_container
)){
Logger
::
amf_n1
().
debug
(
"try to get pdu-session-status value from nas message container(length: %d)"
,
blength
(
nas_container
));
uint8_t
*
buf
=
(
uint8_t
*
)
bdata
(
nas_container
);
pdu_session_status
=
buf
[
18
]
<<
8
|
buf
[
19
];
ServiceRequest
*
tmp
=
new
ServiceRequest
();
tmp
->
decodefrombuffer
(
nullptr
,
(
uint8_t
*
)
bdata
(
nas_container
),
blength
(
nas_container
));
pdu_session_status
=
tmp
->
getPduSessionStatus
();
Logger
::
amf_n1
().
debug
(
"Get pdu-session-status value: 0x%x"
,
pdu_session_status
);
}
ServiceAccept
*
serApt
=
new
ServiceAccept
();
...
...
@@ -673,7 +675,8 @@ void amf_n1::service_request_handle(
if
(
pdu_session_status
==
0x00
){
serApt
->
setPDU_session_status
(
0x0000
);
}
else
{
serApt
->
setPDU_session_status
(
pdu_session_status
);
//serApt->setPDU_session_status(pdu_session_status);
serApt
->
setPDU_session_status
(
0x2000
);
}
serApt
->
setPDU_session_reactivation_result
(
0x0000
);
uint8_t
buffer
[
BUFFER_SIZE_256
];
...
...
src/nas/ies/5GSMobilityIdentity.cpp
View file @
62847c81
...
...
@@ -86,30 +86,36 @@ int _5GSMobilityIdentity::_5g_s_tmsi_decodefrombuffer(uint8_t* buf, int len) {
int
decoded_size
=
1
;
_5g_s_tmsi
=
(
_5G_S_TMSI_t
*
)
calloc
(
1
,
sizeof
(
_5G_S_TMSI_t
));
uint8_t
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"first octet 0x%x"
,
octet
);
decoded_size
++
;
_5g_s_tmsi
->
amf_set_id
=
0x0000
|
((
uint16_t
)
octet
)
<<
2
;
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"second octet 0x%x"
,
octet
);
decoded_size
++
;
_5g_s_tmsi
->
amf_set_id
|=
(
octet
&
0xc0
)
>>
6
;
_5g_s_tmsi
->
amf_pointer
=
octet
&
0x3f
;
uint32_t
tmsi
=
0
;
uint8_t
digit
[
4
];
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"third octet 0x%x"
,
octet
);
decoded_size
++
;
Logger
::
nas_mm
().
debug
(
"Octet 0x%x"
,
octet
);
digit
[
0
]
=
octet
;
tmsi
|=
octet
;
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"fourth octet 0x%x"
,
octet
);
decoded_size
++
;
Logger
::
nas_mm
().
debug
(
"Octet 0x%x"
,
octet
);
digit
[
1
]
=
octet
;
tmsi
|=
octet
<<
8
;
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"fifth octet 0x%x"
,
octet
);
decoded_size
++
;
Logger
::
nas_mm
().
debug
(
"Octet 0x%x"
,
octet
);
digit
[
2
]
=
octet
;
tmsi
|=
octet
<<
16
;
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"sixth octet 0x%x"
,
octet
);
decoded_size
++
;
Logger
::
nas_mm
().
debug
(
"Octet 0x%x"
,
octet
);
digit
[
3
]
=
octet
;
...
...
@@ -497,6 +503,7 @@ int _5GSMobilityIdentity::decodefrombuffer(
typeOfIdentity
=
_5G_S_TMSI
;
decoded_size
+=
_5g_s_tmsi_decodefrombuffer
(
buf
+
decoded_size
,
len
-
decoded_size
);
Logger
::
amf_n1
().
debug
(
"Decoded 5GSMobilityIdentity %d octets"
,
decoded_size
);
return
decoded_size
;
}
break
;
}
...
...
src/nas/msgs/ServiceRequest.cpp
View file @
62847c81
...
...
@@ -35,6 +35,7 @@ using namespace nas;
//------------------------------------------------------------------------------
ServiceRequest
::
ServiceRequest
()
{
ie_nas_message_container
=
nullptr
;
ie_PDU_session_status
=
nullptr
;
}
//------------------------------------------------------------------------------
...
...
@@ -195,7 +196,7 @@ int ServiceRequest::decodefrombuffer(
buf
+
decoded_size
,
len
-
decoded_size
,
false
);
uint8_t
octet
=
*
(
buf
+
decoded_size
);
Logger
::
nas_mm
().
debug
(
"First optional IE (0x%x)"
,
octet
);
while
(
!
octet
)
{
while
(
octet
)
{
switch
(
octet
)
{
case
0x40
:
{
Logger
::
nas_mm
().
debug
(
"Decoding ie_uplink_data_status (IEI: 0x40)"
);
...
...
src/sctp/sctp_server.hpp
View file @
62847c81
...
...
@@ -39,7 +39,7 @@ extern "C" {
#include <vector>
#include <iostream>
#define SCTP_RECV_BUFFER_SIZE
1024
#define SCTP_RECV_BUFFER_SIZE
2048
#define SCTP_RC_ERROR -1
#define SCTP_RC_NORMAL_READ 0
#define SCTP_RC_DISCONNECT 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