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
alex037yang
OpenXG-RAN
Commits
c99a48d9
Commit
c99a48d9
authored
Aug 14, 2016
by
Rohit Gupta
Browse files
Options
Browse Files
Download
Plain Diff
merge from develop
parents
8788b311
97e51a25
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
957 additions
and
200 deletions
+957
-200
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
+15
-2
cmake_targets/autotests/test_case_list.xml
cmake_targets/autotests/test_case_list.xml
+194
-194
cmake_targets/autotests/tools/git-retry.sh
cmake_targets/autotests/tools/git-retry.sh
+18
-0
cmake_targets/autotests/tools/run_gdb
cmake_targets/autotests/tools/run_gdb
+52
-0
cmake_targets/tools/run_enb_ue_virt_s1
cmake_targets/tools/run_enb_ue_virt_s1
+1
-1
common/utils/T/.gitignore
common/utils/T/.gitignore
+1
-0
common/utils/T/tracer/Makefile
common/utils/T/tracer/Makefile
+6
-2
common/utils/T/tracer/macpdu2wireshark.c
common/utils/T/tracer/macpdu2wireshark.c
+260
-0
common/utils/T/tracer/packet-mac-lte.h
common/utils/T/tracer/packet-mac-lte.h
+404
-0
openair2/LAYER2/MAC/eNB_scheduler_RA.c
openair2/LAYER2/MAC/eNB_scheduler_RA.c
+4
-0
openair3/NAS/UE/API/USIM/usim_api.c
openair3/NAS/UE/API/USIM/usim_api.c
+2
-1
No files found.
cmake_targets/autotests/run_exec_lte-softmodem_tests.py
View file @
c99a48d9
...
...
@@ -1426,13 +1426,26 @@ for oai in oai_list:
setuplogfile
=
logdir
+
'/setup_log_'
+
MachineList
[
index
]
+
'_.txt'
setup_script
=
locallogdir
+
'/setup_script_'
+
MachineList
[
index
]
+
'_.txt'
#Sometimes git fails so the script below retries in that case
localfile
=
os
.
path
.
expandvars
(
'$OPENAIR_DIR/cmake_targets/autotests/tools/git-retry.sh'
)
remotefile
=
logdir
+
'/git-retry.sh'
paramList
=
[]
port
=
22
paramList
.
append
(
{
"operation"
:
'put'
,
"localfile"
:
localfile
,
"remotefile"
:
remotefile
}
)
sftp_log
=
os
.
path
.
expandvars
(
locallogdir
+
'/sftp_module.log'
)
sftp_module
(
user
,
pw
,
MachineList
[
index
],
port
,
paramList
,
sftp_log
)
cmd
=
' (
\n
'
#cmd = cmd + 'rm -fR ' + logdir + '\n'
#cmd = cmd + 'mkdir -p ' + logdir + '\n'
cmd
=
cmd
+
'cd '
+
logdir
+
'
\n
'
cmd
=
cmd
+
'sudo apt-get install -y git
\n
'
cmd
=
cmd
+
'git config --global http.sslVerify false
\n
'
cmd
=
cmd
+
'git clone '
+
GitOAI5GRepo
+
'
\n
'
cmd
=
cmd
+
'git clone '
+
GitOpenaircnRepo
+
'
\n
'
cmd
=
cmd
+
'chmod 700 '
+
logdir
+
'/git-retry.sh
\n
'
cmd
=
cmd
+
logdir
+
'/git-retry.sh clone '
+
GitOAI5GRepo
+
'
\n
'
cmd
=
cmd
+
logdir
+
'/git-retry.sh clone '
+
GitOpenaircnRepo
+
'
\n
'
cmd
=
cmd
+
'cd '
+
logdirOAI5GRepo
+
'
\n
'
cmd
=
cmd
+
'git checkout '
+
GitOAI5GRepoBranch
+
'
\n
'
#cmd = cmd + 'git checkout ' + GitOAI5GHeadVersion + '\n'
...
...
cmake_targets/autotests/test_case_list.xml
View file @
c99a48d9
This diff is collapsed.
Click to expand it.
cmake_targets/autotests/tools/git-retry.sh
0 → 100755
View file @
c99a48d9
#!/bin/bash
#Simple script to retry git clone in case of failure
REALGIT
=
/usr/bin/git
RETRIES
=
10
DELAY
=
10
COUNT
=
1
while
[
$COUNT
-lt
$RETRIES
]
;
do
$REALGIT
$*
>>
git-clone-
`
hostname
`
-log
.txt 2>&1
if
[
$?
-eq
0
]
;
then
RETRIES
=
0
break
fi
let
COUNT
=
$COUNT
+1
sleep
$DELAY
done
cmake_targets/autotests/tools/run_gdb
0 → 100755
View file @
c99a48d9
#!/bin/bash
#arg0 -> Name of executable
#args[1...N] -> arguments to be passed to executable
if
[
-z
"
$OPENAIR_DIR
"
]
then
echo
"OPENAIR_DIR environment not set. Exiting.."
exit
fi
source
$OPENAIR_DIR
/cmake_targets/tools/build_helper
args
=(
$*
)
exec_name
=
${
args
[0]
}
exe_args
=(
${
args
[@]
:1
}
)
gdb_file
=
$OPENAIR_DIR
/targets/bin/gdb_file
gdb_log
=
$OPENAIR_DIR
/targets/bin/gdb_log.bt
echo
"args =
${
args
[@]
}
"
echo
"exec_name =
$exec_name
"
echo
"exe_args =
${
exe_args
[@]
}
"
echo
"gdb log file =
$gdb_log
"
$SUDO
rm
-fr
$gdb_file
$gdb_log
$SUDO
touch
$gdb_file
$gdb_log
$SUDO
chmod
777
$gdb_file
$gdb_log
$SUDO
echo
"file
$exec_name
"
>>
$gdb_file
$SUDO
echo
"set args
${
exe_args
[@]
}
"
>>
$gdb_file
$SUDO
echo
"run"
>>
$gdb_file
$SUDO
echo
"set logging overwrite on"
>>
$gdb_file
$SUDO
echo
"set logging file
$gdb_log
"
>>
$gdb_file
$SUDO
echo
"set logging on"
>>
$gdb_file
$SUDO
echo
"set pagination off"
>>
$gdb_file
$SUDO
echo
"handle SIG33 pass nostop noprint"
>>
$gdb_file
$SUDO
echo
"echo backtrace:
\n
"
>>
$gdb_file
$SUDO
echo
"backtrace full"
>>
$gdb_file
$SUDO
echo
"echo
\n\n
registers:
\n
"
>>
$gdb_file
$SUDO
echo
"info registers"
>>
$gdb_file
$SUDO
echo
"echo
\n\n
current instructions:
\n
"
>>
$gdb_file
$SUDO
echo
"x/16i
\$
pc"
>>
$gdb_file
$SUDO
echo
"echo
\n\n
threads backtrace:
\n
"
>>
$gdb_file
$SUDO
echo
"thread apply all backtrace"
>>
$gdb_file
$SUDO
echo
"set logging off"
>>
$gdb_file
$SUDO
echo
"quit"
>>
$gdb_file
echo
"Contents of gdb_file...start"
$SUDO
cat
$gdb_file
echo
"Contents of gdb_file...finish"
$SUDO
gdb
-n
-x
$gdb_file
2>&1
cmake_targets/tools/run_enb_ue_virt_s1
View file @
c99a48d9
...
...
@@ -252,7 +252,7 @@ function main()
# Check table 200 lte in /etc/iproute2/rt_tables
fgrep lte /etc/iproute2/rt_tables
>
/dev/null
if
[
$?
-ne
0
]
;
then
bash
-c
echo
"200 lte "
>>
/etc/iproute2/rt_tables
echo
"200 lte "
>>
/etc/iproute2/rt_tables
fi
ip rule add fwmark 1 table lte
ifconfig oip1 up
...
...
common/utils/T/.gitignore
View file @
c99a48d9
...
...
@@ -9,4 +9,5 @@ tracer/record
tracer/replay
tracer/textlog
tracer/vcd
tracer/macpdu2wireshark
tracee/tracee
common/utils/T/tracer/Makefile
View file @
c99a48d9
...
...
@@ -5,7 +5,7 @@ CFLAGS=-Wall -g -pthread -DT_TRACER -I.
LIBS
=
-lX11
-lm
-lpng
-lXft
all
:
record replay extract_config textlog enb vcd
all
:
record replay extract_config textlog enb vcd
macpdu2wireshark
record
:
utils.o record.o database.o config.o
$(CC)
$(CFLAGS)
-o
record
$^
$(LIBS)
...
...
@@ -31,6 +31,10 @@ vcd: utils.o vcd.o database.o event.o handler.o config.o \
filter/filter.a
$(CC)
$(CFLAGS)
-o
vcd
$^
$(LIBS)
macpdu2wireshark
:
macpdu2wireshark.o database.o utils.o handler.o event.o
\
config.o
$(CC)
$(CFLAGS)
-o
$@
$^
$(LIBS)
.PHONY
:
all gui/gui.a view/view.a logger/logger.a filter/filter.a
gui/gui.a
:
...
...
@@ -50,7 +54,7 @@ filter/filter.a:
clean
:
rm
-f
*
.o core tracer_remote textlog enb vcd record replay
rm
-f
extract_config
rm
-f
extract_config
macpdu2wireshark
cd
gui
&&
make clean
cd
view
&&
make clean
cd
logger
&&
make clean
...
...
common/utils/T/tracer/macpdu2wireshark.c
0 → 100644
View file @
c99a48d9
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "database.h"
#include "event.h"
#include "handler.h"
#include "config.h"
#include "utils.h"
#include "packet-mac-lte.h"
#define DEFAULT_IP "127.0.0.1"
#define DEFAULT_PORT 9999
typedef
struct
{
int
socket
;
struct
sockaddr_in
to
;
OBUF
buf
;
/* ul */
int
ul_rnti
;
int
ul_frame
;
int
ul_subframe
;
int
ul_data
;
/* dl */
int
dl_rnti
;
int
dl_frame
;
int
dl_subframe
;
int
dl_data
;
}
ev_data
;
void
ul
(
void
*
_d
,
event
e
)
{
ev_data
*
d
=
_d
;
ssize_t
ret
;
int
fsf
;
int
i
;
d
->
buf
.
osize
=
0
;
PUTS
(
&
d
->
buf
,
MAC_LTE_START_STRING
);
PUTC
(
&
d
->
buf
,
FDD_RADIO
);
PUTC
(
&
d
->
buf
,
DIRECTION_UPLINK
);
PUTC
(
&
d
->
buf
,
C_RNTI
);
PUTC
(
&
d
->
buf
,
MAC_LTE_RNTI_TAG
);
PUTC
(
&
d
->
buf
,
(
e
.
e
[
d
->
ul_rnti
].
i
>>
8
)
&
255
);
PUTC
(
&
d
->
buf
,
e
.
e
[
d
->
ul_rnti
].
i
&
255
);
/* for newer version of wireshark? */
fsf
=
(
e
.
e
[
d
->
ul_frame
].
i
<<
4
)
+
e
.
e
[
d
->
ul_subframe
].
i
;
/* for older version? */
fsf
=
e
.
e
[
d
->
ul_subframe
].
i
;
PUTC
(
&
d
->
buf
,
MAC_LTE_FRAME_SUBFRAME_TAG
);
PUTC
(
&
d
->
buf
,
(
fsf
>>
8
)
&
255
);
PUTC
(
&
d
->
buf
,
fsf
&
255
);
PUTC
(
&
d
->
buf
,
MAC_LTE_PAYLOAD_TAG
);
for
(
i
=
0
;
i
<
e
.
e
[
d
->
ul_data
].
bsize
;
i
++
)
PUTC
(
&
d
->
buf
,
((
char
*
)
e
.
e
[
d
->
ul_data
].
b
)[
i
]);
ret
=
sendto
(
d
->
socket
,
d
->
buf
.
obuf
,
d
->
buf
.
osize
,
0
,
(
struct
sockaddr
*
)
&
d
->
to
,
sizeof
(
struct
sockaddr_in
));
if
(
ret
!=
d
->
buf
.
osize
)
abort
();
}
void
dl
(
void
*
_d
,
event
e
)
{
ev_data
*
d
=
_d
;
ssize_t
ret
;
int
fsf
;
int
i
;
d
->
buf
.
osize
=
0
;
PUTS
(
&
d
->
buf
,
MAC_LTE_START_STRING
);
PUTC
(
&
d
->
buf
,
FDD_RADIO
);
PUTC
(
&
d
->
buf
,
DIRECTION_DOWNLINK
);
PUTC
(
&
d
->
buf
,
C_RNTI
);
PUTC
(
&
d
->
buf
,
MAC_LTE_RNTI_TAG
);
PUTC
(
&
d
->
buf
,
(
e
.
e
[
d
->
dl_rnti
].
i
>>
8
)
&
255
);
PUTC
(
&
d
->
buf
,
e
.
e
[
d
->
dl_rnti
].
i
&
255
);
/* for newer version of wireshark? */
fsf
=
(
e
.
e
[
d
->
dl_frame
].
i
<<
4
)
+
e
.
e
[
d
->
dl_subframe
].
i
;
/* for older version? */
fsf
=
e
.
e
[
d
->
dl_subframe
].
i
;
PUTC
(
&
d
->
buf
,
MAC_LTE_FRAME_SUBFRAME_TAG
);
PUTC
(
&
d
->
buf
,
(
fsf
>>
8
)
&
255
);
PUTC
(
&
d
->
buf
,
fsf
&
255
);
PUTC
(
&
d
->
buf
,
MAC_LTE_PAYLOAD_TAG
);
for
(
i
=
0
;
i
<
e
.
e
[
d
->
dl_data
].
bsize
;
i
++
)
PUTC
(
&
d
->
buf
,
((
char
*
)
e
.
e
[
d
->
dl_data
].
b
)[
i
]);
ret
=
sendto
(
d
->
socket
,
d
->
buf
.
obuf
,
d
->
buf
.
osize
,
0
,
(
struct
sockaddr
*
)
&
d
->
to
,
sizeof
(
struct
sockaddr_in
));
if
(
ret
!=
d
->
buf
.
osize
)
abort
();
}
void
setup_data
(
ev_data
*
d
,
void
*
database
,
int
ul_id
,
int
dl_id
)
{
database_event_format
f
;
int
i
;
d
->
ul_rnti
=
-
1
;
d
->
ul_frame
=
-
1
;
d
->
ul_subframe
=
-
1
;
d
->
ul_data
=
-
1
;
d
->
dl_rnti
=
-
1
;
d
->
dl_frame
=
-
1
;
d
->
dl_subframe
=
-
1
;
d
->
dl_data
=
-
1
;
#define G(var_name, var_type, var) \
if (!strcmp(f.name[i], var_name)) { \
if (strcmp(f.type[i], var_type)) goto error; \
var = i; \
continue; \
}
/* ul: rnti, frame, subframe, data */
f
=
get_format
(
database
,
ul_id
);
for
(
i
=
0
;
i
<
f
.
count
;
i
++
)
{
G
(
"rnti"
,
"int"
,
d
->
ul_rnti
);
G
(
"frame"
,
"int"
,
d
->
ul_frame
);
G
(
"subframe"
,
"int"
,
d
->
ul_subframe
);
G
(
"data"
,
"buffer"
,
d
->
ul_data
);
}
if
(
d
->
ul_rnti
==
-
1
||
d
->
ul_frame
==
-
1
||
d
->
ul_subframe
==
-
1
||
d
->
ul_data
==
-
1
)
goto
error
;
/* dl: rnti, frame, subframe, data */
f
=
get_format
(
database
,
dl_id
);
for
(
i
=
0
;
i
<
f
.
count
;
i
++
)
{
G
(
"rnti"
,
"int"
,
d
->
dl_rnti
);
G
(
"frame"
,
"int"
,
d
->
dl_frame
);
G
(
"subframe"
,
"int"
,
d
->
dl_subframe
);
G
(
"data"
,
"buffer"
,
d
->
dl_data
);
}
if
(
d
->
dl_rnti
==
-
1
||
d
->
dl_frame
==
-
1
||
d
->
dl_subframe
==
-
1
||
d
->
dl_data
==
-
1
)
goto
error
;
#undef G
return
;
error:
printf
(
"bad T_messages.txt
\n
"
);
abort
();
}
void
*
receiver
(
void
*
_d
)
{
ev_data
*
d
=
_d
;
int
s
;
char
buf
[
100000
];
s
=
socket
(
AF_INET
,
SOCK_DGRAM
,
0
);
if
(
s
==
-
1
)
{
perror
(
"socket"
);
abort
();
}
if
(
bind
(
s
,
(
struct
sockaddr
*
)
&
d
->
to
,
sizeof
(
struct
sockaddr_in
))
==
-
1
)
{
perror
(
"bind"
);
abort
();
}
while
(
1
)
{
if
(
recv
(
s
,
buf
,
100000
,
0
)
<=
0
)
abort
();
}
return
0
;
}
void
usage
(
void
)
{
printf
(
"options:
\n
"
" -d <database file> this option is mandatory
\n
"
" -in <dump file> read events from this dump file
\n
"
" -ip <IP address> send packets to this IP address (default %s)
\n
"
" -p <port> send packets to this port (default %d)
\n
"
,
DEFAULT_IP
,
DEFAULT_PORT
);
exit
(
1
);
}
int
main
(
int
n
,
char
**
v
)
{
char
*
database_filename
=
NULL
;
char
*
input_filename
=
NULL
;
void
*
database
;
event_handler
*
h
;
int
in
;
int
i
;
int
ul_id
,
dl_id
;
ev_data
d
;
char
*
ip
=
DEFAULT_IP
;
int
port
=
DEFAULT_PORT
;
memset
(
&
d
,
0
,
sizeof
(
ev_data
));
for
(
i
=
1
;
i
<
n
;
i
++
)
{
if
(
!
strcmp
(
v
[
i
],
"-h"
)
||
!
strcmp
(
v
[
i
],
"--help"
))
usage
();
if
(
!
strcmp
(
v
[
i
],
"-d"
))
{
if
(
i
>
n
-
2
)
usage
();
database_filename
=
v
[
++
i
];
continue
;
}
if
(
!
strcmp
(
v
[
i
],
"-in"
))
{
if
(
i
>
n
-
2
)
usage
();
input_filename
=
v
[
++
i
];
continue
;
}
if
(
!
strcmp
(
v
[
i
],
"-ip"
))
{
if
(
i
>
n
-
2
)
usage
();
ip
=
v
[
++
i
];
continue
;
}
if
(
!
strcmp
(
v
[
i
],
"-p"
))
{
if
(
i
>
n
-
2
)
usage
();
port
=
atoi
(
v
[
++
i
]);
continue
;
}
usage
();
}
if
(
database_filename
==
NULL
)
{
printf
(
"ERROR: provide a database file (-d)
\n
"
);
exit
(
1
);
}
if
(
input_filename
==
NULL
)
{
printf
(
"ERROR: provide an input file (-i)
\n
"
);
exit
(
1
);
}
in
=
open
(
input_filename
,
O_RDONLY
);
if
(
in
==
-
1
)
{
perror
(
input_filename
);
return
1
;
}
database
=
parse_database
(
database_filename
);
load_config_file
(
database_filename
);
h
=
new_handler
(
database
);
ul_id
=
event_id_from_name
(
database
,
"ENB_MAC_UE_UL_PDU_WITH_DATA"
);
dl_id
=
event_id_from_name
(
database
,
"ENB_MAC_UE_DL_PDU_WITH_DATA"
);
setup_data
(
&
d
,
database
,
ul_id
,
dl_id
);
register_handler_function
(
h
,
ul_id
,
ul
,
&
d
);
register_handler_function
(
h
,
dl_id
,
dl
,
&
d
);
d
.
socket
=
socket
(
AF_INET
,
SOCK_DGRAM
,
0
);
if
(
d
.
socket
==
-
1
)
{
perror
(
"socket"
);
exit
(
1
);
}
d
.
to
.
sin_family
=
AF_INET
;
d
.
to
.
sin_port
=
htons
(
port
);
d
.
to
.
sin_addr
.
s_addr
=
inet_addr
(
ip
);
new_thread
(
receiver
,
&
d
);
/* read messages */
while
(
1
)
{
char
v
[
T_BUFFER_MAX
];
event
e
;
e
=
get_event
(
in
,
v
,
database
);
if
(
e
.
type
==
-
1
)
break
;
if
(
!
(
e
.
type
==
ul_id
||
e
.
type
==
dl_id
))
continue
;
handle_event
(
h
,
e
);
}
return
0
;
}
common/utils/T/tracer/packet-mac-lte.h
0 → 100644
View file @
c99a48d9
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/eNB_scheduler_RA.c
View file @
c99a48d9
...
...
@@ -68,6 +68,7 @@
#include "SIMULATION/TOOLS/defs.h" // for taus
#include "T.h"
void
schedule_RA
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
subframeP
,
unsigned
char
Msg3_subframe
)
{
...
...
@@ -644,6 +645,9 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,un
&
eNB
->
common_channels
[
CC_id
].
CCCH_pdu
.
payload
[
0
],
rrc_sdu_length
);
T
(
T_ENB_MAC_UE_DL_PDU_WITH_DATA
,
T_INT
(
module_idP
),
T_INT
(
CC_id
),
T_INT
(
RA_template
->
rnti
),
T_INT
(
frameP
),
T_INT
(
subframeP
),
T_INT
(
0
/*harq_pid always 0?*/
),
T_BUFFER
(
&
eNB
->
UE_list
.
DLSCH_pdu
[
CC_id
][
0
][
UE_id
].
payload
[
0
],
TBsize
));
if
(
opt_enabled
==
1
)
{
trace_pdu
(
1
,
(
uint8_t
*
)
eNB
->
UE_list
.
DLSCH_pdu
[
CC_id
][
0
][(
unsigned
char
)
UE_id
].
payload
[
0
],
rrc_sdu_length
,
UE_id
,
3
,
UE_RNTI
(
module_idP
,
UE_id
),
...
...
openair3/NAS/UE/API/USIM/usim_api.c
View file @
c99a48d9
...
...
@@ -77,7 +77,8 @@ Description Implements the API used by the NAS layer to read/write
* Subscriber authentication security key
*/
#define USIM_API_K_SIZE 16
#define USIM_API_K_VALUE "fec86ba6eb707ed08905757b1bb44b8f"
//#define USIM_API_K_VALUE "fec86ba6eb707ed08905757b1bb44b8f"
#define USIM_API_K_VALUE "8BAF473F2F8FD09487CCCBD7097C6862"
static
uint8_t
_usim_api_k
[
USIM_API_K_SIZE
];
...
...
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