Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
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
spbro
OpenXG-RAN
Commits
b0c79092
Commit
b0c79092
authored
Sep 17, 2020
by
yincong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify PDUSessionResourceSetupRequest
parent
a02b0b40
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
19 deletions
+16
-19
openair2/COMMON/ngap_messages_types.h
openair2/COMMON/ngap_messages_types.h
+1
-1
openair3/NGAP/ngap_gNB_handlers.c
openair3/NGAP/ngap_gNB_handlers.c
+12
-13
openair3/NGAP/ngap_gNB_nas_procedures.c
openair3/NGAP/ngap_gNB_nas_procedures.c
+3
-5
No files found.
openair2/COMMON/ngap_messages_types.h
View file @
b0c79092
...
...
@@ -638,7 +638,7 @@ typedef struct ngap_pdusession_setup_req_s {
}
ngap_pdusession_setup_req_t
;
typedef
struct
ngap_pdusession_setup_resp_s
{
u
nsigned
gNB_ue_ngap_id
:
24
;
u
int32_t
gNB_ue_ngap_id
:
24
;
/* Number of pdusession setup-ed in the list */
uint8_t
nb_of_pdusessions
;
...
...
openair3/NGAP/ngap_gNB_handlers.c
View file @
b0c79092
...
...
@@ -1254,18 +1254,17 @@ int ngap_gNB_handle_pdusession_setup_request(uint32_t assoc_id,
}
ue_desc_p
->
rx_stream
=
stream
;
ue_desc_p
->
amf_ue_ngap_id
=
amf_ue_ngap_id
;
if
(
ue_desc_p
->
amf_ue_ngap_id
!=
amf_ue_ngap_id
)
{
NGAP_WARN
(
"UE context amf_ue_ngap_id is different form that of the message (%
d != %ld
)"
,
NGAP_WARN
(
"UE context amf_ue_ngap_id is different form that of the message (%
lu != %lu
)"
,
ue_desc_p
->
amf_ue_ngap_id
,
amf_ue_ngap_id
);
}
message_p
=
itti_alloc_new_message
(
TASK_NGAP
,
NGAP_PDUSESSION_SETUP_REQ
);
NGAP_PDUSESSION_SETUP_REQ
(
message_p
).
ue_initial_id
=
ue_desc_p
->
ue_initial_id
;
ue_desc_p
->
ue_initial_id
=
0
;
NGAP_
INITIAL_CONTEXT
_SETUP_REQ
(
message_p
).
gNB_ue_ngap_id
=
ue_desc_p
->
gNB_ue_ngap_id
;
NGAP_
INITIAL_CONTEXT
_SETUP_REQ
(
message_p
).
amf_ue_ngap_id
=
ue_desc_p
->
amf_ue_ngap_id
;
NGAP_
PDUSESSION
_SETUP_REQ
(
message_p
).
gNB_ue_ngap_id
=
ue_desc_p
->
gNB_ue_ngap_id
;
NGAP_
PDUSESSION
_SETUP_REQ
(
message_p
).
amf_ue_ngap_id
=
ue_desc_p
->
amf_ue_ngap_id
;
NGAP_FIND_PROTOCOLIE_BY_ID
(
NGAP_PDUSessionResourceSetupRequestIEs_t
,
ie
,
container
,
NGAP_ProtocolIE_ID_id_PDUSessionResourceSetupListSUReq
,
true
);
...
...
@@ -1322,10 +1321,10 @@ int ngap_gNB_handle_pdusession_setup_request(uint32_t assoc_id,
NGAP_GTPTunnel_t
*
gTPTunnel_p
;
gTPTunnel_p
=
&
pdusessionTransfer_ies
->
value
.
choice
.
UPTransportLayerInformation
.
choice
.
gTPTunnel
;
/* The transport layer address for the IP packets */
OCTET_STRING_TO_INT32
(
&
gTPTunnel_p
->
gTP_TEID
,
NGAP_
INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
pdusession_param
[
i
].
gtp_teid
);
NGAP_
INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
pdusession_param
[
i
].
upf_addr
.
length
=
OCTET_STRING_TO_INT32
(
&
gTPTunnel_p
->
gTP_TEID
,
NGAP_
PDUSESSION_SETUP_REQ
(
message_p
).
pdusession_setup_params
[
i
].
gtp_teid
);
NGAP_
PDUSESSION_SETUP_REQ
(
message_p
).
pdusession_setup_params
[
i
].
upf_addr
.
length
=
gTPTunnel_p
->
transportLayerAddress
.
size
*
8
-
gTPTunnel_p
->
transportLayerAddress
.
bits_unused
;
memcpy
(
NGAP_
INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
pdusession_param
[
i
].
upf_addr
.
buffer
,
memcpy
(
NGAP_
PDUSESSION_SETUP_REQ
(
message_p
).
pdusession_setup_params
[
i
].
upf_addr
.
buffer
,
gTPTunnel_p
->
transportLayerAddress
.
buf
,
gTPTunnel_p
->
transportLayerAddress
.
size
);
}
break
;
...
...
@@ -1340,7 +1339,7 @@ int ngap_gNB_handle_pdusession_setup_request(uint32_t assoc_id,
/* mandatory PDUSessionType */
case
NGAP_ProtocolIE_ID_id_PDUSessionType
:
NGAP_INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
pdusession_param
[
i
].
upf_addr
.
pdu_session_type
=
(
uint8_t
)
pdusessionTransfer_ies
->
value
.
choice
.
PDUSessionType
;
NGAP_PDUSESSION_SETUP_REQ
(
message_p
).
pdusession_setup_params
[
i
].
upf_addr
.
pdu_session_type
=
(
uint8_t
)
pdusessionTransfer_ies
->
value
.
choice
.
PDUSessionType
;
break
;
/* optional SecurityIndication */
...
...
@@ -1360,19 +1359,19 @@ int ngap_gNB_handle_pdusession_setup_request(uint32_t assoc_id,
DevAssert
(
pdusessionTransfer_ies
->
value
.
choice
.
QosFlowSetupRequestList
.
list
.
count
>
0
);
DevAssert
(
pdusessionTransfer_ies
->
value
.
choice
.
QosFlowSetupRequestList
.
list
.
count
<=
NGAP_maxnoofQosFlows
);
NGAP_
INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
pdusession_param
[
i
].
nb_qos
=
pdusessionTransfer_ies
->
value
.
choice
.
QosFlowSetupRequestList
.
list
.
count
;
NGAP_
PDUSESSION_SETUP_REQ
(
message_p
).
pdusession_setup_params
[
i
].
nb_qos
=
pdusessionTransfer_ies
->
value
.
choice
.
QosFlowSetupRequestList
.
list
.
count
;
for
(
int
qosIdx
=
0
;
qosIdx
<
pdusessionTransfer_ies
->
value
.
choice
.
QosFlowSetupRequestList
.
list
.
count
;
qosIdx
++
){
qosFlowItem_p
=
pdusessionTransfer_ies
->
value
.
choice
.
QosFlowSetupRequestList
.
list
.
array
[
qosIdx
];
/* Set the QOS informations */
NGAP_
INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
pdusession_param
[
i
].
qos
[
qosIdx
].
qci
=
(
uint8_t
)
qosFlowItem_p
->
qosFlowIdentifier
;
NGAP_
PDUSESSION_SETUP_REQ
(
message_p
).
pdusession_setup_params
[
i
].
qos
[
qosIdx
].
qci
=
(
uint8_t
)
qosFlowItem_p
->
qosFlowIdentifier
;
NGAP_
INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
pdusession_param
[
i
].
qos
[
qosIdx
].
allocation_retention_priority
.
priority_level
=
NGAP_
PDUSESSION_SETUP_REQ
(
message_p
).
pdusession_setup_params
[
i
].
qos
[
qosIdx
].
allocation_retention_priority
.
priority_level
=
qosFlowItem_p
->
qosFlowLevelQosParameters
.
allocationAndRetentionPriority
.
priorityLevelARP
;
NGAP_
INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
pdusession_param
[
i
].
qos
[
qosIdx
].
allocation_retention_priority
.
pre_emp_capability
=
NGAP_
PDUSESSION_SETUP_REQ
(
message_p
).
pdusession_setup_params
[
i
].
qos
[
qosIdx
].
allocation_retention_priority
.
pre_emp_capability
=
qosFlowItem_p
->
qosFlowLevelQosParameters
.
allocationAndRetentionPriority
.
pre_emptionCapability
;
NGAP_
INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
pdusession_param
[
i
].
qos
[
qosIdx
].
allocation_retention_priority
.
pre_emp_vulnerability
=
NGAP_
PDUSESSION_SETUP_REQ
(
message_p
).
pdusession_setup_params
[
i
].
qos
[
qosIdx
].
allocation_retention_priority
.
pre_emp_vulnerability
=
qosFlowItem_p
->
qosFlowLevelQosParameters
.
allocationAndRetentionPriority
.
pre_emptionVulnerability
;
}
}
...
...
openair3/NGAP/ngap_gNB_nas_procedures.c
View file @
b0c79092
...
...
@@ -669,7 +669,7 @@ int ngap_gNB_initial_ctxt_resp(
if
(
!
(
ue_context_p
->
ue_state
==
NGAP_UE_CONNECTED
||
ue_context_p
->
ue_state
==
NGAP_UE_WAITING_CSR
))
{
NGAP_WARN
(
"You are attempting to send NAS data over non-connected "
"gNB ue ngap id: %0
6
x, current state: %d
\n
"
,
"gNB ue ngap id: %0
8
x, current state: %d
\n
"
,
initial_ctxt_resp_p
->
gNB_ue_ngap_id
,
ue_context_p
->
ue_state
);
return
-
1
;
}
...
...
@@ -969,7 +969,7 @@ int ngap_gNB_pdusession_setup_resp(instance_t instance,
if
((
ue_context_p
=
ngap_gNB_get_ue_context
(
ngap_gNB_instance_p
,
pdusession_setup_resp_p
->
gNB_ue_ngap_id
))
==
NULL
)
{
/* The context for this gNB ue ngap id doesn't exist in the map of gNB UEs */
NGAP_WARN
(
"Failed to find ue context associated with gNB ue ngap id: 0x%0
6
x
\n
"
,
NGAP_WARN
(
"Failed to find ue context associated with gNB ue ngap id: 0x%0
8
x
\n
"
,
pdusession_setup_resp_p
->
gNB_ue_ngap_id
);
return
-
1
;
}
...
...
@@ -980,7 +980,7 @@ int ngap_gNB_pdusession_setup_resp(instance_t instance,
if
(
!
(
ue_context_p
->
ue_state
==
NGAP_UE_CONNECTED
||
ue_context_p
->
ue_state
==
NGAP_UE_WAITING_CSR
))
{
NGAP_WARN
(
"You are attempting to send NAS data over non-connected "
"gNB ue ngap id: %0
6
x, current state: %d
\n
"
,
"gNB ue ngap id: %0
8
x, current state: %d
\n
"
,
pdusession_setup_resp_p
->
gNB_ue_ngap_id
,
ue_context_p
->
ue_state
);
return
-
1
;
}
...
...
@@ -998,8 +998,6 @@ int ngap_gNB_pdusession_setup_resp(instance_t instance,
ie
->
criticality
=
NGAP_Criticality_ignore
;
ie
->
value
.
present
=
NGAP_PDUSessionResourceSetupResponseIEs__value_PR_AMF_UE_NGAP_ID
;
asn_uint642INTEGER
(
&
ie
->
value
.
choice
.
AMF_UE_NGAP_ID
,
ue_context_p
->
amf_ue_ngap_id
);
//ie->value.choice.AMF_UE_NGAP_ID = ue_context_p->amf_ue_ngap_id;
asn_uint642INTEGER
(
&
ie
->
value
.
choice
.
AMF_UE_NGAP_ID
,
ue_context_p
->
amf_ue_ngap_id
);
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* mandatory */
ie
=
(
NGAP_PDUSessionResourceSetupResponseIEs_t
*
)
calloc
(
1
,
sizeof
(
NGAP_PDUSessionResourceSetupResponseIEs_t
));
...
...
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