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
35e81d8a
Commit
35e81d8a
authored
Oct 23, 2018
by
Y_Tomita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add virtual NIC setting for L2 FAPI simulator.
parent
31d6783d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
openair3/NAS/UE/ESM/esm_ebr_context.c
openair3/NAS/UE/ESM/esm_ebr_context.c
+17
-1
No files found.
openair3/NAS/UE/ESM/esm_ebr_context.c
100644 → 100755
View file @
35e81d8a
...
...
@@ -58,6 +58,7 @@ Description Defines functions used to handle EPS bearer contexts.
#include <netinet/in.h>
#include <arpa/inet.h>
extern
uint8_t
nfapi_mode
;
/****************************************************************************/
/**************** E X T E R N A L D E F I N I T I O N S ****************/
...
...
@@ -272,7 +273,21 @@ int esm_ebr_context_create(
strcpy
(
broadcast
,
ipv4_addr
);
}
res
=
sprintf
(
command_line
,
if
(
nfapi_mode
==
3
){
// this is for L2 FAPI simulator.
// change for multiple UE's like 256UEs.
// if it's made too many tables , OS may crush so we use one table.
res
=
sprintf
(
command_line
,
"ifconfig oip%d %s netmask %s broadcast %s up && "
"ip rule add from %s/24 table %d && "
"ip rule add to %s/24 table %d && "
"ip route add default dev oip%d table %d && "
ueid
+
1
,
ipv4_addr
,
netmask
,
broadcast
,
ipv4_addr
,
201
,
ipv4_addr
,
201
,
ueid
+
1
,
201
,
ueid
+
1
);
}
else
{
res
=
sprintf
(
command_line
,
"ifconfig oip%d %s netmask %s broadcast %s up && "
"ip rule add from %s/32 table %d && "
"ip rule add to %s/32 table %d && "
...
...
@@ -281,6 +296,7 @@ int esm_ebr_context_create(
ipv4_addr
,
ueid
+
201
,
ipv4_addr
,
ueid
+
201
,
ueid
+
1
,
ueid
+
201
);
}
if
(
res
<
0
)
{
LOG_TRACE
(
WARNING
,
"ESM-PROC - Failed to system command string"
);
}
...
...
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