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
lizhongxiao
OpenXG-RAN
Commits
219b5bc9
Commit
219b5bc9
authored
Feb 12, 2018
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make FlexRAN Agent activation configurable
parent
adec4e39
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
10 deletions
+17
-10
openair2/ENB_APP/enb_config.c
openair2/ENB_APP/enb_config.c
+2
-5
openair2/ENB_APP/enb_paramdef.h
openair2/ENB_APP/enb_paramdef.h
+8
-5
openair2/ENB_APP/flexran_agent.c
openair2/ENB_APP/flexran_agent.c
+6
-0
openair2/ENB_APP/flexran_agent_defs.h
openair2/ENB_APP/flexran_agent_defs.h
+1
-0
No files found.
openair2/ENB_APP/enb_config.c
View file @
219b5bc9
...
...
@@ -119,19 +119,16 @@ void RCconfig_flexran()
AssertFatal
(
RC
.
flexran
[
i
]
!=
NULL
,
"can't ALLOCATE %zu Bytes for flexran agent info (iteration %d/%d)
\n
"
,
sizeof
(
flexran_agent_info_t
),
i
+
1
,
RC
.
nb_L1_inst
);
/* if config says "yes", enable Agent, in all other cases it's like "no" */
RC
.
flexran
[
i
]
->
enabled
=
strcmp
(
*
(
flexranParams
[
FLEXRAN_ENABLED
].
strptr
),
"yes"
)
==
0
;
RC
.
flexran
[
i
]
->
interface_name
=
strdup
(
*
(
flexranParams
[
FLEXRAN_INTERFACE_NAME_IDX
].
strptr
));
//inet_ntop(AF_INET, &(enb_properties->properties[mod_id]->flexran_agent_ipv4_address), in_ip, INET_ADDRSTRLEN);
//strcpy(in_ip, DEFAULT_FLEXRAN_AGENT_IPv4_ADDRESS );
RC
.
flexran
[
i
]
->
remote_ipv4_addr
=
strdup
(
*
(
flexranParams
[
FLEXRAN_IPV4_ADDRESS_IDX
].
strptr
));
// DEFAULT_FLEXRAN_AGENT_PORT
RC
.
flexran
[
i
]
->
remote_port
=
*
(
flexranParams
[
FLEXRAN_PORT_IDX
].
uptr
);
// DEFAULT_FLEXRAN_AGENT_CACHE
RC
.
flexran
[
i
]
->
cache_name
=
strdup
(
*
(
flexranParams
[
FLEXRAN_CACHE_IDX
].
strptr
));
RC
.
flexran
[
i
]
->
node_ctrl_state
=
strcmp
(
*
(
flexranParams
[
FLEXRAN_AWAIT_RECONF_IDX
].
strptr
),
"yes"
)
==
0
?
ENB_WAIT
:
ENB_NORMAL_OPERATION
;
RC
.
flexran
[
i
]
->
enb_id
=
i
;
}
/* TODO: show FlexRAN config now? */
}
void
RCconfig_L1
(
void
)
{
...
...
openair2/ENB_APP/enb_paramdef.h
View file @
219b5bc9
...
...
@@ -613,19 +613,22 @@ static int DEFENBS[] = {0};
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
#define CONFIG_STRING_NETWORK_CONTROLLER_CONFIG "NETWORK_CONTROLLER"
#define CONFIG_STRING_FLEXRAN_ENABLED "FLEXRAN_ENABLED"
#define CONFIG_STRING_FLEXRAN_INTERFACE_NAME "FLEXRAN_INTERFACE_NAME"
#define CONFIG_STRING_FLEXRAN_IPV4_ADDRESS "FLEXRAN_IPV4_ADDRESS"
#define CONFIG_STRING_FLEXRAN_PORT "FLEXRAN_PORT"
#define CONFIG_STRING_FLEXRAN_CACHE "FLEXRAN_CACHE"
#define CONFIG_STRING_FLEXRAN_AWAIT_RECONF "FLEXRAN_AWAIT_RECONF"
#define FLEXRAN_INTERFACE_NAME_IDX 0
#define FLEXRAN_IPV4_ADDRESS_IDX 1
#define FLEXRAN_PORT_IDX 2
#define FLEXRAN_CACHE_IDX 3
#define FLEXRAN_AWAIT_RECONF_IDX 4
#define FLEXRAN_ENABLED 0
#define FLEXRAN_INTERFACE_NAME_IDX 1
#define FLEXRAN_IPV4_ADDRESS_IDX 2
#define FLEXRAN_PORT_IDX 3
#define FLEXRAN_CACHE_IDX 4
#define FLEXRAN_AWAIT_RECONF_IDX 5
#define FLEXRANPARAMS_DESC { \
{CONFIG_STRING_FLEXRAN_ENABLED, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
{CONFIG_STRING_FLEXRAN_INTERFACE_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \
{CONFIG_STRING_FLEXRAN_IPV4_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
{CONFIG_STRING_FLEXRAN_PORT, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
...
...
openair2/ENB_APP/flexran_agent.c
View file @
219b5bc9
...
...
@@ -184,6 +184,12 @@ int flexran_agent_start(mid_t mod_id)
int
channel_id
;
char
*
in_ip
=
flexran
->
remote_ipv4_addr
;
uint16_t
in_port
=
flexran
->
remote_port
;
/* if this agent is disabled, return and don't do anything */
if
(
!
flexran
->
enabled
)
{
LOG_I
(
FLEXRAN_AGENT
,
"FlexRAN Agent for eNB %d is DISABLED
\n
"
,
mod_id
);
return
100
;
}
flexran
->
enb_id
=
mod_id
;
/* assume for the moment the monolithic case, i.e. agent can provide
...
...
openair2/ENB_APP/flexran_agent_defs.h
View file @
219b5bc9
...
...
@@ -153,6 +153,7 @@ typedef enum {
typedef
struct
{
/* general info */
int
enabled
;
char
*
interface_name
;
char
*
remote_ipv4_addr
;
uint16_t
remote_port
;
...
...
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