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
1
Merge Requests
1
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-RAN
Commits
a85be06c
Commit
a85be06c
authored
Sep 30, 2024
by
Guido Casati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add defines for IPv4 and IPv6 PDU address header fields
parent
2c07f008
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.c
openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.c
+4
-4
openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.h
openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.h
+4
-1
No files found.
openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.c
View file @
a85be06c
...
@@ -128,14 +128,14 @@ void capture_pdu_session_establishment_accept_msg(uint8_t *buffer, uint32_t msg_
...
@@ -128,14 +128,14 @@ void capture_pdu_session_establishment_accept_msg(uint8_t *buffer, uint32_t msg_
uint8_t
*
addr
=
psea_msg
.
pdu_addr_ie
.
pdu_addr_oct
;
uint8_t
*
addr
=
psea_msg
.
pdu_addr_ie
.
pdu_addr_oct
;
if
(
psea_msg
.
pdu_addr_ie
.
pdu_type
==
PDU_SESSION_TYPE_IPV4
)
{
if
(
psea_msg
.
pdu_addr_ie
.
pdu_type
==
PDU_SESSION_TYPE_IPV4
)
{
for
(
int
i
=
0
;
i
<
4
;
++
i
)
for
(
int
i
=
0
;
i
<
IPv4_ADDRESS_LENGTH
;
++
i
)
addr
[
i
]
=
*
curPtr
++
;
addr
[
i
]
=
*
curPtr
++
;
char
ip
[
20
];
char
ip
[
20
];
capture_ipv4_addr
(
&
addr
[
0
],
ip
,
sizeof
(
ip
));
capture_ipv4_addr
(
&
addr
[
0
],
ip
,
sizeof
(
ip
));
tun_config
(
1
,
ip
,
NULL
,
"oaitun_ue"
);
tun_config
(
1
,
ip
,
NULL
,
"oaitun_ue"
);
setup_ue_ipv4_route
(
1
,
ip
,
"oaitun_ue"
);
setup_ue_ipv4_route
(
1
,
ip
,
"oaitun_ue"
);
}
else
if
(
psea_msg
.
pdu_addr_ie
.
pdu_type
==
PDU_SESSION_TYPE_IPV6
)
{
}
else
if
(
psea_msg
.
pdu_addr_ie
.
pdu_type
==
PDU_SESSION_TYPE_IPV6
)
{
for
(
int
i
=
0
;
i
<
8
;
++
i
)
for
(
int
i
=
0
;
i
<
IPv6_INTERFACE_ID_LENGTH
;
++
i
)
addr
[
i
]
=
*
curPtr
++
;
addr
[
i
]
=
*
curPtr
++
;
char
ipv6
[
40
];
char
ipv6
[
40
];
capture_ipv6_addr
(
addr
,
ipv6
,
sizeof
(
ipv6
));
capture_ipv6_addr
(
addr
,
ipv6
,
sizeof
(
ipv6
));
...
@@ -145,12 +145,12 @@ void capture_pdu_session_establishment_accept_msg(uint8_t *buffer, uint32_t msg_
...
@@ -145,12 +145,12 @@ void capture_pdu_session_establishment_accept_msg(uint8_t *buffer, uint32_t msg_
// IPv4v6, the PDU address information in octet 4 to octet 11
// IPv4v6, the PDU address information in octet 4 to octet 11
// contains an interface identifier for the IPv6 link local address
// contains an interface identifier for the IPv6 link local address
// and in octet 12 to octet 15 contains an IPv4 address."
// and in octet 12 to octet 15 contains an IPv4 address."
for
(
int
i
=
0
;
i
<
12
;
++
i
)
for
(
int
i
=
0
;
i
<
IPv4_ADDRESS_LENGTH
+
IPv6_INTERFACE_ID_LENGTH
;
++
i
)
addr
[
i
]
=
*
curPtr
++
;
addr
[
i
]
=
*
curPtr
++
;
char
ipv6
[
40
];
char
ipv6
[
40
];
capture_ipv6_addr
(
addr
,
ipv6
,
sizeof
(
ipv6
));
capture_ipv6_addr
(
addr
,
ipv6
,
sizeof
(
ipv6
));
char
ipv4
[
20
];
char
ipv4
[
20
];
capture_ipv4_addr
(
&
addr
[
8
],
ipv4
,
sizeof
(
ipv4
));
capture_ipv4_addr
(
&
addr
[
IPv6_INTERFACE_ID_LENGTH
],
ipv4
,
sizeof
(
ipv4
));
tun_config
(
1
,
ipv4
,
ipv6
,
"oaitun_ue"
);
tun_config
(
1
,
ipv4
,
ipv6
,
"oaitun_ue"
);
setup_ue_ipv4_route
(
1
,
ipv4
,
"oaitun_ue"
);
setup_ue_ipv4_route
(
1
,
ipv4
,
"oaitun_ue"
);
}
else
{
}
else
{
...
...
openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.h
View file @
a85be06c
...
@@ -42,6 +42,8 @@
...
@@ -42,6 +42,8 @@
#define PDU_SESSION_TYPE_IPV4 0b001
#define PDU_SESSION_TYPE_IPV4 0b001
#define PDU_SESSION_TYPE_IPV6 0b010
#define PDU_SESSION_TYPE_IPV6 0b010
#define PDU_SESSION_TYPE_IPV4V6 0b011
#define PDU_SESSION_TYPE_IPV4V6 0b011
#define IPv4_ADDRESS_LENGTH 4 // length of the IPv4 address associated with a PDU session
#define IPv6_INTERFACE_ID_LENGTH 8 // interface identifier for the IPv6 link local address
/* Rule operation codes - TS 24.501 Table 9.11.4.13.1 */
/* Rule operation codes - TS 24.501 Table 9.11.4.13.1 */
...
@@ -114,7 +116,8 @@ typedef struct pdu_address_s {
...
@@ -114,7 +116,8 @@ typedef struct pdu_address_s {
uint8_t
pdu_iei
;
/* PDU Address IEI (0x29) */
uint8_t
pdu_iei
;
/* PDU Address IEI (0x29) */
uint8_t
pdu_length
;
/* Length of PDU address contents */
uint8_t
pdu_length
;
/* Length of PDU address contents */
uint8_t
pdu_type
;
/* PDU session type value */
uint8_t
pdu_type
;
/* PDU session type value */
uint8_t
pdu_addr_oct
[
12
];
/* PDU address information (depending on type, up to 12 bytes)*/
/// PDU address information (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 */
}
pdu_address_t
;
/* TS 24.501 9.11.4.10 */
typedef
struct
dnn_s
{
typedef
struct
dnn_s
{
...
...
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