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
Michael Black
OpenXG-RAN
Commits
8e458d9c
Commit
8e458d9c
authored
Jun 20, 2016
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a very basic step mechanism to replay.c
parent
c5b126f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
common/utils/T/tracer/replay.c
common/utils/T/tracer/replay.c
+6
-1
No files found.
common/utils/T/tracer/replay.c
View file @
8e458d9c
...
...
@@ -92,7 +92,8 @@ void usage(void)
printf
(
"options:
\n
"
" -i <input file> this option is mandatory
\n
"
" -p <port> wait connection on given port (default %d)
\n
"
,
" -p <port> wait connection on given port (default %d)
\n
"
" -w user must press a key after each sent event
\n
"
,
DEFAULT_REMOTE_PORT
);
exit
(
1
);
...
...
@@ -108,6 +109,7 @@ int main(int n, char **v)
int
socket
;
FILE
*
in
;
int
do_send
;
int
do_wait
=
0
;
for
(
i
=
1
;
i
<
n
;
i
++
)
{
if
(
!
strcmp
(
v
[
i
],
"-h"
)
||
!
strcmp
(
v
[
i
],
"--help"
))
usage
();
...
...
@@ -115,6 +117,7 @@ int main(int n, char **v)
{
if
(
i
>
n
-
2
)
usage
();
input_filename
=
v
[
++
i
];
continue
;
}
if
(
!
strcmp
(
v
[
i
],
"-p"
))
{
if
(
i
>
n
-
2
)
usage
();
port
=
atoi
(
v
[
++
i
]);
continue
;
}
if
(
!
strcmp
(
v
[
i
],
"-w"
))
{
do_wait
=
1
;
continue
;
}
usage
();
}
...
...
@@ -169,6 +172,8 @@ int main(int n, char **v)
if
(
do_send
)
if
(
socket_send
(
socket
,
v
,
vpos
)
!=
0
)
{
printf
(
"ERROR: socket writing failed
\n
"
);
abort
();
}
if
(
do_send
&&
do_wait
)
getchar
();
}
fclose
(
in
);
...
...
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