Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
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
OpenXG
OpenXG-SMF
Commits
a0134a3a
Commit
a0134a3a
authored
Nov 05, 2019
by
wangyongshou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add pdu session resource modify request msg
parent
14a8660e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
15 deletions
+85
-15
src/NgapSmfLayer/ng_pdu_session_resource_modify_request.c
src/NgapSmfLayer/ng_pdu_session_resource_modify_request.c
+81
-12
src/NgapSmfLayer/ng_pdu_session_resource_modify_request.h
src/NgapSmfLayer/ng_pdu_session_resource_modify_request.h
+1
-3
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+3
-0
No files found.
src/NgapSmfLayer/ng_pdu_session_resource_modify_request.c
View file @
a0134a3a
...
...
@@ -49,11 +49,7 @@ Ngap_PDUSessionResourceModifyRequestIEs_t *make_modify_request_AMF_UE_NGAP_ID(u
asn_ulong2INTEGER
(
&
ie
->
value
.
choice
.
AMF_UE_NGAP_ID
,
amf_UE_NGAP_ID
&
AMF_UE_NGAP_ID_MASK_
);
size_t
i
=
0
;
for
(
i
;
i
<
ie
->
value
.
choice
.
AMF_UE_NGAP_ID
.
size
;
i
++
)
{
printf
(
"0x%x"
,
ie
->
value
.
choice
.
AMF_UE_NGAP_ID
.
buf
[
i
]);
}
printf
(
"AMF_UE_NGAP_ID:0x%x"
,
ie
->
value
.
choice
.
AMF_UE_NGAP_ID
);
return
ie
;
}
Ngap_PDUSessionResourceModifyRequestIEs_t
*
make_modify_request_RANPagingPriority
(
const
long
ranPagingPriority
)
...
...
@@ -82,10 +78,12 @@ const char *pDUSessionResourceModifyRequestTransfer)
item
->
pDUSessionID
=
pDUSessionID
;
Ngap_NAS_PDU_t
*
nas_pdu
=
calloc
(
1
,
sizeof
(
Ngap_NAS_PDU_t
));
item
->
nAS_PDU
=
nas_pdu
;
item
->
nAS_PDU
=
nas_pdu
;
OCTET_STRING_fromBuf
(
nas_pdu
,
pDUSessionNAS_PDU
,
strlen
(
pDUSessionNAS_PDU
));
OCTET_STRING_fromBuf
(
&
item
->
pDUSessionResourceModifyRequestTransfer
,
pDUSessionResourceModifyRequestTransfer
,
strlen
(
pDUSessionResourceModifyRequestTransfer
));
OCTET_STRING_fromBuf
(
&
item
->
pDUSessionResourceModifyRequestTransfer
,
pDUSessionResourceModifyRequestTransfer
,
strlen
(
pDUSessionResourceModifyRequestTransfer
));
printf
(
"pDUSessionID:0x%x,nas_pdu:%s,Transfer:%s
\n
"
,
item
->
pDUSessionID
,
item
->
nAS_PDU
->
buf
,
item
->
pDUSessionResourceModifyRequestTransfer
.
buf
);
return
item
;
}
...
...
@@ -111,7 +109,8 @@ void add_pdu_session_resource_modify_request_ie(Ngap_PDUSessionResourceModifyReq
}
return
;
}
Ngap_NGAP_PDU_t
*
make_NGAP_pdu_session_resource_modify_request
()
Ngap_NGAP_PDU_t
*
ngap_generate_ng_modify_request
(
const
char
*
inputBuf
)
{
Ngap_NGAP_PDU_t
*
pdu
=
NULL
;
pdu
=
calloc
(
1
,
sizeof
(
Ngap_NGAP_PDU_t
));
...
...
@@ -151,8 +150,6 @@ Ngap_NGAP_PDU_t *make_NGAP_pdu_session_resource_modify_request()
ASN_SEQUENCE_ADD
(
&
ie
->
value
.
choice
.
PDUSessionResourceModifyListModReq
.
list
,
modReqItem
);
add_pdu_session_resource_release_command_ie
(
ngapPDUSessionResourceModifyRequest
,
ie
);
printf
(
"0000000000000, make_NGAP_pdu_session_resource_modify_request
\n
"
);
return
pdu
;
}
...
...
@@ -257,7 +254,7 @@ ngap_amf_handle_ng_pdu_session_resource_modify_request(
pDUSessionID
=
modreqIes_p
->
pDUSessionID
;
if
(
nAS_PDU
)
if
(
modreqIes_p
->
nAS_PDU
)
{
nAS_PDU
=
modreqIes_p
->
nAS_PDU
->
buf
;
nAS_PDU_size
=
modreqIes_p
->
nAS_PDU
->
size
;
...
...
@@ -265,6 +262,9 @@ ngap_amf_handle_ng_pdu_session_resource_modify_request(
pDUSessionResourceModifyRequestTransfer
=
modreqIes_p
->
pDUSessionResourceModifyRequestTransfer
.
buf
;
pDUSessionResourceModifyRequestTransfer_size
=
modreqIes_p
->
pDUSessionResourceModifyRequestTransfer
.
size
;
printf
(
"pDUSessionID:0x%x,nas_pdu:%s,Transfer:%s
\n
"
,
pDUSessionID
,
nAS_PDU
,
pDUSessionResourceModifyRequestTransfer
);
}
}
...
...
@@ -273,3 +273,72 @@ ngap_amf_handle_ng_pdu_session_resource_modify_request(
}
int
make_NGAP_PduSessionResourceModifyRequest
(
const
char
*
inputBuf
,
const
char
*
OutputBuf
)
{
printf
(
"pdu session resource modify request, start--------------------
\n\n
"
);
int
ret
=
0
;
int
rc
=
RETURNok
;
const
sctp_assoc_id_t
assoc_id
=
0
;
const
sctp_stream_id_t
stream
=
0
;
Ngap_NGAP_PDU_t
message
=
{
0
};
//wys: 1024 ?
size_t
buffer_size
=
1024
;
void
*
buffer
=
calloc
(
1
,
buffer_size
);
asn_enc_rval_t
er
;
Ngap_NGAP_PDU_t
*
pdu
=
ngap_generate_ng_modify_request
(
inputBuf
);
if
(
!
pdu
)
goto
ERROR
;
asn_fprint
(
stderr
,
&
asn_DEF_Ngap_NGAP_PDU
,
pdu
);
ret
=
check_NGAP_pdu_constraints
(
pdu
);
if
(
ret
<
0
)
{
printf
(
"ng modify requestConstraint validation failed
\n
"
);
rc
=
RETURNerror
;
goto
ERROR
;
}
//encode
er
=
aper_encode_to_buffer
(
&
asn_DEF_Ngap_NGAP_PDU
,
NULL
,
pdu
,
buffer
,
buffer_size
);
if
(
er
.
encoded
<
0
)
{
printf
(
"ng modify request encode failed,er.encoded:%d
\n
"
,
er
.
encoded
);
rc
=
RETURNerror
;
goto
ERROR
;
}
bstring
msgBuf
=
blk2bstr
(
buffer
,
er
.
encoded
);
//decode
ngap_amf_decode_pdu
(
&
message
,
msgBuf
);
ngap_amf_handle_ng_pdu_session_resource_modify_request
(
0
,
0
,
&
message
);
//Free pdu
ASN_STRUCT_FREE
(
asn_DEF_Ngap_NGAP_PDU
,
pdu
);
if
(
buffer
)
{
free
(
buffer
);
buffer
=
NULL
;
}
printf
(
"pdu session resource modify request, finish--------------------
\n\n
"
);
return
rc
;
ERROR:
//Free pdu
if
(
pdu
)
ASN_STRUCT_FREE
(
asn_DEF_Ngap_NGAP_PDU
,
pdu
);
if
(
buffer
)
{
free
(
buffer
);
buffer
=
NULL
;
}
return
rc
;
}
...
...
src/NgapSmfLayer/ng_pdu_session_resource_modify_request.h
View file @
a0134a3a
...
...
@@ -2,9 +2,7 @@
#define NG_PDU_SESSOIN_RESOURCE_MODIFY_REQUEST_H_
#include "Ngap_NGAP-PDU.h"
Ngap_NGAP_PDU_t
*
make_NGAP_pdu_session_resource_modify_request
();
int
make_NGAP_PduSessionResourceModifyRequest
(
const
char
*
inputBuf
,
const
char
*
outputBuf
);
#endif
src/smf_app/smf_app.cpp
View file @
a0134a3a
...
...
@@ -50,6 +50,8 @@ extern "C"{
#include "../NgapSmfLayer/ng_pdu_session_resource_setup_response.h"
#include "../NgapSmfLayer/ng_pdu_session_resource_release_command.h"
#include "../NgapSmfLayer/ng_pdu_session_resource_release_response.h"
#include "../NgapSmfLayer/ng_pdu_session_resource_modify_request.h"
}
...
...
@@ -2390,6 +2392,7 @@ void smf_app::create_n2_sm_information(std::shared_ptr<itti_n11_create_sm_contex
make_NGAP_PduSessionResourceSetupResponse
(
""
,
""
);
make_NGAP_PduSessionResourceReleaseCommand
(
""
,
""
);
make_NGAP_PduSessionResourceReleaseResponse
(
""
,
""
);
make_NGAP_PduSessionResourceModifyRequest
(
""
,
""
);
//make_NGAP_PduSessionResourceReleaseCommand("", "");
...
...
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