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
b184e52a
Commit
b184e52a
authored
Aug 22, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix encode NGAP message
parent
3314affb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
10 deletions
+9
-10
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+6
-7
src/ngap/ngapMsgs/NgapMessage.cpp
src/ngap/ngapMsgs/NgapMessage.cpp
+2
-2
src/ngap/ngapMsgs/NgapMessage.hpp
src/ngap/ngapMsgs/NgapMessage.hpp
+1
-1
No files found.
src/amf-app/amf_n2.cpp
View file @
b184e52a
...
...
@@ -1031,11 +1031,10 @@ void amf_n2::handle_itti_message(
psrsr
->
setPduSessionResourceSetupRequestList
(
list
);
psrsr
->
setUEAggregateMaxBitRate
(
UE_AGGREGATE_MAXIMUM_BIT_RATE_DL
,
UE_AGGREGATE_MAXIMUM_BIT_RATE_UL
);
size_t
buffer_size
=
BUFFER_SIZE_512
;
uint8_t
buffer
[
BUFFER_SIZE_4096
];
// = (uint8_t*) calloc(1, buffer_size);
uint8_t
*
buffer
=
(
uint8_t
*
)
calloc
(
1
,
BUFFER_SIZE_4096
);
int
encoded_size
=
0
;
psrsr
->
encode2NewBuffer
(
(
uint8_t
**
)
&
buffer
,
encoded_size
);
psrsr
->
encode2NewBuffer
(
buffer
,
encoded_size
);
#if DEBUG_IS_ON
Logger
::
amf_n2
().
debug
(
"N2 SM buffer data: "
);
for
(
int
i
=
0
;
i
<
encoded_size
;
i
++
)
printf
(
"%02x "
,
(
char
)
buffer
[
i
]);
...
...
@@ -1094,9 +1093,9 @@ void amf_n2::handle_itti_message(
modify_request_msg
->
setPduSessionResourceModifyRequestList
(
list
);
uint8_t
buffer
[
BUFFER_SIZE_4096
]
;
uint8_t
*
buffer
=
(
uint8_t
*
)
calloc
(
1
,
BUFFER_SIZE_4096
)
;
int
encoded_size
=
0
;
modify_request_msg
->
encode2NewBuffer
(
(
uint8_t
**
)
&
buffer
,
encoded_size
);
modify_request_msg
->
encode2NewBuffer
(
buffer
,
encoded_size
);
#if DEBUG_IS_ON
Logger
::
amf_n2
().
debug
(
"N2 SM buffer data: "
);
for
(
int
i
=
0
;
i
<
encoded_size
;
i
++
)
printf
(
"%02x "
,
(
char
)
buffer
[
i
]);
...
...
@@ -1151,9 +1150,9 @@ void amf_n2::handle_itti_message(
list
.
push_back
(
item
);
release_cmd_msg
->
setPduSessionResourceToReleaseList
(
list
);
uint8_t
buffer
[
BUFFER_SIZE_4096
]
;
uint8_t
*
buffer
=
(
uint8_t
*
)
calloc
(
1
,
BUFFER_SIZE_4096
)
;
int
encoded_size
=
0
;
release_cmd_msg
->
encode2NewBuffer
(
(
uint8_t
**
)
&
buffer
,
encoded_size
);
release_cmd_msg
->
encode2NewBuffer
(
buffer
,
encoded_size
);
#if DEBUG_IS_ON
Logger
::
amf_n2
().
debug
(
"N2 SM buffer data: "
);
for
(
int
i
=
0
;
i
<
encoded_size
;
i
++
)
printf
(
"%02x "
,
(
char
)
buffer
[
i
]);
...
...
src/ngap/ngapMsgs/NgapMessage.cpp
View file @
b184e52a
...
...
@@ -469,10 +469,10 @@ int NgapMessage::encode2Buffer(uint8_t* buf, int bufSize) {
}
//------------------------------------------------------------------------------
void
NgapMessage
::
encode2NewBuffer
(
uint8_t
*
*
buf
,
int
&
encoded_size
)
{
void
NgapMessage
::
encode2NewBuffer
(
uint8_t
*
&
buf
,
int
&
encoded_size
)
{
asn_fprint
(
stderr
,
&
asn_DEF_Ngap_NGAP_PDU
,
ngapPdu
);
encoded_size
=
aper_encode_to_new_buffer
(
&
asn_DEF_Ngap_NGAP_PDU
,
NULL
,
ngapPdu
,
(
void
**
)
buf
);
&
asn_DEF_Ngap_NGAP_PDU
,
NULL
,
ngapPdu
,
(
void
**
)
&
buf
);
Logger
::
ngap
().
debug
(
"Encoded message size ( %d )"
,
encoded_size
);
return
;
}
...
...
src/ngap/ngapMsgs/NgapMessage.hpp
View file @
b184e52a
...
...
@@ -126,7 +126,7 @@ class NgapMessage {
void
setMessageType
(
NgapMessageType
messageType
);
virtual
bool
decodeFromPdu
(
Ngap_NGAP_PDU_t
*
msgPdu
)
=
0
;
int
encode2Buffer
(
uint8_t
*
buf
,
int
bufSize
);
void
encode2NewBuffer
(
uint8_t
*
*
buf
,
int
&
encoded_size
);
void
encode2NewBuffer
(
uint8_t
*
&
buf
,
int
&
encoded_size
);
protected:
Ngap_NGAP_PDU_t
*
ngapPdu
;
...
...
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