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
f0f4337d
Commit
f0f4337d
authored
Jan 26, 2023
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Temporary disable UE Radio Capability in Service Request
parent
8ceaea5d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
22 deletions
+35
-22
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+5
-5
src/common/conversions.cpp
src/common/conversions.cpp
+1
-7
src/ngap/ngapIEs/UERadioCapability.cpp
src/ngap/ngapIEs/UERadioCapability.cpp
+21
-6
src/ngap/ngapIEs/UERadioCapability.hpp
src/ngap/ngapIEs/UERadioCapability.hpp
+3
-1
src/ngap/ngapMsgs/NgapMessage.cpp
src/ngap/ngapMsgs/NgapMessage.cpp
+4
-2
src/ngap/ngapMsgs/NgapUEMessage.cpp
src/ngap/ngapMsgs/NgapUEMessage.cpp
+1
-1
No files found.
src/amf-app/amf_n2.cpp
View file @
f0f4337d
...
...
@@ -868,7 +868,8 @@ void amf_n2::handle_itti_message(itti_initial_context_setup_request& itti_msg) {
if
(
itti_msg
.
is_sr
or
itti_msg
.
is_pdu_exist
)
{
// Set UE Radio Capability if available
if
(
gc
->
ue_radio_cap_ind
)
{
msg
->
setUERadioCapability
(
gc
->
ue_radio_cap_ind
);
// TODO: Disable this for the moment
// msg->setUERadioCapability(bstrcpy(gc->ue_radio_cap_ind));
}
if
(
itti_msg
.
is_sr
)
...
...
@@ -934,10 +935,9 @@ void amf_n2::handle_itti_message(itti_initial_context_setup_request& itti_msg) {
}
}
uint8_t
*
buffer
=
(
uint8_t
*
)
calloc
(
1
,
BUFFER_SIZE_2048
);
int
encoded_size
=
0
;
msg
->
encode2NewBuffer
(
buffer
,
encoded_size
);
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
uint8_t
buffer
[
BUFFER_SIZE_2048
];
int
encoded_size
=
msg
->
Encode
(
buffer
,
BUFFER_SIZE_2048
);
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
sctp_s_38412
.
sctp_send_msg
(
gc
->
sctp_assoc_id
,
unc
->
sctp_stream_send
,
&
b
);
bdestroy_wrapper
(
&
b
);
}
...
...
src/common/conversions.cpp
View file @
f0f4337d
...
...
@@ -447,13 +447,7 @@ bool conv::octet_string_2_int8(const OCTET_STRING_t& o_str, uint8_t& value) {
bool
conv
::
octet_string_copy
(
OCTET_STRING_t
&
destination
,
const
OCTET_STRING_t
&
source
)
{
if
(
!
source
.
buf
)
return
false
;
destination
.
buf
=
(
uint8_t
*
)
calloc
(
source
.
size
+
1
,
sizeof
(
uint8_t
));
if
(
!
destination
.
buf
)
return
false
;
memcpy
(
destination
.
buf
,
source
.
buf
,
source
.
size
);
((
uint8_t
*
)
destination
.
buf
)[
source
.
size
]
=
'\0'
;
destination
.
size
=
source
.
size
;
OCTET_STRING_fromBuf
(
&
destination
,
(
char
*
)
source
.
buf
,
source
.
size
);
return
true
;
}
...
...
src/ngap/ngapIEs/UERadioCapability.cpp
View file @
f0f4337d
...
...
@@ -28,37 +28,52 @@ namespace ngap {
//------------------------------------------------------------------------------
UERadioCapability
::
UERadioCapability
()
{}
/*
UERadioCapability::UERadioCapability(const OCTET_STRING_t& capability) {
if (!capability.buf) return;
conv::bstring_2_octet_string(ue_radio_capability_, capability);
}
UERadioCapability::UERadioCapability(const bstring& capability) {
conv::bstring_2_octet_string(capability, ue_radio_capability_);
}
*/
//------------------------------------------------------------------------------
UERadioCapability
::~
UERadioCapability
()
{}
//------------------------------------------------------------------------------
bool
UERadioCapability
::
encode
(
Ngap_UERadioCapability_t
&
ueRadioCapability
)
{
return
conv
::
octet_string_copy
(
ueRadioCapability
,
ue_radio_capability_
);
return
conv
::
bstring_2_octet_string
(
ue_radio_capability_
,
ueRadioCapability
);
}
//------------------------------------------------------------------------------
bool
UERadioCapability
::
decode
(
Ngap_UERadioCapability_t
&
ueRadioCapability
)
{
return
conv
::
octet_string_copy
(
ue_radio_capability_
,
ueRadioCapability
);
if
(
!
ueRadioCapability
.
buf
)
return
false
;
return
conv
::
octet_string_2_bstring
(
ueRadioCapability
,
ue_radio_capability_
);
}
//------------------------------------------------------------------------------
bool
UERadioCapability
::
set
(
const
OCTET_STRING_t
&
capability
)
{
return
conv
::
octet_string_copy
(
ue_radio_capability_
,
capability
);
conv
::
octet_string_2_bstring
(
capability
,
ue_radio_capability_
);
return
true
;
}
//------------------------------------------------------------------------------
bool
UERadioCapability
::
get
(
OCTET_STRING_t
&
capability
)
{
return
conv
::
octet_string_copy
(
capability
,
ue_radio_capability_
);
conv
::
bstring_2_octet_string
(
ue_radio_capability_
,
capability
);
return
true
;
}
//------------------------------------------------------------------------------
bool
UERadioCapability
::
set
(
const
bstring
&
capability
)
{
return
conv
::
bstring_2_octet_string
(
capability
,
ue_radio_capability_
);
ue_radio_capability_
=
bstrcpy
(
capability
);
return
true
;
}
//------------------------------------------------------------------------------
bool
UERadioCapability
::
get
(
bstring
&
capability
)
{
return
conv
::
octet_string_2_bstring
(
ue_radio_capability_
,
capability
);
capability
=
bstrcpy
(
ue_radio_capability_
);
return
true
;
}
}
// namespace ngap
src/ngap/ngapIEs/UERadioCapability.hpp
View file @
f0f4337d
...
...
@@ -33,6 +33,8 @@ namespace ngap {
class
UERadioCapability
{
public:
UERadioCapability
();
// UERadioCapability(const OCTET_STRING_t& capability);
// UERadioCapability(const bstring& capability);
virtual
~
UERadioCapability
();
bool
encode
(
Ngap_UERadioCapability_t
&
ueRadioCapability
);
...
...
@@ -45,7 +47,7 @@ class UERadioCapability {
bool
get
(
bstring
&
capability
);
private:
OCTET_STRING_t
ue_radio_capability_
;
bstring
ue_radio_capability_
;
};
}
// namespace ngap
...
...
src/ngap/ngapMsgs/NgapMessage.cpp
View file @
f0f4337d
...
...
@@ -464,8 +464,10 @@ int NgapMessage::Encode(uint8_t* buf, int bufSize) {
asn_fprint
(
stderr
,
&
asn_DEF_Ngap_NGAP_PDU
,
ngapPdu
);
asn_enc_rval_t
er
=
aper_encode_to_buffer
(
&
asn_DEF_Ngap_NGAP_PDU
,
NULL
,
ngapPdu
,
buf
,
bufSize
);
Logger
::
ngap
().
debug
(
"er.encoded (%d)"
,
er
.
encoded
);
return
er
.
encoded
;
int
encoded_size
=
(
er
.
encoded
+
7
)
>>
3
;
Logger
::
ngap
().
debug
(
"Encoded size (%d)"
,
encoded_size
);
return
encoded_size
;
}
//------------------------------------------------------------------------------
...
...
src/ngap/ngapMsgs/NgapUEMessage.cpp
View file @
f0f4337d
...
...
@@ -25,7 +25,7 @@
namespace
ngap
{
//------------------------------------------------------------------------------
NgapUEMessage
::
NgapUEMessage
()
{}
NgapUEMessage
::
NgapUEMessage
()
:
NgapMessage
()
{}
//------------------------------------------------------------------------------
NgapUEMessage
::~
NgapUEMessage
()
{}
...
...
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