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
littleBu
OpenXG-RAN
Commits
0fd0a4fc
Commit
0fd0a4fc
authored
Sep 30, 2024
by
Guido Casati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NAS: Minor comments and logs
parent
8215aa60
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.c
openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.c
+8
-0
openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.h
openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.h
+7
-4
openair3/NAS/NR_UE/nr_nas_msg.h
openair3/NAS/NR_UE/nr_nas_msg.h
+1
-0
No files found.
openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.c
View file @
0fd0a4fc
...
...
@@ -56,12 +56,17 @@ static int capture_ipv6_addr(const uint8_t *addr, char *ip, size_t len)
addr
[
7
]);
}
/**
* @brief PDU session establishment accept (8.3.2 of 3GPP TS 24.501)
* network to UE
*/
void
capture_pdu_session_establishment_accept_msg
(
uint8_t
*
buffer
,
uint32_t
msg_length
)
{
security_protected_nas_5gs_msg_t
sec_nas_hdr
;
security_protected_plain_nas_5gs_msg_t
sec_nas_msg
;
pdu_session_establishment_accept_msg_t
psea_msg
;
uint8_t
*
curPtr
=
buffer
;
// Security protected NAS header (7 bytes)
sec_nas_hdr
.
epd
=
*
curPtr
++
;
sec_nas_hdr
.
sht
=
*
curPtr
++
;
uint32_t
tmp
;
...
...
@@ -69,6 +74,7 @@ void capture_pdu_session_establishment_accept_msg(uint8_t *buffer, uint32_t msg_
sec_nas_hdr
.
mac
=
htonl
(
tmp
);
curPtr
+=
sizeof
(
sec_nas_hdr
.
mac
);
sec_nas_hdr
.
sqn
=
*
curPtr
++
;
// Security protected plain NAS message
sec_nas_msg
.
epd
=
*
curPtr
++
;
sec_nas_msg
.
sht
=
*
curPtr
++
;
sec_nas_msg
.
msg_type
=
*
curPtr
++
;
...
...
@@ -144,6 +150,8 @@ void capture_pdu_session_establishment_accept_msg(uint8_t *buffer, uint32_t msg_
capture_ipv4_addr
(
&
addr
[
0
],
ip
,
sizeof
(
ip
));
tun_config
(
1
,
ip
,
NULL
,
"oaitun_ue"
);
setup_ue_ipv4_route
(
1
,
ip
,
"oaitun_ue"
);
LOG_I
(
NAS
,
"Received PDU Session Establishment Accept, UE IP: %u.%u.%u.%u
\n
"
,
addr
[
0
],
addr
[
1
],
addr
[
2
],
addr
[
3
]);
}
else
if
(
psea_msg
.
pdu_addr_ie
.
pdu_type
==
PDU_SESSION_TYPE_IPV6
)
{
for
(
int
i
=
0
;
i
<
IPv6_INTERFACE_ID_LENGTH
;
++
i
)
addr
[
i
]
=
*
curPtr
++
;
...
...
openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.h
View file @
0fd0a4fc
...
...
@@ -120,10 +120,13 @@ typedef struct session_ambr_s {
/* Optional Presence IE - TS 24.501 Table 8.3.2.1.1 */
typedef
struct
pdu_address_s
{
uint8_t
pdu_iei
;
/* PDU Address IEI (0x29) */
uint8_t
pdu_length
;
/* Length of PDU address contents */
uint8_t
pdu_type
;
/* PDU session type value */
/// PDU address information (depending on type, up to 12 bytes)
// PDU address IEI (0x29) (octet 1)
uint8_t
pdu_iei
;
// Length of PDU address contents (octet 2)
uint8_t
pdu_length
;
// PDU session type value (9.11.4.11 of TS 24.501)
uint8_t
pdu_type
;
// PDU address IE (depending on type, up to 12 bytes)
uint8_t
pdu_addr_oct
[
IPv4_ADDRESS_LENGTH
+
IPv6_INTERFACE_ID_LENGTH
];
}
pdu_address_t
;
/* TS 24.501 9.11.4.10 */
...
...
openair3/NAS/NR_UE/nr_nas_msg.h
View file @
0fd0a4fc
...
...
@@ -23,6 +23,7 @@
* \brief simulator for nr nas message
* \author Yoshio INOUE, Masayuki HARADA
* \email yoshio.inoue@fujitsu.com,masayuki.harada@fujitsu.com
* \protocol 5GS (5GMM and 5GSM)
* \date 2020
* \version 0.1
*/
...
...
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