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
ZhouShuya
OpenXG-RAN
Commits
46f1dc96
Commit
46f1dc96
authored
Sep 10, 2020
by
zhenghuangkun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify NGAP Message
parent
bdd31eb8
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
262 additions
and
198 deletions
+262
-198
cmake_targets/tools/make_asn1c_includes.sh
cmake_targets/tools/make_asn1c_includes.sh
+4
-0
common/utils/msc/msc.h
common/utils/msc/msc.h
+2
-0
openair2/COMMON/ngap_messages_types.h
openair2/COMMON/ngap_messages_types.h
+58
-70
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+8
-4
openair3/NGAP/ngap_gNB.c
openair3/NGAP/ngap_gNB.c
+1
-1
openair3/NGAP/ngap_gNB_defs.h
openair3/NGAP/ngap_gNB_defs.h
+10
-15
openair3/NGAP/ngap_gNB_nas_procedures.c
openair3/NGAP/ngap_gNB_nas_procedures.c
+61
-68
openair3/NGAP/ngap_gNB_nnsf.c
openair3/NGAP/ngap_gNB_nnsf.c
+42
-34
openair3/NGAP/ngap_gNB_nnsf.h
openair3/NGAP/ngap_gNB_nnsf.h
+6
-6
openair3/UTILS/conversions.h
openair3/UTILS/conversions.h
+70
-0
No files found.
cmake_targets/tools/make_asn1c_includes.sh
View file @
46f1dc96
...
...
@@ -19,6 +19,10 @@ if [ "$done_flag" -ot $ASN1_SOURCE_DIR ] ; then
sed
-i
's/18446744073709551615))/18446744073709551615U))/g'
"
$GENERATED_FULL_DIR
"
/
${
ASN1C_PREFIX
}
E-RABUsageReportItem.c
sed
-i
's/18446744073709551615 }/18446744073709551615U }/g'
"
$GENERATED_FULL_DIR
"
/
${
ASN1C_PREFIX
}
E-RABUsageReportItem.c
fi
if
[
"
$ASN1C_PREFIX
"
=
"NGAP_"
]
;
then
sed
-i
's/18446744073709551615))/18446744073709551615U))/g'
"
$GENERATED_FULL_DIR
"
/
${
ASN1C_PREFIX
}
VolumeTimedReport-Item.c
sed
-i
's/18446744073709551615 }/18446744073709551615U }/g'
"
$GENERATED_FULL_DIR
"
/
${
ASN1C_PREFIX
}
VolumeTimedReport-Item.c
fi
fi
touch
$done_flag
common/utils/msc/msc.h
View file @
46f1dc96
...
...
@@ -51,9 +51,11 @@ typedef enum {
MSC_RRC_ENB
,
MSC_IP_ENB
,
MSC_S1AP_ENB
,
MSC_NGAP_GNB
,
MSC_GTPU_ENB
,
MSC_GTPU_SGW
,
MSC_S1AP_MME
,
MSC_NGAP_AMF
,
MSC_MMEAPP_MME
,
MSC_NAS_MME
,
MSC_NAS_EMM_MME
,
...
...
openair2/COMMON/ngap_messages_types.h
View file @
46f1dc96
This diff is collapsed.
Click to expand it.
openair2/GNB_APP/gnb_config.c
View file @
46f1dc96
...
...
@@ -343,7 +343,8 @@ void RCconfig_nr_flexran()
if
(
!
GNBParamList
.
paramarray
[
i
][
GNB_GNB_ID_IDX
].
uptr
)
{
// Calculate a default gNB ID
if
(
EPC_MODE_ENABLED
)
gnb_id
=
i
+
(
s1ap_generate_eNB_id
()
&
0xFFFF8
);
//gnb_id = i + (ngap_generate_gNB_id () & 0xFFFF8);
gnb_id
=
i
+
(
s1ap_generate_eNB_id
()
&
0xFFFF8
);
else
gnb_id
=
i
;
}
else
{
...
...
@@ -570,7 +571,8 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
// Calculate a default gNB ID
if
(
EPC_MODE_ENABLED
)
{
uint32_t
hash
;
hash
=
s1ap_generate_eNB_id
();
//hash = ngap_generate_gNB_id ();
hash
=
s1ap_generate_eNB_id
();
gnb_id
=
i
+
(
hash
&
0xFFFF8
);
}
else
{
gnb_id
=
i
;
...
...
@@ -787,7 +789,8 @@ int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i) {
if
(
EPC_MODE_ENABLED
)
{
uint32_t
hash
;
hash
=
s1ap_generate_eNB_id
();
//hash = ngap_generate_gNB_id ();
hash
=
s1ap_generate_eNB_id
();
gnb_id
=
k
+
(
hash
&
0xFFFF8
);
}
else
{
gnb_id
=
k
;
...
...
@@ -1036,7 +1039,8 @@ int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i) {
// Calculate a default eNB ID
if
(
EPC_MODE_ENABLED
)
{
uint32_t
hash
;
hash
=
s1ap_generate_eNB_id
();
//hash = ngap_generate_gNB_id ();
hash
=
s1ap_generate_eNB_id
();
gnb_id
=
k
+
(
hash
&
0xFFFF8
);
}
else
{
gnb_id
=
k
;
...
...
openair3/NGAP/ngap_gNB.c
View file @
46f1dc96
...
...
@@ -194,7 +194,7 @@ void ngap_gNB_handle_register_gNB(instance_t instance, ngap_register_gnb_req_t *
new_instance
->
cell_type
=
ngap_register_gNB
->
cell_type
;
new_instance
->
tac
=
ngap_register_gNB
->
tac
;
memcpy
(
&
new_instance
->
gNB_
s1
_ip
,
memcpy
(
&
new_instance
->
gNB_
ng
_ip
,
&
ngap_register_gNB
->
gnb_ip_address
,
sizeof
(
ngap_register_gNB
->
gnb_ip_address
));
...
...
openair3/NGAP/ngap_gNB_defs.h
View file @
46f1dc96
...
...
@@ -54,7 +54,7 @@ typedef enum {
* originated data transfer E(i.e. reject traffic corresponding to RRC cause
* “mo-data E(TS 36.331 [16])), or
* - “reject all RRC connection establishments for signalling E(i.e. reject
* traffic corresponding to RRC cause “modata Eand “mo-signalling E * (TS 3
6
.331 [16])),or
* traffic corresponding to RRC cause “modata Eand “mo-signalling E * (TS 3
8
.331 [16])),or
* - “only permit RRC connection establishments for emergency sessions and
* mobile terminated services E(i.e. only permit traffic corresponding to RRC
* cause “emergency Eand “mt-Access E(TS 36.331 [16])).
...
...
@@ -125,12 +125,13 @@ struct served_guami_s {
STAILQ_ENTRY
(
served_guami_s
)
next
;
};
/*
slice support
element */
struct
slice_support_s
{
/*
NSSAI
element */
typedef
struct
ngap_gNB_NSSAI_s
{
uint8_t
sST
;
uint8_t
sD_flag
;
uint8_t
sD
[
3
];
};
}
ngap_gNB_NSSAI_t
,
slice_support_s
;
/* plmn support element */
struct
plmn_support_s
{
...
...
@@ -205,12 +206,6 @@ typedef struct ngap_gNB_amf_data_s {
struct
ngap_gNB_instance_s
*
ngap_gNB_instance
;
}
ngap_gNB_amf_data_t
;
typedef
struct
ngap_gNB_NSSAI_s
{
uint8_t
sST
;
uint8_t
sD_flag
;
uint8_t
sD
[
3
];
}
ngap_gNB_NSSAI_t
;
typedef
struct
ngap_gNB_instance_s
{
/* Next ngap gNB association.
* Only used for virtual mode.
...
...
@@ -239,17 +234,17 @@ typedef struct ngap_gNB_instance_s {
/* Unique gNB_id to identify the gNB within EPC.
* In our case the gNB is a macro gNB so the id will be 20 bits long.
* For Home gNB id, this field should be
28
bits long.
* For Home gNB id, this field should be
36
bits long.
*/
uint
32
_t
gNB_id
;
uint
64
_t
gNB_id
;
/* The type of the cell */
enum
cell_type_e
cell_type
;
/* Tracking area code */
uint
16
_t
tac
;
uint
32
_t
tac
;
/* gNB NGAP IP address */
net_ip_address_t
gNB_
s1
_ip
;
net_ip_address_t
gNB_
ng
_ip
;
/* Mobile Country Code
* Mobile Network Code
...
...
@@ -263,7 +258,7 @@ typedef struct ngap_gNB_instance_s {
ngap_gNB_NSSAI_t
s_nssai
[
PLMN_LIST_MAX_SIZE
][
1024
];
/* Default Paging DRX of the gNB as defined in TS 36.304 */
paging_drx_t
default_drx
;
ngap_
paging_drx_t
default_drx
;
}
ngap_gNB_instance_t
;
typedef
struct
{
...
...
openair3/NGAP/ngap_gNB_nas_procedures.c
View file @
46f1dc96
This diff is collapsed.
Click to expand it.
openair3/NGAP/ngap_gNB_nnsf.c
View file @
46f1dc96
...
...
@@ -38,7 +38,7 @@
struct
ngap_gNB_amf_data_s
*
ngap_gNB_nnsf_select_amf
(
ngap_gNB_instance_t
*
instance_p
,
rrc_establishment_cause_t
cause
)
ngap_
rrc_establishment_cause_t
cause
)
{
struct
ngap_gNB_amf_data_s
*
amf_data_p
=
NULL
;
struct
ngap_gNB_amf_data_s
*
amf_highest_capacity_p
=
NULL
;
...
...
@@ -54,19 +54,19 @@ ngap_gNB_nnsf_select_amf(ngap_gNB_instance_t *instance_p,
* cause and take decision to the select this AMF depending on
* the overload state.
*/
if
((
cause
==
RRC_CAUSE_MO_DATA
)
if
((
cause
==
NGAP_
RRC_CAUSE_MO_DATA
)
&&
(
amf_data_p
->
overload_state
==
NGAP_OVERLOAD_REJECT_MO_DATA
))
{
continue
;
}
if
((
amf_data_p
->
overload_state
==
NGAP_OVERLOAD_REJECT_ALL_SIGNALLING
)
&&
((
cause
==
RRC_CAUSE_MO_SIGNALLING
)
||
(
cause
==
RRC_CAUSE_MO_DATA
)))
{
&&
((
cause
==
NGAP_RRC_CAUSE_MO_SIGNALLING
)
||
(
cause
==
NGAP_
RRC_CAUSE_MO_DATA
)))
{
continue
;
}
if
((
amf_data_p
->
overload_state
==
NGAP_OVERLOAD_ONLY_EMERGENCY_AND_MT
)
&&
((
cause
==
RRC_CAUSE_MO_SIGNALLING
)
||
(
cause
==
RRC_CAUSE_MO_DATA
)
||
(
cause
==
RRC_CAUSE_HIGH_PRIO_ACCESS
)))
{
&&
((
cause
==
NGAP_RRC_CAUSE_MO_SIGNALLING
)
||
(
cause
==
NGAP_
RRC_CAUSE_MO_DATA
)
||
(
cause
==
NGAP_
RRC_CAUSE_HIGH_PRIO_ACCESS
)))
{
continue
;
}
...
...
@@ -91,7 +91,7 @@ ngap_gNB_nnsf_select_amf(ngap_gNB_instance_t *instance_p,
struct
ngap_gNB_amf_data_s
*
ngap_gNB_nnsf_select_amf_by_plmn_id
(
ngap_gNB_instance_t
*
instance_p
,
rrc_establishment_cause_t
cause
,
ngap_
rrc_establishment_cause_t
cause
,
int
selected_plmn_identity
)
{
struct
ngap_gNB_amf_data_s
*
amf_data_p
=
NULL
;
...
...
@@ -110,19 +110,19 @@ ngap_gNB_nnsf_select_amf_by_plmn_id(ngap_gNB_instance_t *instance_p,
* cause and take decision to the select this AMF depending on
* the overload state.
*/
if
((
cause
==
RRC_CAUSE_MO_DATA
)
if
((
cause
==
NGAP_
RRC_CAUSE_MO_DATA
)
&&
(
amf_data_p
->
overload_state
==
NGAP_OVERLOAD_REJECT_MO_DATA
))
{
continue
;
}
if
((
amf_data_p
->
overload_state
==
NGAP_OVERLOAD_REJECT_ALL_SIGNALLING
)
&&
((
cause
==
RRC_CAUSE_MO_SIGNALLING
)
||
(
cause
==
RRC_CAUSE_MO_DATA
)))
{
&&
((
cause
==
NGAP_RRC_CAUSE_MO_SIGNALLING
)
||
(
cause
==
NGAP_
RRC_CAUSE_MO_DATA
)))
{
continue
;
}
if
((
amf_data_p
->
overload_state
==
NGAP_OVERLOAD_ONLY_EMERGENCY_AND_MT
)
&&
((
cause
==
RRC_CAUSE_MO_SIGNALLING
)
||
(
cause
==
RRC_CAUSE_MO_DATA
)
||
(
cause
==
RRC_CAUSE_HIGH_PRIO_ACCESS
)))
{
&&
((
cause
==
NGAP_RRC_CAUSE_MO_SIGNALLING
)
||
(
cause
==
NGAP_
RRC_CAUSE_MO_DATA
)
||
(
cause
==
NGAP_
RRC_CAUSE_HIGH_PRIO_ACCESS
)))
{
continue
;
}
...
...
@@ -160,10 +160,10 @@ ngap_gNB_nnsf_select_amf_by_plmn_id(ngap_gNB_instance_t *instance_p,
}
struct
ngap_gNB_amf_data_s
*
ngap_gNB_nnsf_select_amf_by_amf_
code
(
ngap_gNB_instance_t
*
instance_p
,
rrc_establishment_cause_t
cause
,
ngap_gNB_nnsf_select_amf_by_amf_
setid
(
ngap_gNB_instance_t
*
instance_p
,
ngap_
rrc_establishment_cause_t
cause
,
int
selected_plmn_identity
,
uint8_t
amf_
code
)
uint8_t
amf_
setid
)
{
struct
ngap_gNB_amf_data_s
*
amf_data_p
=
NULL
;
...
...
@@ -179,19 +179,19 @@ ngap_gNB_nnsf_select_amf_by_amf_code(ngap_gNB_instance_t *instance_p,
* cause and take decision to the select this AMF depending on
* the overload state.
*/
if
((
cause
==
RRC_CAUSE_MO_DATA
)
if
((
cause
==
NGAP_
RRC_CAUSE_MO_DATA
)
&&
(
amf_data_p
->
overload_state
==
NGAP_OVERLOAD_REJECT_MO_DATA
))
{
continue
;
}
if
((
amf_data_p
->
overload_state
==
NGAP_OVERLOAD_REJECT_ALL_SIGNALLING
)
&&
((
cause
==
RRC_CAUSE_MO_SIGNALLING
)
||
(
cause
==
RRC_CAUSE_MO_DATA
)))
{
&&
((
cause
==
NGAP_RRC_CAUSE_MO_SIGNALLING
)
||
(
cause
==
NGAP_
RRC_CAUSE_MO_DATA
)))
{
continue
;
}
if
((
amf_data_p
->
overload_state
==
NGAP_OVERLOAD_ONLY_EMERGENCY_AND_MT
)
&&
((
cause
==
RRC_CAUSE_MO_SIGNALLING
)
||
(
cause
==
RRC_CAUSE_MO_DATA
)
||
(
cause
==
RRC_CAUSE_HIGH_PRIO_ACCESS
)))
{
&&
((
cause
==
NGAP_RRC_CAUSE_MO_SIGNALLING
)
||
(
cause
==
NGAP_
RRC_CAUSE_MO_DATA
)
||
(
cause
==
NGAP_
RRC_CAUSE_HIGH_PRIO_ACCESS
)))
{
continue
;
}
...
...
@@ -206,7 +206,7 @@ ngap_gNB_nnsf_select_amf_by_amf_code(ngap_gNB_instance_t *instance_p,
/* Looking for AMF code matching the one provided by NAS */
STAILQ_FOREACH
(
guami_p
,
&
amf_data_p
->
served_guami
,
next
)
{
struct
amf_
code_s
*
amf_code
_p
=
NULL
;
struct
amf_
set_id_s
*
amf_setid
_p
=
NULL
;
struct
plmn_identity_s
*
served_plmn_p
=
NULL
;
STAILQ_FOREACH
(
served_plmn_p
,
&
guami_p
->
served_plmns
,
next
)
{
...
...
@@ -215,8 +215,8 @@ ngap_gNB_nnsf_select_amf_by_amf_code(ngap_gNB_instance_t *instance_p,
break
;
}
}
STAILQ_FOREACH
(
amf_
code_p
,
&
guami_p
->
amf_code
s
,
next
)
{
if
(
amf_
code_p
->
amf_code
==
amf_code
)
{
STAILQ_FOREACH
(
amf_
setid_p
,
&
guami_p
->
amf_set_id
s
,
next
)
{
if
(
amf_
setid_p
->
amf_set_id
==
amf_setid
)
{
break
;
}
}
...
...
@@ -225,7 +225,7 @@ ngap_gNB_nnsf_select_amf_by_amf_code(ngap_gNB_instance_t *instance_p,
* the AMF is knwown and the association is ready.
* Return the reference to the AMF to use it for this UE.
*/
if
(
amf_
code
_p
&&
served_plmn_p
)
{
if
(
amf_
setid
_p
&&
served_plmn_p
)
{
return
amf_data_p
;
}
}
...
...
@@ -239,7 +239,7 @@ ngap_gNB_nnsf_select_amf_by_amf_code(ngap_gNB_instance_t *instance_p,
struct
ngap_gNB_amf_data_s
*
ngap_gNB_nnsf_select_amf_by_guami
(
ngap_gNB_instance_t
*
instance_p
,
rrc_establishment_cause_t
cause
,
ngap_
rrc_establishment_cause_t
cause
,
ngap_guami_t
guami
)
{
struct
ngap_gNB_amf_data_s
*
amf_data_p
=
NULL
;
...
...
@@ -256,19 +256,19 @@ ngap_gNB_nnsf_select_amf_by_guami(ngap_gNB_instance_t *instance_p,
* cause and take decision to the select this AMF depending on
* the overload state.
*/
if
((
cause
==
RRC_CAUSE_MO_DATA
)
if
((
cause
==
NGAP_
RRC_CAUSE_MO_DATA
)
&&
(
amf_data_p
->
overload_state
==
NGAP_OVERLOAD_REJECT_MO_DATA
))
{
continue
;
}
if
((
amf_data_p
->
overload_state
==
NGAP_OVERLOAD_REJECT_ALL_SIGNALLING
)
&&
((
cause
==
RRC_CAUSE_MO_SIGNALLING
)
||
(
cause
==
RRC_CAUSE_MO_DATA
)))
{
&&
((
cause
==
NGAP_RRC_CAUSE_MO_SIGNALLING
)
||
(
cause
==
NGAP_
RRC_CAUSE_MO_DATA
)))
{
continue
;
}
if
((
amf_data_p
->
overload_state
==
NGAP_OVERLOAD_ONLY_EMERGENCY_AND_MT
)
&&
((
cause
==
RRC_CAUSE_MO_SIGNALLING
)
||
(
cause
==
RRC_CAUSE_MO_DATA
)
||
(
cause
==
RRC_CAUSE_HIGH_PRIO_ACCESS
)))
{
&&
((
cause
==
NGAP_RRC_CAUSE_MO_SIGNALLING
)
||
(
cause
==
NGAP_
RRC_CAUSE_MO_DATA
)
||
(
cause
==
NGAP_
RRC_CAUSE_HIGH_PRIO_ACCESS
)))
{
continue
;
}
...
...
@@ -283,8 +283,9 @@ ngap_gNB_nnsf_select_amf_by_guami(ngap_gNB_instance_t *instance_p,
/* Looking for AMF guami matching the one provided by NAS */
STAILQ_FOREACH
(
guami_p
,
&
amf_data_p
->
served_guami
,
next
)
{
struct
served_group_id_s
*
group_id_p
=
NULL
;
struct
amf_code_s
*
amf_code_p
=
NULL
;
struct
served_region_id_s
*
region_id_p
=
NULL
;
struct
amf_set_id_s
*
amf_set_id_p
=
NULL
;
struct
amf_pointer_s
*
pointer_p
=
NULL
;
struct
plmn_identity_s
*
served_plmn_p
=
NULL
;
STAILQ_FOREACH
(
served_plmn_p
,
&
guami_p
->
served_plmns
,
next
)
{
...
...
@@ -293,13 +294,19 @@ ngap_gNB_nnsf_select_amf_by_guami(ngap_gNB_instance_t *instance_p,
break
;
}
}
STAILQ_FOREACH
(
amf_code_p
,
&
guami_p
->
amf_codes
,
next
)
{
if
(
amf_code_p
->
amf_code
==
guami
.
amf_code
)
{
STAILQ_FOREACH
(
region_id_p
,
&
guami_p
->
served_region_ids
,
next
)
{
if
(
region_id_p
->
amf_region_id
==
guami
.
amf_region_id
)
{
break
;
}
}
STAILQ_FOREACH
(
group_id_p
,
&
guami_p
->
served_group_ids
,
next
)
{
if
(
group_id_p
->
amf_group_id
==
guami
.
amf_group_id
)
{
STAILQ_FOREACH
(
amf_set_id_p
,
&
guami_p
->
amf_set_ids
,
next
)
{
if
(
amf_set_id_p
->
amf_set_id
==
guami
.
amf_set_id
)
{
break
;
}
}
STAILQ_FOREACH
(
pointer_p
,
&
guami_p
->
amf_pointers
,
next
)
{
if
(
pointer_p
->
amf_pointer
==
guami
.
amf_pointer
)
{
break
;
}
}
...
...
@@ -308,8 +315,9 @@ ngap_gNB_nnsf_select_amf_by_guami(ngap_gNB_instance_t *instance_p,
* the AMF is knwown and the association is ready.
* Return the reference to the AMF to use it for this UE.
*/
if
((
group_id_p
!=
NULL
)
&&
(
amf_code_p
!=
NULL
)
&&
if
((
region_id_p
!=
NULL
)
&&
(
amf_set_id_p
!=
NULL
)
&&
(
pointer_p
!=
NULL
)
&&
(
served_plmn_p
!=
NULL
))
{
return
amf_data_p
;
}
...
...
openair3/NGAP/ngap_gNB_nnsf.h
View file @
46f1dc96
...
...
@@ -24,22 +24,22 @@
struct
ngap_gNB_amf_data_s
*
ngap_gNB_nnsf_select_amf
(
ngap_gNB_instance_t
*
instance_p
,
rrc_establishment_cause_t
cause
);
ngap_
rrc_establishment_cause_t
cause
);
struct
ngap_gNB_amf_data_s
*
ngap_gNB_nnsf_select_amf_by_plmn_id
(
ngap_gNB_instance_t
*
instance_p
,
rrc_establishment_cause_t
cause
,
ngap_
rrc_establishment_cause_t
cause
,
int
selected_plmn_identity
);
struct
ngap_gNB_amf_data_s
*
ngap_gNB_nnsf_select_amf_by_amf_
code
(
ngap_gNB_instance_t
*
instance_p
,
rrc_establishment_cause_t
cause
,
ngap_gNB_nnsf_select_amf_by_amf_
setid
(
ngap_gNB_instance_t
*
instance_p
,
ngap_
rrc_establishment_cause_t
cause
,
int
selected_plmn_identity
,
uint8_t
amf_
code
);
uint8_t
amf_
setid
);
struct
ngap_gNB_amf_data_s
*
ngap_gNB_nnsf_select_amf_by_guami
(
ngap_gNB_instance_t
*
instance_p
,
rrc_establishment_cause_t
cause
,
ngap_
rrc_establishment_cause_t
cause
,
ngap_guami_t
guami
);
struct
ngap_gNB_amf_data_s
*
...
...
openair3/UTILS/conversions.h
View file @
46f1dc96
...
...
@@ -81,6 +81,23 @@ do { \
((buf)[1]); \
} while(0)
/* Convert an integer on 24 bits to the given bUFFER */
#define INT24_TO_BUFFER(x, buf) \
do { \
(buf)[0] = (x) >> 16; \
(buf)[1] = (x) >> 8; \
(buf)[2] = (x); \
} while(0)
/* Convert an array of char containing vALUE to x */
#define BUFFER_TO_INT24(buf, x) \
do { \
x = ((buf)[0] << 16) | \
((buf)[1] << 8 ) | \
((buf)[2]); \
} while(0)
/* Convert an integer on 32 bits to the given bUFFER */
#define INT32_TO_BUFFER(x, buf) \
do { \
...
...
@@ -126,6 +143,21 @@ do { \
(aSN)->bits_unused = 0; \
} while(0)
#define INT24_TO_OCTET_STRING(x, aSN) \
do { \
(aSN)->buf = calloc(3, sizeof(uint8_t)); \
INT24_TO_BUFFER(x, ((aSN)->buf)); \
(aSN)->size = 3; \
} while(0)
#define INT24_TO_BIT_STRING(x, aSN) \
do { \
INT24_TO_OCTET_STRING(x, aSN); \
(aSN)->bits_unused = 0; \
} while(0)
#define INT8_TO_OCTET_STRING(x, aSN) \
do { \
(aSN)->buf = calloc(1, sizeof(uint8_t)); \
...
...
@@ -137,6 +169,25 @@ do { \
#define M_TMSI_TO_OCTET_STRING INT32_TO_OCTET_STRING
#define MME_GID_TO_OCTET_STRING INT16_TO_OCTET_STRING
#define AMF_REGION_TO_BIT_STRING(x, aSN) \
do { \
INT8_TO_OCTET_STRING(x, aSN); \
(aSN)->bits_unused = 0; \
} while(0)
#define AMF_SETID_TO_BIT_STRING(x, aSN) \
do { \
INT16_TO_OCTET_STRING(x, aSN); \
(aSN)->bits_unused = 6; \
} while(0)
#define AMF_POINTER_TO_BIT_STRING(x, aSN) \
do { \
INT8_TO_OCTET_STRING(x, aSN); \
(aSN)->bits_unused = 2; \
} while(0)
#define ENCRALG_TO_BIT_STRING(encralg, bitstring) \
do { \
(bitstring)->size=2; \
...
...
@@ -197,6 +248,12 @@ do { \
BUFFER_TO_INT16((aSN)->buf, x); \
} while(0)
#define OCTET_STRING_TO_INT24(aSN, x) \
do { \
DevCheck((aSN)->size == 2 || (aSN)->size == 3, (aSN)->size, 0, 0); \
BUFFER_TO_INT24((aSN)->buf, x); \
} while(0)
#define OCTET_STRING_TO_INT32(aSN, x) \
do { \
DevCheck((aSN)->size == 4, (aSN)->size, 0, 0); \
...
...
@@ -462,6 +519,19 @@ do { \
(bITsTRING)->bits_unused = 4; \
} while(0)
#define MACRO_GNB_ID_TO_CELL_IDENTITY(mACRO, cELL_iD, bITsTRING) \
do { \
(bITsTRING)->buf = calloc(5, sizeof(uint8_t)); \
(bITsTRING)->buf[0] = ((mACRO) >> 20); \
(bITsTRING)->buf[1] = (mACRO) >> 12; \
(bITsTRING)->buf[2] = (mACRO) >> 4; \
(bITsTRING)->buf[3] = (((mACRO) & 0x0f) << 4) | ((cELL_iD) >> 4); \
(bITsTRING)->buf[4] = ((cELL_iD) & 0x0f) << 4; \
(bITsTRING)->size = 5; \
(bITsTRING)->bits_unused = 4; \
} while(0)
/* Used to format an uint32_t containing an ipv4 address */
#define IPV4_ADDR "%u.%u.%u.%u"
#define IPV4_ADDR_FORMAT(aDDRESS) \
...
...
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