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
wangjie
OpenXG-RAN
Commits
7dd05df4
Commit
7dd05df4
authored
9 years ago
by
Xenofon Foukas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added configuration support for local cache
parent
02686ce8
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
1 deletion
+19
-1
openair2/ENB_APP/enb_agent.c
openair2/ENB_APP/enb_agent.c
+8
-0
openair2/ENB_APP/enb_agent_defs.h
openair2/ENB_APP/enb_agent_defs.h
+1
-0
openair2/ENB_APP/enb_agent_extern.h
openair2/ENB_APP/enb_agent_extern.h
+2
-0
openair2/ENB_APP/enb_config.c
openair2/ENB_APP/enb_config.c
+6
-1
openair2/ENB_APP/enb_config.h
openair2/ENB_APP/enb_config.h
+1
-0
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.agent.oaisim.local_no_mme.conf
...RIC-LTE-EPC/CONF/enb.band7.agent.oaisim.local_no_mme.conf
+1
-0
No files found.
openair2/ENB_APP/enb_agent.c
View file @
7dd05df4
...
@@ -52,6 +52,7 @@ enb_agent_instance_t enb_agent[NUM_MAX_ENB];
...
@@ -52,6 +52,7 @@ enb_agent_instance_t enb_agent[NUM_MAX_ENB];
char
in_ip
[
40
];
char
in_ip
[
40
];
static
uint16_t
in_port
;
static
uint16_t
in_port
;
char
local_cache
[
40
];
void
*
send_thread
(
void
*
args
);
void
*
send_thread
(
void
*
args
);
void
*
receive_thread
(
void
*
args
);
void
*
receive_thread
(
void
*
args
);
...
@@ -203,6 +204,13 @@ int enb_agent_start(mid_t mod_id, const Enb_properties_array_t* enb_properties){
...
@@ -203,6 +204,13 @@ int enb_agent_start(mid_t mod_id, const Enb_properties_array_t* enb_properties){
/*
/*
* check the configuration
* check the configuration
*/
*/
if
(
enb_properties
->
properties
[
mod_id
]
->
enb_agent_cache
!=
NULL
)
{
strncpy
(
local_cache
,
enb_properties
->
properties
[
mod_id
]
->
enb_agent_cache
,
sizeof
(
local_cache
));
local_cache
[
sizeof
(
local_cache
)
-
1
]
=
0
;
}
else
{
strcpy
(
local_cache
,
DEFAULT_ENB_AGENT_CACHE
);
}
if
(
enb_properties
->
properties
[
mod_id
]
->
enb_agent_ipv4_address
!=
NULL
)
{
if
(
enb_properties
->
properties
[
mod_id
]
->
enb_agent_ipv4_address
!=
NULL
)
{
strncpy
(
in_ip
,
enb_properties
->
properties
[
mod_id
]
->
enb_agent_ipv4_address
,
sizeof
(
in_ip
)
);
strncpy
(
in_ip
,
enb_properties
->
properties
[
mod_id
]
->
enb_agent_ipv4_address
,
sizeof
(
in_ip
)
);
in_ip
[
sizeof
(
in_ip
)
-
1
]
=
0
;
// terminate string
in_ip
[
sizeof
(
in_ip
)
-
1
]
=
0
;
// terminate string
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_agent_defs.h
View file @
7dd05df4
...
@@ -47,6 +47,7 @@
...
@@ -47,6 +47,7 @@
#define NUM_MAX_UE 2048
#define NUM_MAX_UE 2048
#define DEFAULT_ENB_AGENT_IPv4_ADDRESS "127.0.0.1"
#define DEFAULT_ENB_AGENT_IPv4_ADDRESS "127.0.0.1"
#define DEFAULT_ENB_AGENT_PORT 2210
#define DEFAULT_ENB_AGENT_PORT 2210
#define DEFAULT_ENB_AGENT_CACHE "/mnt/tmpfs"
typedef
enum
{
typedef
enum
{
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_agent_extern.h
View file @
7dd05df4
...
@@ -44,6 +44,8 @@
...
@@ -44,6 +44,8 @@
//extern msg_context_t shared_ctxt[NUM_MAX_ENB][ENB_AGENT_MAX];
//extern msg_context_t shared_ctxt[NUM_MAX_ENB][ENB_AGENT_MAX];
extern
char
local_cache
[
40
];
extern
AGENT_MAC_xface
*
agent_mac_xface
[
NUM_MAX_ENB
];
extern
AGENT_MAC_xface
*
agent_mac_xface
[
NUM_MAX_ENB
];
extern
unsigned
int
mac_agent_registered
[
NUM_MAX_ENB
];
extern
unsigned
int
mac_agent_registered
[
NUM_MAX_ENB
];
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_config.c
View file @
7dd05df4
...
@@ -174,6 +174,7 @@
...
@@ -174,6 +174,7 @@
#define ENB_CONFIG_STRING_ENB_AGENT_INTERFACE_NAME "ENB_AGENT_INTERFACE_NAME"
#define ENB_CONFIG_STRING_ENB_AGENT_INTERFACE_NAME "ENB_AGENT_INTERFACE_NAME"
#define ENB_CONFIG_STRING_ENB_AGENT_IPV4_ADDRESS "ENB_AGENT_IPV4_ADDRESS"
#define ENB_CONFIG_STRING_ENB_AGENT_IPV4_ADDRESS "ENB_AGENT_IPV4_ADDRESS"
#define ENB_CONFIG_STRING_ENB_AGENT_PORT "ENB_AGENT_PORT"
#define ENB_CONFIG_STRING_ENB_AGENT_PORT "ENB_AGENT_PORT"
#define ENB_CONFIG_STRING_ENB_AGENT_CACHE "ENB_AGENT_CACHE"
#define ENB_CONFIG_STRING_RRH_GW_CONFIG "rrh_gw_config"
#define ENB_CONFIG_STRING_RRH_GW_CONFIG "rrh_gw_config"
#define ENB_CONFIG_STRING_RRH_GW_LOCAL_IF_NAME "local_if_name"
#define ENB_CONFIG_STRING_RRH_GW_LOCAL_IF_NAME "local_if_name"
...
@@ -325,6 +326,7 @@ static void enb_config_display(void)
...
@@ -325,6 +326,7 @@ static void enb_config_display(void)
printf
(
"
\t
Interface name:
\t
%s:
\n
"
,
enb_properties
.
properties
[
i
]
->
enb_agent_interface_name
);
printf
(
"
\t
Interface name:
\t
%s:
\n
"
,
enb_properties
.
properties
[
i
]
->
enb_agent_interface_name
);
printf
(
"
\t
Interface IP Address:
\t
%s:
\n
"
,
enb_properties
.
properties
[
i
]
->
enb_agent_ipv4_address
);
printf
(
"
\t
Interface IP Address:
\t
%s:
\n
"
,
enb_properties
.
properties
[
i
]
->
enb_agent_ipv4_address
);
printf
(
"
\t
Interface PORT:
\t
%d:
\n\n
"
,
enb_properties
.
properties
[
i
]
->
enb_agent_port
);
printf
(
"
\t
Interface PORT:
\t
%d:
\n\n
"
,
enb_properties
.
properties
[
i
]
->
enb_agent_port
);
printf
(
"
\t
Cache directory:
\t
%s:
\n
"
,
enb_properties
.
properties
[
i
]
->
enb_agent_cache
);
#endif
#endif
...
@@ -641,6 +643,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
...
@@ -641,6 +643,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
char
*
enb_agent_interface_name
=
NULL
;
char
*
enb_agent_interface_name
=
NULL
;
char
*
enb_agent_ipv4_address
=
NULL
;
char
*
enb_agent_ipv4_address
=
NULL
;
libconfig_int
enb_agent_port
=
0
;
libconfig_int
enb_agent_port
=
0
;
char
*
enb_agent_cache
=
NULL
;
libconfig_int
otg_ue_id
=
0
;
libconfig_int
otg_ue_id
=
0
;
char
*
otg_app_type
=
NULL
;
char
*
otg_app_type
=
NULL
;
char
*
otg_bg_traffic
=
NULL
;
char
*
otg_bg_traffic
=
NULL
;
...
@@ -2363,6 +2366,8 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
...
@@ -2363,6 +2366,8 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
(
const
char
**
)
&
enb_agent_ipv4_address
)
(
const
char
**
)
&
enb_agent_ipv4_address
)
&&
config_setting_lookup_int
(
subsetting
,
ENB_CONFIG_STRING_ENB_AGENT_PORT
,
&&
config_setting_lookup_int
(
subsetting
,
ENB_CONFIG_STRING_ENB_AGENT_PORT
,
&
enb_agent_port
)
&
enb_agent_port
)
&&
config_setting_lookup_string
(
subsetting
,
ENB_CONFIG_STRING_ENB_AGENT_CACHE
,
(
const
char
**
)
&
enb_agent_cache
)
)
)
)
{
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
enb_agent_interface_name
=
strdup
(
enb_agent_interface_name
);
enb_properties
.
properties
[
enb_properties_index
]
->
enb_agent_interface_name
=
strdup
(
enb_agent_interface_name
);
...
@@ -2374,7 +2379,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
...
@@ -2374,7 +2379,7 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
}*/
}*/
enb_properties
.
properties
[
enb_properties_index
]
->
enb_agent_port
=
enb_agent_port
;
enb_properties
.
properties
[
enb_properties_index
]
->
enb_agent_port
=
enb_agent_port
;
enb_properties
.
properties
[
enb_properties_index
]
->
enb_agent_cache
=
strdup
(
enb_agent_cache
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_config.h
View file @
7dd05df4
...
@@ -224,6 +224,7 @@ typedef struct Enb_properties_s {
...
@@ -224,6 +224,7 @@ typedef struct Enb_properties_s {
char
*
enb_agent_interface_name
;
char
*
enb_agent_interface_name
;
in_addr_t
enb_agent_ipv4_address
;
in_addr_t
enb_agent_ipv4_address
;
tcp_udp_port_t
enb_agent_port
;
tcp_udp_port_t
enb_agent_port
;
char
*
enb_agent_cache
;
/* Nb of RRH to connect to */
/* Nb of RRH to connect to */
uint8_t
nb_rrh_gw
;
uint8_t
nb_rrh_gw
;
...
...
This diff is collapsed.
Click to expand it.
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.agent.oaisim.local_no_mme.conf
View file @
7dd05df4
...
@@ -123,6 +123,7 @@ eNBs =
...
@@ -123,6 +123,7 @@ eNBs =
ENB_AGENT_INTERFACE_NAME
=
"eth0"
;
ENB_AGENT_INTERFACE_NAME
=
"eth0"
;
ENB_AGENT_IPV4_ADDRESS
=
"127.0.0.1/24"
;
ENB_AGENT_IPV4_ADDRESS
=
"127.0.0.1/24"
;
ENB_AGENT_PORT
=
2210
;
ENB_AGENT_PORT
=
2210
;
ENB_AGENT_CACHE
=
"/mnt/tmpfs"
;
};
};
log_config
:
log_config
:
...
...
This diff is collapsed.
Click to expand it.
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