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
5d4de8bd
Commit
5d4de8bd
authored
Oct 08, 2015
by
gauthier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch branch
parent
1f34bfa1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
11 deletions
+42
-11
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+4
-1
openair3/TEST/EPC_TEST/generate_scenario.c
openair3/TEST/EPC_TEST/generate_scenario.c
+38
-10
No files found.
cmake_targets/CMakeLists.txt
View file @
5d4de8bd
...
@@ -1332,6 +1332,9 @@ include(FindPkgConfig)
...
@@ -1332,6 +1332,9 @@ include(FindPkgConfig)
pkg_search_module
(
LIBXML2 libxml-2.0 REQUIRED
)
pkg_search_module
(
LIBXML2 libxml-2.0 REQUIRED
)
include_directories
(
${
LIBXML2_INCLUDE_DIRS
}
)
include_directories
(
${
LIBXML2_INCLUDE_DIRS
}
)
pkg_search_module
(
LIBXSLT libxslt REQUIRED
)
include_directories
(
${
LIBXSLT_INCLUDE_DIRS
}
)
pkg_search_module
(
OPENSSL openssl REQUIRED
)
pkg_search_module
(
OPENSSL openssl REQUIRED
)
include_directories
(
${
OPENSSL_INCLUDE_DIRS
}
)
include_directories
(
${
OPENSSL_INCLUDE_DIRS
}
)
...
@@ -1620,7 +1623,7 @@ add_executable(test_epc_generate_scenario
...
@@ -1620,7 +1623,7 @@ add_executable(test_epc_generate_scenario
${
OPENAIR_BIN_DIR
}
/messages_xml.h
${
OPENAIR_BIN_DIR
}
/messages_xml.h
)
)
target_link_libraries
(
test_epc_generate_scenario
target_link_libraries
(
test_epc_generate_scenario
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS
${
ITTI_LIB
}
${
MSC_LIB
}
L2 -Wl,--end-group pthread m rt crypt sctp
${
LIBXML2_LIBRARIES
}
${
CRYPTO_LIBRARIES
}
${
OPENSSL_LIBRARIES
}
${
NETTLE_LIBRARIES
}
${
CONFIG_LIBRARIES
}
-Wl,--start-group RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB GTPV1U LIB_NAS_UE SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS
${
ITTI_LIB
}
${
MSC_LIB
}
L2 -Wl,--end-group pthread m rt crypt sctp
${
LIBXML2_LIBRARIES
}
${
LIBXSLT_LIBRARIES
}
${
CRYPTO_LIBRARIES
}
${
OPENSSL_LIBRARIES
}
${
NETTLE_LIBRARIES
}
${
CONFIG_LIBRARIES
}
)
)
...
...
openair3/TEST/EPC_TEST/generate_scenario.c
View file @
5d4de8bd
...
@@ -43,15 +43,22 @@
...
@@ -43,15 +43,22 @@
#include <unistd.h>
#include <unistd.h>
#include <errno.h>
#include <errno.h>
#include <fcntl.h>
#include <fcntl.h>
#include <libxml/xmlmemory.h>
#include <libxml/debugXML.h>
#include <libxml/HTMLtree.h>
#include <libxml/xmlIO.h>
#include <libxml/DOCBparser.h>
#include <libxml/xinclude.h>
#include <libxml/catalog.h>
#include <libxslt/xslt.h>
#include <libxslt/xsltInternals.h>
#include <libxslt/transform.h>
#include <libxslt/xsltutils.h>
#include "assertions.h"
#include "assertions.h"
#include "generate_scenario.h"
#include "generate_scenario.h"
#include "s1ap_eNB.h"
#include "s1ap_eNB.h"
#if defined(ENABLE_ITTI)
#include "intertask_interface.h"
# include "intertask_interface.h"
#endif
#define ENB_CONFIG_STRING_ACTIVE_ENBS "Active_eNBs"
#define ENB_CONFIG_STRING_ACTIVE_ENBS "Active_eNBs"
...
@@ -85,23 +92,44 @@
...
@@ -85,23 +92,44 @@
#define ENB_CONFIG_PROPERTIES_INDEX_OLD 0
#define ENB_CONFIG_PROPERTIES_INDEX_OLD 0
#define ENB_CONFIG_PROPERTIES_INDEX_NEW 1
#define ENB_CONFIG_PROPERTIES_INDEX_NEW 1
#define ENB_CONFIG_MAX_XSLT_PARAMS 64
Enb_properties_array_t
g_enb_properties
[
2
];
Enb_properties_array_t
g_enb_properties
[
2
];
char
*
g_test_dir
=
"."
;
// default value
char
*
g_test_dir
=
"."
;
// default value
char
*
g_pdml_in_basename
=
"trace.pdml"
;
// default value
char
*
g_pdml_in_basename
=
"trace.pdml"
;
// default value
extern
int
xmlLoadExtDtdDefaultValue
;
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
generate_scenario
(
const
char
const
*
pdml_in_basenameP
)
void
generate_scenario
(
const
char
const
*
pdml_in_basenameP
)
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
{
{
int
fd_pdml_in
;
//int fd_pdml_in;
xsltStylesheetPtr
cur
=
NULL
;
xmlDocPtr
doc
,
res
;
const
char
*
params
[
ENB_CONFIG_MAX_XSLT_PARAMS
];
int
nb_params
=
0
;
if
(
chdir
(
g_test_dir
)
==
0
)
{
if
(
chdir
(
g_test_dir
)
==
0
)
{
printf
(
"working in %s directory
\n
"
,
g_test_dir
);
printf
(
"working in %s directory
\n
"
,
g_test_dir
);
fd_pdml_in
=
open
(
pdml_in_basenameP
,
O_RDONLY
);
/*
fd_pdml_in = open(pdml_in_basenameP, O_RDONLY);
AssertFatal (fd_pdml_in > 0,
AssertFatal (fd_pdml_in > 0,
"Error while opening %s file in directory %s\n",
"Error while opening %s file in directory %s\n",
pdml_in_basenameP,
pdml_in_basenameP,
g_test_dir
);
g_test_dir);*/
params
[
nb_params
]
=
NULL
;
xmlSubstituteEntitiesDefault
(
1
);
xmlLoadExtDtdDefaultValue
=
1
;
cur
=
xsltParseStylesheetFile
(
"enb_config.xsl"
);
doc
=
xmlParseFile
(
pdml_in_basenameP
);
res
=
xsltApplyStylesheet
(
cur
,
doc
,
params
);
xsltSaveResultToFile
(
stdout
,
res
,
cur
);
xsltFreeStylesheet
(
cur
);
xmlFreeDoc
(
res
);
xmlFreeDoc
(
doc
);
xsltCleanupGlobals
();
xmlCleanupParser
();
}
else
{
}
else
{
printf
(
"Error: chdir %s returned %s
\n
"
,
g_test_dir
,
strerror
(
errno
));
printf
(
"Error: chdir %s returned %s
\n
"
,
g_test_dir
,
strerror
(
errno
));
exit
(
-
1
);
exit
(
-
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