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
d8496bdf
Commit
d8496bdf
authored
Mar 28, 2021
by
luhan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update libngap: add UEAggregateMaximumBitRate
parent
a4562ebf
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
53 additions
and
6 deletions
+53
-6
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+2
-1
src/ngap/libngap/.Ngap_ProtocolIE-Field.h.swp
src/ngap/libngap/.Ngap_ProtocolIE-Field.h.swp
+0
-0
src/ngap/libngap/Ngap_ProtocolIE-Field.c
src/ngap/libngap/Ngap_ProtocolIE-Field.c
+14
-1
src/ngap/libngap/Ngap_ProtocolIE-Field.h
src/ngap/libngap/Ngap_ProtocolIE-Field.h
+3
-1
src/ngap/ngapMsgs/PduSessionResourceSetupRequest.cpp
src/ngap/ngapMsgs/PduSessionResourceSetupRequest.cpp
+30
-1
src/ngap/ngapMsgs/PduSessionResourceSetupRequest.hpp
src/ngap/ngapMsgs/PduSessionResourceSetupRequest.hpp
+3
-1
src/sbi/amf_server/api/N1N2MessageCollectionDocumentApi.cpp
src/sbi/amf_server/api/N1N2MessageCollectionDocumentApi.cpp
+1
-1
No files found.
src/amf-app/amf_n2.cpp
View file @
d8496bdf
...
...
@@ -711,7 +711,8 @@ void amf_n2::handle_itti_message(
item
.
pduSessionResourceSetupRequestTransfer
.
size
=
blength
(
itti_msg
.
n2sm
);
list
.
push_back
(
item
);
psrsr
->
setPduSessionResourceSetupRequestList
(
list
);
psrsr
->
setUEAggregateMaxBitRate
(
0x08a7d8c0
,
0x20989680
);
size_t
buffer_size
=
BUFFER_SIZE_512
;
char
*
buffer
=
(
char
*
)
calloc
(
1
,
buffer_size
);
int
encoded_size
=
0
;
...
...
src/ngap/libngap/.Ngap_ProtocolIE-Field.h.swp
deleted
100644 → 0
View file @
a4562ebf
File deleted
src/ngap/libngap/Ngap_ProtocolIE-Field.c
View file @
d8496bdf
...
...
@@ -21508,6 +21508,19 @@ static asn_TYPE_member_t asn_MBR_Ngap_value_120[] = {
0,
0, /* No default value */
"PDUSessionResourceSetupListSUReq"},
{ATF_NOFLAGS,
0,
offsetof(
struct Ngap_PDUSessionResourceSetupRequestIEs__value,
choice.UEAggregateMaximumBitRate),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_Ngap_UEAggregateMaximumBitRate,
0,
{0, 0, 0},
0,
0, /* No default value */
"UEAggregateMaximumBitRate"},
};
static const asn_TYPE_tag2member_t asn_MAP_Ngap_value_tag2el_120[] = {
{(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2}, /* AMF-UE-NGAP-ID */
...
...
@@ -21540,7 +21553,7 @@ static /* Use -fall-defs-global to expose */
0, /* No tags (count) */
{0, 0, OPEN_TYPE_constraint},
asn_MBR_Ngap_value_120,
5
, /* Elements count */
6
, /* Elements count */
&asn_SPC_Ngap_value_specs_120 /* Additional specs */
};
src/ngap/libngap/Ngap_ProtocolIE-Field.h
View file @
d8496bdf
...
...
@@ -302,7 +302,8 @@ typedef enum Ngap_PDUSessionResourceSetupRequestIEs__value_PR {
Ngap_PDUSessionResourceSetupRequestIEs__value_PR_RAN_UE_NGAP_ID
,
Ngap_PDUSessionResourceSetupRequestIEs__value_PR_RANPagingPriority
,
Ngap_PDUSessionResourceSetupRequestIEs__value_PR_NAS_PDU
,
Ngap_PDUSessionResourceSetupRequestIEs__value_PR_PDUSessionResourceSetupListSUReq
Ngap_PDUSessionResourceSetupRequestIEs__value_PR_PDUSessionResourceSetupListSUReq
,
Ngap_PDUSessionResourceSetupRequestIEs__value_PR_UEAggregateMaximumBitRate
}
Ngap_PDUSessionResourceSetupRequestIEs__value_PR
;
typedef
enum
Ngap_PDUSessionResourceSetupResponseIEs__value_PR
{
Ngap_PDUSessionResourceSetupResponseIEs__value_PR_NOTHING
,
/* No components
...
...
@@ -1389,6 +1390,7 @@ typedef struct Ngap_PDUSessionResourceSetupRequestIEs {
Ngap_RANPagingPriority_t
RANPagingPriority
;
Ngap_NAS_PDU_t
NAS_PDU
;
Ngap_PDUSessionResourceSetupListSUReq_t
PDUSessionResourceSetupListSUReq
;
Ngap_UEAggregateMaximumBitRate_t
UEAggregateMaximumBitRate
;
}
choice
;
/* Context for parsing across buffer boundaries */
...
...
src/ngap/ngapMsgs/PduSessionResourceSetupRequest.cpp
View file @
d8496bdf
...
...
@@ -50,10 +50,39 @@ PduSessionResourceSetupRequestMsg::PduSessionResourceSetupRequestMsg() {
ranPagingPriority
=
NULL
;
nasPdu
=
NULL
;
pduSessionResourceSetupRequestList
=
NULL
;
uEAggregateMaxBitRate
=
NULL
;
}
//------------------------------------------------------------------------------
PduSessionResourceSetupRequestMsg
::~
PduSessionResourceSetupRequestMsg
()
{}
//-----------------------------------------------------------------------------
void
PduSessionResourceSetupRequestMsg
::
setUEAggregateMaxBitRate
(
long
bit_rate_downlink
,
long
bit_rate_uplink
)
{
if
(
!
uEAggregateMaxBitRate
)
uEAggregateMaxBitRate
=
new
UEAggregateMaxBitRate
();
uEAggregateMaxBitRate
->
setUEAggregateMaxBitRate
(
bit_rate_downlink
,
bit_rate_uplink
);
Ngap_PDUSessionResourceSetupRequestIEs_t
*
ie
=
(
Ngap_PDUSessionResourceSetupRequestIEs_t
*
)
calloc
(
1
,
sizeof
(
Ngap_PDUSessionResourceSetupRequestIEs_t
));
ie
->
id
=
Ngap_ProtocolIE_ID_id_UEAggregateMaximumBitRate
;
ie
->
criticality
=
Ngap_Criticality_reject
;
ie
->
value
.
present
=
Ngap_PDUSessionResourceSetupRequestIEs__value_PR_UEAggregateMaximumBitRate
;
int
ret
=
uEAggregateMaxBitRate
->
encode2UEAggregateMaxBitRate
(
ie
->
value
.
choice
.
UEAggregateMaximumBitRate
);
if
(
!
ret
)
{
cout
<<
"encode UEAggregateMaxBitRate IE error"
<<
endl
;
return
;
}
ret
=
ASN_SEQUENCE_ADD
(
&
pduSessionResourceSetupRequestIEs
->
protocolIEs
.
list
,
ie
);
if
(
ret
!=
0
)
cout
<<
"encode UEAggregateMaxBitRate IE error"
<<
endl
;
}
//------------------------------------------------------------------------------
void
PduSessionResourceSetupRequestMsg
::
setMessageType
()
{
...
...
@@ -266,7 +295,7 @@ int PduSessionResourceSetupRequestMsg::encode2buffer(
//------------------------------------------------------------------------------
void
PduSessionResourceSetupRequestMsg
::
encode2buffer_new
(
char
*
buf
,
int
&
encoded_size
)
{
char
*
buffer
=
(
char
*
)
calloc
(
1
,
512
);
// TODO: remove hardcoded value
char
*
buffer
=
(
char
*
)
calloc
(
1
,
1024
);
// TODO: remove hardcoded value
asn_fprint
(
stderr
,
&
asn_DEF_Ngap_NGAP_PDU
,
pduSessionResourceSetupRequestPdu
);
encoded_size
=
aper_encode_to_new_buffer
(
&
asn_DEF_Ngap_NGAP_PDU
,
NULL
,
pduSessionResourceSetupRequestPdu
,
...
...
src/ngap/ngapMsgs/PduSessionResourceSetupRequest.hpp
View file @
d8496bdf
...
...
@@ -38,7 +38,7 @@
#include "NAS-PDU.hpp"
#include "PDUSessionResourceSetupListSUReq.hpp"
#include "PduSessionAggregateMaximumBitRate.hpp"
#include "UEAggregateMaxBitRate.hpp"
extern
"C"
{
#include "Ngap_NGAP-PDU.h"
#include "Ngap_ProtocolIE-Field.h"
...
...
@@ -61,6 +61,7 @@ class PduSessionResourceSetupRequestMsg {
std
::
vector
<
PDUSessionResourceSetupRequestItem_t
>
list
);
void
setPduSessionAggregateMaximumBitRate
(
long
bit_rate_downlink
,
long
bit_rate_uplink
);
void
setUEAggregateMaxBitRate
(
long
bit_rate_downlink
,
long
bit_rate_uplink
);
int
encode2buffer
(
uint8_t
*
buf
,
int
buf_size
);
void
encode2buffer_new
(
char
*
buf
,
int
&
encoded_size
);
// Decapsulation
...
...
@@ -84,6 +85,7 @@ class PduSessionResourceSetupRequestMsg {
NAS_PDU
*
nasPdu
;
PDUSessionResourceSetupListSUReq
*
pduSessionResourceSetupRequestList
;
PduSessionAggregateMaximumBitRate
*
pduSessionAggregateMaximumBitRate
;
UEAggregateMaxBitRate
*
uEAggregateMaxBitRate
;
};
}
// namespace ngap
...
...
src/sbi/amf_server/api/N1N2MessageCollectionDocumentApi.cpp
View file @
d8496bdf
...
...
@@ -81,7 +81,7 @@ void N1N2MessageCollectionDocumentApi::n1_n2_message_transfer_handler(
"Request body, part 2:
\n
%s"
,
parts
[
1
].
body
.
c_str
());
bool
is_ngap
=
false
;
if
(
size
>
0
)
{
if
(
size
>
2
)
{
//change 0 to 2, to fix crashes when pdu session rejected is received
is_ngap
=
true
;
Logger
::
amf_server
().
debug
(
"Request body, part 3:
\n
%s"
,
parts
[
2
].
body
.
c_str
());
...
...
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