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
fe057b1b
Commit
fe057b1b
authored
Mar 21, 2016
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add port to -r option
parent
d4d361ed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
tracer/main.c
tracer/main.c
+5
-3
No files found.
tracer/main.c
View file @
fe057b1b
...
@@ -403,7 +403,7 @@ void usage(void)
...
@@ -403,7 +403,7 @@ void usage(void)
" by default, all is off
\n
"
" by default, all is off
\n
"
"
\n
"
"
\n
"
"remote mode options: in this mode you run a local tracer and a remote one
\n
"
"remote mode options: in this mode you run a local tracer and a remote one
\n
"
" -r
remote side
\n
"
" -r
<port> remote side (use given port)
\n
"
" -l <IP address> <port> local side (forwards packets to remote IP:port)
\n
"
" -l <IP address> <port> local side (forwards packets to remote IP:port)
\n
"
);
);
exit
(
1
);
exit
(
1
);
...
@@ -429,6 +429,7 @@ int main(int n, char **v)
...
@@ -429,6 +429,7 @@ int main(int n, char **v)
int
remote_remote
=
0
;
int
remote_remote
=
0
;
char
*
remote_ip
=
NULL
;
char
*
remote_ip
=
NULL
;
int
remote_port
=
-
1
;
int
remote_port
=
-
1
;
int
port
=
2020
;
#ifdef T_USE_SHARED_MEMORY
#ifdef T_USE_SHARED_MEMORY
void
*
f
;
void
*
f
;
#endif
#endif
...
@@ -454,7 +455,8 @@ int main(int n, char **v)
...
@@ -454,7 +455,8 @@ int main(int n, char **v)
{
on_off_name
[
on_off_n
]
=
NULL
;
on_off_action
[
on_off_n
++
]
=
1
;
continue
;
}
{
on_off_name
[
on_off_n
]
=
NULL
;
on_off_action
[
on_off_n
++
]
=
1
;
continue
;
}
if
(
!
strcmp
(
v
[
i
],
"-OFF"
))
if
(
!
strcmp
(
v
[
i
],
"-OFF"
))
{
on_off_name
[
on_off_n
]
=
NULL
;
on_off_action
[
on_off_n
++
]
=
0
;
continue
;
}
{
on_off_name
[
on_off_n
]
=
NULL
;
on_off_action
[
on_off_n
++
]
=
0
;
continue
;
}
if
(
!
strcmp
(
v
[
i
],
"-r"
))
{
remote_remote
=
1
;
continue
;
}
if
(
!
strcmp
(
v
[
i
],
"-r"
))
{
if
(
i
>
n
-
2
)
usage
();
remote_remote
=
1
;
port
=
atoi
(
v
[
++
i
]);
continue
;
}
if
(
!
strcmp
(
v
[
i
],
"-l"
))
{
if
(
i
>
n
-
3
)
usage
();
remote_local
=
1
;
if
(
!
strcmp
(
v
[
i
],
"-l"
))
{
if
(
i
>
n
-
3
)
usage
();
remote_local
=
1
;
remote_ip
=
v
[
++
i
];
remote_port
=
atoi
(
v
[
++
i
]);
continue
;
}
remote_ip
=
v
[
++
i
];
remote_port
=
atoi
(
v
[
++
i
]);
continue
;
}
printf
(
"ERROR: unknown option %s
\n
"
,
v
[
i
]);
printf
(
"ERROR: unknown option %s
\n
"
,
v
[
i
]);
...
@@ -528,7 +530,7 @@ no_database:
...
@@ -528,7 +530,7 @@ no_database:
#ifdef T_USE_SHARED_MEMORY
#ifdef T_USE_SHARED_MEMORY
init_shm
();
init_shm
();
#endif
#endif
s
=
get_connection
(
"127.0.0.1"
,
2020
);
s
=
get_connection
(
"127.0.0.1"
,
port
);
if
(
remote_local
)
{
if
(
remote_local
)
{
#ifdef T_USE_SHARED_MEMORY
#ifdef T_USE_SHARED_MEMORY
...
...
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