Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
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
OpenXG
OpenXG-SMF
Commits
de806db8
Commit
de806db8
authored
Nov 01, 2019
by
wangyongshou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add pdu_session_resource_setup_response msg
parent
d601a76b
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
168 additions
and
83 deletions
+168
-83
src/NgapSmfLayer/ng_pdu_session_resource_setup_request.c
src/NgapSmfLayer/ng_pdu_session_resource_setup_request.c
+15
-19
src/NgapSmfLayer/ng_pdu_session_resource_setup_response.c
src/NgapSmfLayer/ng_pdu_session_resource_setup_response.c
+125
-64
src/common/ngap/ngap_common.h
src/common/ngap/ngap_common.h
+8
-0
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+20
-0
No files found.
src/NgapSmfLayer/ng_pdu_session_resource_setup_request.c
View file @
de806db8
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#include "OCTET_STRING.h"
#include "OCTET_STRING.h"
#define BUF_LEN 1024
#define BUF_LEN 1024
Ngap_PDUSessionResourceSetupRequestIEs_t
*
make_RAN_UE_NGAP_ID
(
uint32_t
rAN_UE_NGAP_ID
)
Ngap_PDUSessionResourceSetupRequestIEs_t
*
make_
req_
RAN_UE_NGAP_ID
(
uint32_t
rAN_UE_NGAP_ID
)
{
{
Ngap_PDUSessionResourceSetupRequestIEs_t
*
ie
;
Ngap_PDUSessionResourceSetupRequestIEs_t
*
ie
;
ie
=
calloc
(
1
,
sizeof
(
Ngap_PDUSessionResourceSetupRequestIEs_t
));
ie
=
calloc
(
1
,
sizeof
(
Ngap_PDUSessionResourceSetupRequestIEs_t
));
...
@@ -35,7 +35,7 @@ Ngap_PDUSessionResourceSetupRequestIEs_t *make_RAN_UE_NGAP_ID(uint32_t rAN_UE_N
...
@@ -35,7 +35,7 @@ Ngap_PDUSessionResourceSetupRequestIEs_t *make_RAN_UE_NGAP_ID(uint32_t rAN_UE_N
return
ie
;
return
ie
;
}
}
Ngap_PDUSessionResourceSetupRequestIEs_t
*
make_AMF_UE_NGAP_ID
(
uint64_t
amf_UE_NGAP_ID
)
Ngap_PDUSessionResourceSetupRequestIEs_t
*
make_
req_
AMF_UE_NGAP_ID
(
uint64_t
amf_UE_NGAP_ID
)
{
{
Ngap_PDUSessionResourceSetupRequestIEs_t
*
ie
=
NULL
;
Ngap_PDUSessionResourceSetupRequestIEs_t
*
ie
=
NULL
;
ie
=
calloc
(
1
,
sizeof
(
Ngap_PDUSessionResourceSetupRequestIEs_t
));
ie
=
calloc
(
1
,
sizeof
(
Ngap_PDUSessionResourceSetupRequestIEs_t
));
...
@@ -153,7 +153,7 @@ Ngap_NGAP_PDU_t *make_NGAP_pdu_session_resource_setup_request()
...
@@ -153,7 +153,7 @@ Ngap_NGAP_PDU_t *make_NGAP_pdu_session_resource_setup_request()
pdu
->
choice
.
initiatingMessage
=
calloc
(
1
,
sizeof
(
Ngap_InitiatingMessage_t
));
pdu
->
choice
.
initiatingMessage
=
calloc
(
1
,
sizeof
(
Ngap_InitiatingMessage_t
));
pdu
->
choice
.
initiatingMessage
->
procedureCode
=
Ngap_ProcedureCode_id_PDUSessionResourceSetup
;
pdu
->
choice
.
initiatingMessage
->
procedureCode
=
Ngap_ProcedureCode_id_PDUSessionResourceSetup
;
pdu
->
choice
.
initiatingMessage
->
criticality
=
Ngap_Criticality_reject
;
pdu
->
choice
.
initiatingMessage
->
criticality
=
Ngap_Criticality_reject
;
pdu
->
choice
.
initiatingMessage
->
value
.
present
=
Ngap_InitiatingMessage__value_PR_
NG
SetupRequest
;
pdu
->
choice
.
initiatingMessage
->
value
.
present
=
Ngap_InitiatingMessage__value_PR_
PDUSessionResource
SetupRequest
;
Ngap_PDUSessionResourceSetupRequest_t
*
ngapPDUSessionResourceSetupRequest
=
NULL
;
Ngap_PDUSessionResourceSetupRequest_t
*
ngapPDUSessionResourceSetupRequest
=
NULL
;
ngapPDUSessionResourceSetupRequest
=
&
pdu
->
choice
.
initiatingMessage
->
value
.
choice
.
PDUSessionResourceSetupRequest
;
ngapPDUSessionResourceSetupRequest
=
&
pdu
->
choice
.
initiatingMessage
->
value
.
choice
.
PDUSessionResourceSetupRequest
;
...
@@ -161,26 +161,25 @@ Ngap_NGAP_PDU_t *make_NGAP_pdu_session_resource_setup_request()
...
@@ -161,26 +161,25 @@ Ngap_NGAP_PDU_t *make_NGAP_pdu_session_resource_setup_request()
Ngap_PDUSessionResourceSetupRequestIEs_t
*
ie
;
Ngap_PDUSessionResourceSetupRequestIEs_t
*
ie
;
//Ngap_AMF_UE_NGAP_ID_t
//Ngap_AMF_UE_NGAP_ID_t
uint64_t
amf_ue_ngap_id
=
0x80
;
uint64_t
amf_ue_ngap_id
=
0x80
;
ie
=
make_AMF_UE_NGAP_ID
(
amf_ue_ngap_id
);
ie
=
make_
req_
AMF_UE_NGAP_ID
(
amf_ue_ngap_id
);
add_pdu_session_resource_setup_request_ie
(
ngapPDUSessionResourceSetupRequest
,
ie
);
add_pdu_session_resource_setup_request_ie
(
ngapPDUSessionResourceSetupRequest
,
ie
);
//Ngap_AMF_UE_NGAP_ID_t
//Ngap_AMF_UE_NGAP_ID_t
uint32_t
ran_ue_ngap_id
=
0x81
;
uint32_t
ran_ue_ngap_id
=
0x81
;
ie
=
make_RAN_UE_NGAP_ID
(
ran_ue_ngap_id
);
ie
=
make_
req_
RAN_UE_NGAP_ID
(
ran_ue_ngap_id
);
//
add_pdu_session_resource_setup_request_ie(ngapPDUSessionResourceSetupRequest, ie);
add_pdu_session_resource_setup_request_ie
(
ngapPDUSessionResourceSetupRequest
,
ie
);
//Ngap_RANPagingPriority_t
//Ngap_RANPagingPriority_t
long
ranPagingPriority
=
0x82
;
long
ranPagingPriority
=
0x82
;
ie
=
make_RANPagingPriority
(
ranPagingPriority
);
ie
=
make_RANPagingPriority
(
ranPagingPriority
);
//
add_pdu_session_resource_setup_request_ie(ngapPDUSessionResourceSetupRequest, ie);
add_pdu_session_resource_setup_request_ie
(
ngapPDUSessionResourceSetupRequest
,
ie
);
//Ngap_NAS_PDU_t
//Ngap_NAS_PDU_t
const
char
*
nas_pdu
=
"nas_pdu"
;
const
char
*
nas_pdu
=
"nas_pdu"
;
ie
=
make_NAS_PDU
(
nas_pdu
);
ie
=
make_NAS_PDU
(
nas_pdu
);
//
add_pdu_session_resource_setup_request_ie(ngapPDUSessionResourceSetupRequest, ie);
add_pdu_session_resource_setup_request_ie
(
ngapPDUSessionResourceSetupRequest
,
ie
);
//Ngap_PDUSessionResourceSetupListSUReq_t
//Ngap_PDUSessionResourceSetupListSUReq_t
ie
=
make_PDUSessionResourceSetupListSUReq
();
ie
=
make_PDUSessionResourceSetupListSUReq
();
...
@@ -196,17 +195,14 @@ Ngap_NGAP_PDU_t *make_NGAP_pdu_session_resource_setup_request()
...
@@ -196,17 +195,14 @@ Ngap_NGAP_PDU_t *make_NGAP_pdu_session_resource_setup_request()
slice
,
slice
,
pDUSessionResourceSetupRequestTransfer
);
pDUSessionResourceSetupRequestTransfer
);
//ASN_SEQUENCE_ADD(&ie->value.choice.SupportedTAList
.list, item);
ASN_SEQUENCE_ADD
(
&
ie
->
value
.
choice
.
PDUSessionResourceSetupListSUReq
.
list
,
item
);
add_pdu_session_resource_setup_request_ie
(
ngapPDUSessionResourceSetupRequest
,
ie
);
printf
(
"0000000000000, make_NGAP_pdu_session_resource_setup_request
\n
"
);
printf
(
"0000000000000, make_NGAP_pdu_session_resource_setup_request
\n
"
);
return
pdu
;
return
pdu
;
}
}
int
int
ngap_amf_handle_ng_pdu_session_resource_setup_request
(
ngap_amf_handle_ng_pdu_session_resource_setup_request
(
const
sctp_assoc_id_t
assoc_id
,
const
sctp_assoc_id_t
assoc_id
,
...
@@ -266,8 +262,8 @@ ngap_amf_handle_ng_pdu_session_resource_setup_request(
...
@@ -266,8 +262,8 @@ ngap_amf_handle_ng_pdu_session_resource_setup_request(
NGAP_FIND_PROTOCOLIE_BY_ID
(
Ngap_PDUSessionResourceSetupRequestIEs_t
,
ie
,
container
,
Ngap_ProtocolIE_ID_id_AMF_UE_NGAP_ID
,
false
);
NGAP_FIND_PROTOCOLIE_BY_ID
(
Ngap_PDUSessionResourceSetupRequestIEs_t
,
ie
,
container
,
Ngap_ProtocolIE_ID_id_AMF_UE_NGAP_ID
,
false
);
if
(
ie
)
if
(
ie
)
{
{
//
asn_INTEGER2ulong(&ie->value.choice.AMF_UE_NGAP_ID, &amf_ue_ngap_id);
asn_INTEGER2ulong
(
&
ie
->
value
.
choice
.
AMF_UE_NGAP_ID
,
&
amf_ue_ngap_id
);
//
printf("amf_ue_ngap_id, 0x%x\n", amf_ue_ngap_id);
printf
(
"amf_ue_ngap_id, 0x%x
\n
"
,
amf_ue_ngap_id
);
}
}
//Ngap_AMF_UE_NGAP_ID_t
//Ngap_AMF_UE_NGAP_ID_t
...
@@ -275,7 +271,7 @@ ngap_amf_handle_ng_pdu_session_resource_setup_request(
...
@@ -275,7 +271,7 @@ ngap_amf_handle_ng_pdu_session_resource_setup_request(
if
(
ie
)
if
(
ie
)
{
{
ran_ue_ngap_id
=
ie
->
value
.
choice
.
RAN_UE_NGAP_ID
;
ran_ue_ngap_id
=
ie
->
value
.
choice
.
RAN_UE_NGAP_ID
;
//
printf("ran_ue_ngap_id, 0x%x\n", ran_ue_ngap_id);
printf
(
"ran_ue_ngap_id, 0x%x
\n
"
,
ran_ue_ngap_id
);
}
}
//RANPagingPriority
//RANPagingPriority
...
@@ -283,7 +279,7 @@ ngap_amf_handle_ng_pdu_session_resource_setup_request(
...
@@ -283,7 +279,7 @@ ngap_amf_handle_ng_pdu_session_resource_setup_request(
if
(
ie
)
if
(
ie
)
{
{
ranPagingPriority
=
ie
->
value
.
choice
.
RANPagingPriority
;
ranPagingPriority
=
ie
->
value
.
choice
.
RANPagingPriority
;
//
printf("ranPagingPriority, 0x%x\n", ranPagingPriority);
printf
(
"ranPagingPriority, 0x%x
\n
"
,
ranPagingPriority
);
}
}
//NAS_PDU
//NAS_PDU
...
@@ -293,7 +289,7 @@ ngap_amf_handle_ng_pdu_session_resource_setup_request(
...
@@ -293,7 +289,7 @@ ngap_amf_handle_ng_pdu_session_resource_setup_request(
nas_pdu
=
(
char
*
)
ie
->
value
.
choice
.
NAS_PDU
.
buf
;
nas_pdu
=
(
char
*
)
ie
->
value
.
choice
.
NAS_PDU
.
buf
;
nas_pdu_size
=
(
int
)
ie
->
value
.
choice
.
NAS_PDU
.
size
;
nas_pdu_size
=
(
int
)
ie
->
value
.
choice
.
NAS_PDU
.
size
;
//
printf("RANNodeName, nas_pdu_size:%d, nas_pdu:%s,\n", nas_pdu_size, nas_pdu);
printf
(
"RANNodeName, nas_pdu_size:%d, nas_pdu:%s,
\n
"
,
nas_pdu_size
,
nas_pdu
);
}
}
...
...
src/NgapSmfLayer/ng_pdu_session_resource_setup_response.c
View file @
de806db8
This diff is collapsed.
Click to expand it.
src/common/ngap/ngap_common.h
View file @
de806db8
...
@@ -4,6 +4,14 @@
...
@@ -4,6 +4,14 @@
#include "common_types.h"
#include "common_types.h"
#include "conversions.h"
#include "conversions.h"
#include "Ngap_ProcedureCode.h"
#include "Ngap_TriggeringMessage.h"
#include "Ngap_Criticality.h"
#include "Ngap_CriticalityDiagnostics-IE-Item.h"
#if 0
#if 0
#include "Ngap_AdditionalQosFlowInformation.h"
#include "Ngap_AdditionalQosFlowInformation.h"
#include "Ngap_AllocationAndRetentionPriority.h"
#include "Ngap_AllocationAndRetentionPriority.h"
...
...
src/smf_app/smf_app.cpp
View file @
de806db8
...
@@ -46,7 +46,11 @@
...
@@ -46,7 +46,11 @@
extern
"C"
{
extern
"C"
{
#include "nas_message.h"
#include "nas_message.h"
#include "mmData.h"
#include "mmData.h"
//#include "Ngap_InitiatingMessage.h"
//#include "Ngap_SuccessfulOutcome.h"
#include "../NgapSmfLayer/ng_pdu_session_resource_setup_request.h"
#include "../NgapSmfLayer/ng_pdu_session_resource_setup_request.h"
#include "../NgapSmfLayer/ng_pdu_session_resource_setup_response.h"
}
}
#include <stdexcept>
#include <stdexcept>
...
@@ -2368,7 +2372,23 @@ void smf_app::create_n2_sm_information(std::shared_ptr<itti_n11_create_sm_contex
...
@@ -2368,7 +2372,23 @@ void smf_app::create_n2_sm_information(std::shared_ptr<itti_n11_create_sm_contex
//TODO: should work with BUPT to finish this function
//TODO: should work with BUPT to finish this function
Logger
::
smf_app
().
info
(
"Create N2 SM Information, ngap message type %d, ie type %d
\n
"
,
ngap_msg_type
,
ngap_ie_type
);
Logger
::
smf_app
().
info
(
"Create N2 SM Information, ngap message type %d, ie type %d
\n
"
,
ngap_msg_type
,
ngap_ie_type
);
#if 0
switch(ngap_ie_type)
{
case Ngap_InitiatingMessage__value_PR_PDUSessionResourceSetupRequest:
make_NGAP_pdu_session_resource_setup_request();
break;
case Ngap_InitiatingMessage__value_PR_PDUSessionResourceSetupRequest:
make_NGAP_pdu_session_resource_setup_response();
break;
default:
printf("don't know ngap_ie_type:%d\n", ngap_ie_type);
}
#endif
make_NGAP_pdu_session_resource_setup_request
();
make_NGAP_pdu_session_resource_setup_request
();
make_NGAP_pdu_session_resource_setup_response
();
}
}
...
...
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