Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
612d5878
Commit
612d5878
authored
Dec 15, 2015
by
gauthier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed from this repo epc xsl files, commiting for sync
parent
0397ba15
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
557 additions
and
568 deletions
+557
-568
cmake_targets/tools/build_helper
cmake_targets/tools/build_helper
+178
-1
cmake_targets/tools/build_test_epc_tools
cmake_targets/tools/build_test_epc_tools
+0
-1
openair3/TEST/EPC_TEST/generate_scenario.c
openair3/TEST/EPC_TEST/generate_scenario.c
+3
-14
openair3/TEST/EPC_TEST/generic_scenario.xsl
openair3/TEST/EPC_TEST/generic_scenario.xsl
+0
-312
openair3/TEST/EPC_TEST/mme_test_s1_pcap2pdml
openair3/TEST/EPC_TEST/mme_test_s1_pcap2pdml
+0
-104
openair3/TEST/EPC_TEST/play_scenario.c
openair3/TEST/EPC_TEST/play_scenario.c
+0
-6
openair3/TEST/EPC_TEST/play_scenario.h
openair3/TEST/EPC_TEST/play_scenario.h
+2
-1
openair3/TEST/EPC_TEST/play_scenario.xsl
openair3/TEST/EPC_TEST/play_scenario.xsl
+0
-113
openair3/TEST/EPC_TEST/play_scenario_parse.c
openair3/TEST/EPC_TEST/play_scenario_parse.c
+6
-7
openair3/TEST/EPC_TEST/play_scenario_s1ap.c
openair3/TEST/EPC_TEST/play_scenario_s1ap.c
+11
-3
openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c
openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c
+351
-0
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf
...ENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf
+6
-6
No files found.
cmake_targets/tools/build_helper
View file @
612d5878
...
...
@@ -30,7 +30,7 @@
################################################################################
# file build_helper
# brief
# author
Laurent Thomas
# author
s Laurent Thomas, Lionel GAUTHIER
#
#######################################
SUDO='sudo -E'
...
...
@@ -301,6 +301,183 @@ install_nas_tools() {
fi
}
#################################################
# 3. Network interfaces utilities
################################################
cidr2mask(){
local i mask=""
local full_octets=$(($1/8))
local partial_octet=$(($1%8))
for ((i=0;i<4;i+=1)); do
if [ $i -lt $full_octets ]; then
mask+=255
elif [ $i -eq $full_octets ]; then
mask+=$((256 - 2**(8-$partial_octet)))
else
mask+=0
fi
test $i -lt 3 && mask+=.
done
echo $mask
}
# example: netcalc 192.168.12.100 255.255.255.0
netcalc(){
local IFS='.' ip i
local -a oct msk
read -ra oct <<<"$1"
read -ra msk <<<"$2"
for i in ${!oct[@]}; do
ip+=( "$(( oct[i] & msk[i] ))" )
done
echo "${ip[*]}"
}
# example:
bcastcalc(){
local IFS='.' ip i
local -a oct msk
read -ra oct <<<"$1"
read -ra msk <<<"$2"
for i in ${!oct[@]}; do
ip+=( "$(( oct[i] + ( 255 - ( oct[i] | msk[i] ) ) ))" )
done
echo "${ip[*]}"
}
is_real_interface(){
my_bool=1
for var in "$@"
do
if [ "a$var" == "a" ]; then
return 0
fi
if [ "a$var" == "anone" ]; then
return 0
fi
IF=`cat /etc/udev/rules.d/70-persistent-net.rules | grep $var | sed 's/^.*NAME=//' | tr -d '"'`
if [ "$IF" == "$var" ]; then
if [ "a${var:0:3}" != "aeth" ]; then
if [ "a${var:0:4}" != "awlan" ]; then
if [ "a${var:0:4}" != "awifi" ]; then
my_bool=0;
fi
fi
fi
fi
done
return $my_bool
}
is_virtual_interface(){
my_bool=1
for var in "$@"
do
if [ "a$var" == "a" ]; then
return 0
fi
if [ "a$var" == "anone" ]; then
return 0
fi
num=`expr index "$var" :`
if [ $num -eq 0 ]; then
my_bool=0;
fi
done
return $my_bool
}
# arg1 = interface name
# arg2 = ipv4 addr cidr
set_interface_up(){
interface=$1
address=${2%/*} #part before '/'
cidr_netmask=${2#*/} # part after '/'
if [ "a${interface:0:4}" == "anone" ]; then
return;
fi
echo "ifconfig $interface up"
$SUDO ifconfig $interface up
sync
netmask=`cidr2mask $cidr_netmask`
broadcast=`bcastcalc $address $netmask`
echo "ip -4 addr add $address/$cidr_netmask broadcast $broadcast dev $interface"
$SUDO ip -4 addr add $address/$cidr_netmask broadcast $broadcast dev $interface
sync
}
# arg1 = interface name
# arg2 = ipv4 addr cidr
set_virtual_interface_up(){
interface=$1
address=${2%/*} #part before '/'
cidr_netmask=${2#*/} # part after '/'
if [ "a${interface:0:4}" == "anone" ]; then
return;
fi
$SUDO ifconfig $interface down > /dev/null 2>&1
sync
echo "ifconfig $interface $address up"
$SUDO ifconfig $interface $address up
sync
}
#arg1 is interface name
#arg2 is IP address (CIDR)
set_network_interface(){
local interface_name=$1
local ip_cidr=$2
is_virtual_interface $interface_name
if [ $? -eq 1 ]; then
echo "$interface_name is virtual interface"
set_virtual_interface_up $interface_name $ip_cidr
else
is_real_interface $interface_name
if [ $? -eq 1 ]; then
echo "$interface_name is real interface"
set_interface_up $interface_name $ip_cidr
else
echo_warning "$interface_name not handled, not configuring it"
return
fi
fi
}
# arg1 is a 'libconfig-like' config file
set_epc_network_interfaces(){
value="`cat $1 | cut -d "#" -f1 | grep 'ADDRESS\|INTERFACE' | tr -d " " | grep "="`"
eval $value
# check all var names are correct
list_var_name="\
ENB_INTERFACE_NAME_FOR_S1_MME ENB_IPV4_ADDRESS_FOR_S1_MME \
ENB_INTERFACE_NAME_FOR_S1U ENB_IPV4_ADDRESS_FOR_S1U "
for var_name in $list_var_name
do
if [ -n "$${var_name}" ]; then
echo_success "Found ${var_name} = ${!var_name}"
else
echo_fatal "${var_name} does does not exist in your config file $1"
fi
done
# configure interfaces
set_network_interface $ENB_INTERFACE_NAME_FOR_S1_MME $ENB_IPV4_ADDRESS_FOR_S1_MME
set_network_interface $ENB_INTERFACE_NAME_FOR_S1U $ENB_IPV4_ADDRESS_FOR_S1U
}
...
...
cmake_targets/tools/build_test_epc_tools
View file @
612d5878
...
...
@@ -148,7 +148,6 @@ function main()
$SUDO
cp
-upv
test_epc_generate_scenario /usr/local/bin
$SUDO
cp
-upv
test_epc_play_scenario /usr/local/bin
$SUDO
cp
-upv
$OPENAIR_DIR
/openair3/TEST/EPC_TEST/mme_test_s1_pcap2pdml /usr/local/bin
}
...
...
openair3/TEST/EPC_TEST/generate_scenario.c
View file @
612d5878
...
...
@@ -97,7 +97,6 @@
#define ENB_CONFIG_MAX_XSLT_PARAMS 32
Enb_properties_array_t
g_enb_properties
;
char
*
g_openair_dir
=
NULL
;
char
*
g_test_dir
=
NULL
;
char
*
g_pdml_in_origin
=
NULL
;
extern
int
xmlLoadExtDtdDefaultValue
;
...
...
@@ -195,17 +194,13 @@ int generate_test_scenario(const char const * test_nameP, const char const * pdm
exit
(
1
);
}
memset
(
astring
,
0
,
sizeof
(
astring
));
strcat
(
astring
,
g_openair_dir
);
strcat
(
astring
,
"/openair3/TEST/EPC_TEST/generic_scenario.xsl"
);
xmlSubstituteEntitiesDefault
(
1
);
xmlLoadExtDtdDefaultValue
=
1
;
cur
=
xsltParseStylesheetFile
(
astring
);
cur
=
xsltParseStylesheetFile
(
"/usr/share/oai/xsl/generic_scenario.xsl"
);
if
(
NULL
==
cur
)
{
AssertFatal
(
0
,
"Could not parse stylesheet file
%s (check OPENAIR_DIR env variable)!
\n
"
,
astring
);
AssertFatal
(
0
,
"Could not parse stylesheet file
/usr/share/oai/xsl/generic_scenario.xsl!
\n
"
);
}
else
{
fprintf
(
stdout
,
"XSLT style sheet:
%s
\n
"
,
astring
);
fprintf
(
stdout
,
"XSLT style sheet:
/usr/share/oai/xsl/generic_scenario.xsl
\n
"
);
}
doc
=
xmlParseFile
(
pdml_in_basenameP
);
...
...
@@ -686,12 +681,6 @@ int main( int argc, char **argv )
{
int
actions
=
0
;
g_openair_dir
=
getenv
(
"OPENAIR_DIR"
);
if
(
NULL
==
g_openair_dir
)
{
fprintf
(
stderr
,
"Error: Could not get OPENAIR_DIR environment variable
\n
"
);
exit
(
1
);
}
memset
((
char
*
)
&
g_enb_properties
,
0
,
sizeof
(
g_enb_properties
));
actions
=
config_parse_opt_line
(
argc
,
argv
);
//Command-line options
...
...
openair3/TEST/EPC_TEST/generic_scenario.xsl
deleted
100644 → 0
View file @
0397ba15
This diff is collapsed.
Click to expand it.
openair3/TEST/EPC_TEST/mme_test_s1_pcap2pdml
deleted
100755 → 0
View file @
0397ba15
#!/usr/bin/python
# -*- coding: utf-8 -*-
import
sys
import
subprocess
import
re
import
socket
import
datetime
from
datetime
import
date
import
os
,
errno
import
argparse
import
tempfile
from
lxml
import
etree
from
xml.dom.minidom
import
parse
,
parseString
#####################
# program arguments
#####################
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"--pcap_file"
,
"-p"
,
type
=
str
,
help
=
"input pcap file to be translated"
)
args
=
parser
.
parse_args
()
#####################
# get xml document from pcap
#####################
orig_pcap_file_name
=
args
.
pcap_file
.
strip
()
orig_pdml_string
=
subprocess
.
check_output
([
"tshark"
,
'-T'
,
'pdml'
,
'-r'
,
orig_pcap_file_name
])
orig_dom
=
parseString
(
orig_pdml_string
)
#####################
# filtering unwanted packets
#####################
#cases = orig_etree.findall(".//proto[@name='sctp']")
packets
=
orig_dom
.
getElementsByTagName
(
"packet"
)
for
packet
in
packets
:
found_sctp
=
False
found_s1ap
=
False
sctp_node
=
None
frame_node
=
None
ip_node
=
None
protos
=
packet
.
getElementsByTagName
(
"proto"
)
for
proto
in
protos
:
attrs
=
proto
.
attributes
urlnode
=
attrs
[
'name'
]
if
urlnode
.
nodeValue
==
'frame'
:
frame_node
=
proto
elif
urlnode
.
nodeValue
==
'ip'
:
frame_node
.
appendChild
(
proto
)
ip_node
=
proto
elif
urlnode
.
nodeValue
==
'sctp'
:
found_sctp
=
True
ip_node
.
appendChild
(
proto
)
sctp_node
=
proto
elif
urlnode
.
nodeValue
==
's1ap'
:
found_s1ap
=
True
sctp_node
.
appendChild
(
proto
)
elif
urlnode
.
nodeValue
==
'geninfo'
:
packet
.
removeChild
(
proto
)
elif
urlnode
.
nodeValue
==
'eth'
:
packet
.
removeChild
(
proto
)
if
found_sctp
==
False
:
# hopefully it seems to work (remove iterated packet)
packet
.
parentNode
.
removeChild
(
packet
)
#####################
# dom to xml string
#####################
filtered_pdml_string
=
orig_dom
.
toprettyxml
(
indent
=
" "
)
cleaned_pdml_string
=
""
#####################
# remove blank lines in xml string
#####################
lines
=
filtered_pdml_string
.
splitlines
()
for
line
in
lines
:
if
len
(
line
.
strip
()):
if
line
[:
-
1
]:
cleaned_pdml_string
+=
line
+
'
\r\n
'
#print "'%s'" % cleaned_pdml_string
#####################
# write pdml string to pdml file
#####################
out_pdml_file_name
=
os
.
path
.
dirname
(
orig_pcap_file_name
)
+
'/'
+
os
.
path
.
splitext
(
os
.
path
.
basename
(
orig_pcap_file_name
))[
0
]
+
'.pdml'
out_file
=
open
(
out_pdml_file_name
,
"w"
)
out_file
.
write
(
cleaned_pdml_string
)
out_file
.
close
()
############################################################
# DECEIVING HTML BONUS: DO NOT SEEM TO WORK CORRECTLY IN FIREFOX
# DID NOT INVESTIGATE
#####################
# write xml string to html file
#####################
xsl_root
=
etree
.
fromstring
(
open
(
'/usr/share/wireshark/pdml2html.xsl'
).
read
())
transform
=
etree
.
XSLT
(
xsl_root
)
xml_root
=
etree
.
fromstring
(
cleaned_pdml_string
)
trans_root
=
transform
(
xml_root
)
filtered_html_string
=
etree
.
tostring
(
trans_root
)
#####################
# write html string to html file
#####################
out_html_file_name
=
os
.
path
.
dirname
(
orig_pcap_file_name
)
+
'/'
+
os
.
path
.
splitext
(
os
.
path
.
basename
(
orig_pcap_file_name
))[
0
]
+
'.html'
out_file
=
open
(
out_html_file_name
,
"w"
)
out_file
.
write
(
filtered_html_string
)
out_file
.
close
()
openair3/TEST/EPC_TEST/play_scenario.c
View file @
612d5878
...
...
@@ -68,7 +68,6 @@
#define GS_IS_FILE 1
#define GS_IS_DIR 2
//------------------------------------------------------------------------------
char
*
g_openair_dir
=
NULL
;
Enb_properties_array_t
g_enb_properties
;
//------------------------------------------------------------------------------
extern
et_scenario_t
*
g_scenario
;
...
...
@@ -936,11 +935,6 @@ int main( int argc, char **argv )
char
play_scenario_filename
[
NAME_MAX
];
memset
(
play_scenario_filename
,
0
,
sizeof
(
play_scenario_filename
));
g_openair_dir
=
getenv
(
"OPENAIR_DIR"
);
if
(
NULL
==
g_openair_dir
)
{
fprintf
(
stderr
,
"ERROR: Could not get OPENAIR_DIR environment variable
\n
"
);
exit
(
1
);
}
// logging
logInit
();
...
...
openair3/TEST/EPC_TEST/play_scenario.h
View file @
612d5878
...
...
@@ -252,6 +252,7 @@ typedef struct et_s1ap_s {
uint16_t
binary_stream_allocated_size
;
uint8_t
*
binary_stream
;
s1ap_message
message
;
// decoded message: information elements
xmlNodePtr
xml_node
;
// XML representation of the S1AP PDU
}
et_s1ap_t
;
...
...
@@ -418,7 +419,7 @@ void et_s1ap_eNB_insert_new_instance(s1ap_eNB_instance_t *new_instance_p);
struct
s1ap_eNB_mme_data_s
*
et_s1ap_eNB_get_MME
(
s1ap_eNB_instance_t
*
instance_p
,
int32_t
assoc_id
,
uint16_t
cnx_id
);
s1ap_eNB_instance_t
*
et_s1ap_eNB_get_instance
(
instance_t
instance
);
void
et_s1ap_eNB_itti_send_sctp_data_req
(
instance_t
instance
,
int32_t
assoc_id
,
uint8_t
*
buffer
,
uint32_t
buffer_length
,
uint16_t
stream
);
int
et_handle_s1ap_mismatch
(
et_packet_t
*
const
spacket
,
et_packet_t
*
const
rx_packet
);
int
et_handle_s1ap_mismatch
_mme_ue_s1ap_id
(
et_packet_t
*
const
spacket
,
et_packet_t
*
const
rx_packet
);
asn_comp_rval_t
*
et_s1ap_is_matching
(
et_s1ap_t
*
const
s1ap1
,
et_s1ap_t
*
const
s1ap2
,
const
uint32_t
constraints
);
et_packet_t
*
et_build_packet_from_s1ap_data_ind
(
et_event_s1ap_data_ind_t
*
const
s1ap_data_ind
);
int
et_scenario_set_packet_received
(
et_packet_t
*
const
packet
);
...
...
openair3/TEST/EPC_TEST/play_scenario.xsl
deleted
100644 → 0
View file @
0397ba15
<xsl:stylesheet
version=
"1.0"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns=
"http://www.w3.org/TR/xhtml1/strict"
>
<xsl:output
method=
"xml"
indent=
"yes"
encoding=
"iso-8859-1"
/>
<!-- Ugly but no time to find a better way in XSLT 1.0 (map/list)-->
<xsl:param
name=
"enb0_s1c"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"enb1_s1c"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"enb2_s1c"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"enb3_s1c"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"enb4_s1c"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"enb5_s1c"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"enb6_s1c"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"enb7_s1c"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"mme0_s1c_0"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"mme0_s1c_1"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"mme0_s1c_2"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"mme0_s1c_3"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"mme1_s1c_0"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"mme1_s1c_1"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"mme1_s1c_2"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"mme1_s1c_3"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"mme2_s1c_0"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"mme2_s1c_1"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"mme2_s1c_2"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"mme2_s1c_3"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"mme3_s1c_0"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"mme3_s1c_1"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"mme3_s1c_2"
select=
"'0.0.0.0'"
/>
<xsl:param
name=
"mme3_s1c_3"
select=
"'0.0.0.0'"
/>
<xsl:template
match=
"ip.src[parent::packet]/@value"
>
<xsl:choose>
<xsl:when
test=
".='enb0_s1c'"
><xsl:value-of
select=
"$enb0_s1c"
/></xsl:when>
<xsl:when
test=
".='enb1_s1c'"
><xsl:value-of
select=
"$enb1_s1c"
/></xsl:when>
<xsl:when
test=
".='enb2_s1c'"
><xsl:value-of
select=
"$enb2_s1c"
/></xsl:when>
<xsl:when
test=
".='enb3_s1c'"
><xsl:value-of
select=
"$enb3_s1c"
/></xsl:when>
<xsl:when
test=
".='enb4_s1c'"
><xsl:value-of
select=
"$enb4_s1c"
/></xsl:when>
<xsl:when
test=
".='enb5_s1c'"
><xsl:value-of
select=
"$enb5_s1c"
/></xsl:when>
<xsl:when
test=
".='enb6_s1c'"
><xsl:value-of
select=
"$enb6_s1c"
/></xsl:when>
<xsl:when
test=
".='enb7_s1c'"
><xsl:value-of
select=
"$enb7_s1c"
/></xsl:when>
<xsl:when
test=
".='mme0_s1c_0'"
><xsl:value-of
select=
"$mme0_s1c_0"
/></xsl:when>
<xsl:when
test=
".='mme0_s1c_1'"
><xsl:value-of
select=
"$mme0_s1c_1"
/></xsl:when>
<xsl:when
test=
".='mme0_s1c_2'"
><xsl:value-of
select=
"$mme0_s1c_2"
/></xsl:when>
<xsl:when
test=
".='mme0_s1c_3'"
><xsl:value-of
select=
"$mme0_s1c_3"
/></xsl:when>
<xsl:when
test=
".='mme1_s1c_0'"
><xsl:value-of
select=
"$mme1_s1c_0"
/></xsl:when>
<xsl:when
test=
".='mme1_s1c_1'"
><xsl:value-of
select=
"$mme1_s1c_1"
/></xsl:when>
<xsl:when
test=
".='mme1_s1c_2'"
><xsl:value-of
select=
"$mme1_s1c_2"
/></xsl:when>
<xsl:when
test=
".='mme1_s1c_3'"
><xsl:value-of
select=
"$mme1_s1c_3"
/></xsl:when>
<xsl:when
test=
".='mme2_s1c_0'"
><xsl:value-of
select=
"$mme2_s1c_0"
/></xsl:when>
<xsl:when
test=
".='mme2_s1c_1'"
><xsl:value-of
select=
"$mme2_s1c_1"
/></xsl:when>
<xsl:when
test=
".='mme2_s1c_2'"
><xsl:value-of
select=
"$mme2_s1c_2"
/></xsl:when>
<xsl:when
test=
".='mme2_s1c_3'"
><xsl:value-of
select=
"$mme2_s1c_3"
/></xsl:when>
<xsl:when
test=
".='mme3_s1c_0'"
><xsl:value-of
select=
"$mme3_s1c_0"
/></xsl:when>
<xsl:when
test=
".='mme3_s1c_1'"
><xsl:value-of
select=
"$mme3_s1c_1"
/></xsl:when>
<xsl:when
test=
".='mme3_s1c_2'"
><xsl:value-of
select=
"$mme3_s1c_2"
/></xsl:when>
<xsl:when
test=
".='mme3_s1c_3'"
><xsl:value-of
select=
"$mme3_s1c_3"
/></xsl:when>
<xsl:otherwise>
<xsl:message
terminate=
"yes"
>
ERROR: Cannot resolv IP
<xsl:value-of
select=
"."
/>
!
</xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template
match=
"ip.dst[parent::packet]/@value"
>
<xsl:choose>
<xsl:when
test=
".='enb0_s1c'"
><xsl:value-of
select=
"$enb0_s1c"
/></xsl:when>
<xsl:when
test=
".='enb1_s1c'"
><xsl:value-of
select=
"$enb1_s1c"
/></xsl:when>
<xsl:when
test=
".='enb2_s1c'"
><xsl:value-of
select=
"$enb2_s1c"
/></xsl:when>
<xsl:when
test=
".='enb3_s1c'"
><xsl:value-of
select=
"$enb3_s1c"
/></xsl:when>
<xsl:when
test=
".='enb4_s1c'"
><xsl:value-of
select=
"$enb4_s1c"
/></xsl:when>
<xsl:when
test=
".='enb5_s1c'"
><xsl:value-of
select=
"$enb5_s1c"
/></xsl:when>
<xsl:when
test=
".='enb6_s1c'"
><xsl:value-of
select=
"$enb6_s1c"
/></xsl:when>
<xsl:when
test=
".='enb7_s1c'"
><xsl:value-of
select=
"$enb7_s1c"
/></xsl:when>
<xsl:when
test=
".='mme0_s1c_0'"
><xsl:value-of
select=
"$mme0_s1c_0"
/></xsl:when>
<xsl:when
test=
".='mme0_s1c_1'"
><xsl:value-of
select=
"$mme0_s1c_1"
/></xsl:when>
<xsl:when
test=
".='mme0_s1c_2'"
><xsl:value-of
select=
"$mme0_s1c_2"
/></xsl:when>
<xsl:when
test=
".='mme0_s1c_3'"
><xsl:value-of
select=
"$mme0_s1c_3"
/></xsl:when>
<xsl:when
test=
".='mme1_s1c_0'"
><xsl:value-of
select=
"$mme1_s1c_0"
/></xsl:when>
<xsl:when
test=
".='mme1_s1c_1'"
><xsl:value-of
select=
"$mme1_s1c_1"
/></xsl:when>
<xsl:when
test=
".='mme1_s1c_2'"
><xsl:value-of
select=
"$mme1_s1c_2"
/></xsl:when>
<xsl:when
test=
".='mme1_s1c_3'"
><xsl:value-of
select=
"$mme1_s1c_3"
/></xsl:when>
<xsl:when
test=
".='mme2_s1c_0'"
><xsl:value-of
select=
"$mme2_s1c_0"
/></xsl:when>
<xsl:when
test=
".='mme2_s1c_1'"
><xsl:value-of
select=
"$mme2_s1c_1"
/></xsl:when>
<xsl:when
test=
".='mme2_s1c_2'"
><xsl:value-of
select=
"$mme2_s1c_2"
/></xsl:when>
<xsl:when
test=
".='mme2_s1c_3'"
><xsl:value-of
select=
"$mme2_s1c_3"
/></xsl:when>
<xsl:when
test=
".='mme3_s1c_0'"
><xsl:value-of
select=
"$mme3_s1c_0"
/></xsl:when>
<xsl:when
test=
".='mme3_s1c_1'"
><xsl:value-of
select=
"$mme3_s1c_1"
/></xsl:when>
<xsl:when
test=
".='mme3_s1c_2'"
><xsl:value-of
select=
"$mme3_s1c_2"
/></xsl:when>
<xsl:when
test=
".='mme3_s1c_3'"
><xsl:value-of
select=
"$mme3_s1c_3"
/></xsl:when>
<xsl:otherwise>
<xsl:message
terminate=
"yes"
>
ERROR: Cannot resolv IP
<xsl:value-of
select=
"."
/>
!
</xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template
match=
"node()|@*"
>
<xsl:copy>
<xsl:apply-templates
select=
"node()|@*"
/>
</xsl:copy>
</xsl:template>
<xsl:template
match=
"/"
>
<xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
openair3/TEST/EPC_TEST/play_scenario_parse.c
View file @
612d5878
...
...
@@ -58,7 +58,6 @@
//------------------------------------------------------------------------------
#define ENB_CONFIG_MAX_XSLT_PARAMS 32
//------------------------------------------------------------------------------
extern
char
*
g_openair_dir
;
extern
Enb_properties_array_t
g_enb_properties
;
//------------------------------------------------------------------------------
void
et_parse_s1ap
(
xmlDocPtr
doc
,
const
xmlNode
const
*
s1ap_node
,
et_s1ap_t
*
const
s1ap
)
...
...
@@ -71,6 +70,9 @@ void et_parse_s1ap(xmlDocPtr doc, const xmlNode const *s1ap_node, et_s1ap_t * co
unsigned
int
go_deeper_in_tree
=
1
;
if
((
NULL
!=
s1ap_node
)
&&
(
NULL
!=
s1ap
))
{
// seee http://www.xmlsoft.org/html/libxml-tree.html#xmlCopyNode
s1ap
->
xml_node
=
xmlCopyNode
(
s1ap_node
,
1
);
AssertFatal
(
NULL
!=
s1ap
->
xml_node
,
"xmlCopyNode Failed"
);
for
(
cur_node
=
(
xmlNode
*
)
s1ap_node
;
cur_node
;
cur_node
=
cur_node
->
next
)
{
go_deeper_in_tree
=
1
;
if
((
!
xmlStrcmp
(
cur_node
->
name
,
(
const
xmlChar
*
)
"field"
)))
{
...
...
@@ -497,17 +499,14 @@ int et_generate_xml_scenario(
exit
(
1
);
}
memset
(
astring
,
0
,
sizeof
(
astring
));
strcat
(
astring
,
g_openair_dir
);
strcat
(
astring
,
"/openair3/TEST/EPC_TEST/play_scenario.xsl"
);
xmlSubstituteEntitiesDefault
(
1
);
xmlLoadExtDtdDefaultValue
=
1
;
cur
=
xsltParseStylesheetFile
((
const
xmlChar
*
)
astring
);
cur
=
xsltParseStylesheetFile
((
const
xmlChar
*
)
"/usr/share/oai/xsl/play_scenario.xsl"
);
if
(
NULL
==
cur
)
{
AssertFatal
(
0
,
"Could not parse stylesheet file
%s (check OPENAIR_DIR env variable)!
\n
"
,
astring
);
AssertFatal
(
0
,
"Could not parse stylesheet file
/usr/share/oai/xsl/play_scenario.xsl!
\n
"
);
}
else
{
fprintf
(
stdout
,
"XSLT style sheet:
%s
\n
"
,
astring
);
fprintf
(
stdout
,
"XSLT style sheet:
/usr/share/oai/xsl/play_scenario.xsl
\n
"
);
}
doc
=
xmlParseFile
(
xml_in_scenario_filename
);
...
...
openair3/TEST/EPC_TEST/play_scenario_s1ap.c
View file @
612d5878
...
...
@@ -189,7 +189,7 @@ void et_s1ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id,
itti_send_msg_to_task
(
TASK_SCTP
,
instance
,
message_p
);
}
//------------------------------------------------------------------------------
int
et_handle_s1ap_mismatch
(
et_packet_t
*
const
spacket
,
et_packet_t
*
const
rx_packet
)
int
et_handle_s1ap_mismatch
_mme_ue_s1ap_id
(
et_packet_t
*
const
spacket
,
et_packet_t
*
const
rx_packet
)
{
S1ap_MME_UE_S1AP_ID_t
scenario_mme_ue_s1ap_id
=
0
;
S1ap_MME_UE_S1AP_ID_t
rx_mme_ue_s1ap_id
=
0
;
...
...
@@ -512,7 +512,15 @@ int et_handle_s1ap_mismatch(et_packet_t * const spacket, et_packet_t * const rx_
default:
AssertFatal
(
0
,
"Unknown procedure code %ld"
,
rx_packet
->
sctp_hdr
.
u
.
data_hdr
.
payload
.
message
.
procedureCode
);
}
return
0
;
if
(
scenario_mme_ue_s1ap_id
!=
rx_mme_ue_s1ap_id
)
{
et_packet_t
*
p
=
spacket
;
while
(
p
)
{
et_s1ap_update_mme_ue_s1ap_id
(
p
,
scenario_mme_ue_s1ap_id
,
rx_mme_ue_s1ap_id
);
p
=
p
->
next
;
}
return
0
;
}
return
1
;
}
//------------------------------------------------------------------------------
asn_comp_rval_t
*
et_s1ap_is_matching
(
et_s1ap_t
*
const
s1ap1
,
et_s1ap_t
*
const
s1ap2
,
const
uint32_t
constraints
)
...
...
@@ -669,7 +677,7 @@ int et_s1ap_process_rx_packet(et_event_s1ap_data_ind_t * const s1ap_data_ind)
//TODO MME_UE_S1AP_ID, etc.
// get latest error code
if
(
strcmp
(
comp_results
->
name
,
"S1ap-MME-UE-S1AP-ID"
)
==
0
)
{
if
(
0
==
et_handle_s1ap_mismatch
((
et_packet_t
*
const
)
packet
,
(
et_packet_t
*
const
)
rx_packet
))
{
if
(
0
==
et_handle_s1ap_mismatch
_mme_ue_s1ap_id
((
et_packet_t
*
const
)
packet
,
(
et_packet_t
*
const
)
rx_packet
))
{
packet
->
timestamp_packet
.
tv_sec
=
rx_packet
->
timestamp_packet
.
tv_sec
;
packet
->
timestamp_packet
.
tv_usec
=
rx_packet
->
timestamp_packet
.
tv_usec
;
return
et_scenario_set_packet_received
(
packet
);
...
...
openair3/TEST/EPC_TEST/play_scenario_s1ap_compare_ie.c
View file @
612d5878
This diff is collapsed.
Click to expand it.
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf
View file @
612d5878
...
...
@@ -131,7 +131,7 @@ eNBs =
//////////
MME
parameters
:
mme_ip_address
= ( {
ipv4
=
"192.1
88.2.2
"
;
mme_ip_address
= ( {
ipv4
=
"192.1
70.0.1
"
;
ipv6
=
"192:168:30::17"
;
active
=
"yes"
;
preference
=
"ipv4"
;
...
...
@@ -140,12 +140,12 @@ eNBs =
NETWORK_INTERFACES
:
{
ENB_INTERFACE_NAME_FOR_S1_MME
=
"
tun2
"
;
ENB_IPV4_ADDRESS_FOR_S1_MME
=
"192.1
88.2
.2/24"
;
ENB_INTERFACE_NAME_FOR_S1_MME
=
"
eth0:3
"
;
ENB_IPV4_ADDRESS_FOR_S1_MME
=
"192.1
70.0
.2/24"
;
ENB_INTERFACE_NAME_FOR_S1U
=
"
lo
"
;
ENB_IPV4_ADDRESS_FOR_S1U
=
"1
27.0.0.1
/24"
;
ENB_PORT_FOR_S1U
=
215
3
;
# Spec 2152
ENB_INTERFACE_NAME_FOR_S1U
=
"
eth0:4
"
;
ENB_IPV4_ADDRESS_FOR_S1U
=
"1
92.170.1.2
/24"
;
ENB_PORT_FOR_S1U
=
215
2
;
# Spec 2152
};
log_config
:
...
...
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