diff --git a/common/utils/T/tracer/local.c b/common/utils/T/tracer/local.c index c681b36aa6f83945a6004b31fdbff4b3e146bdc2..bc205d40d5f3d6868d64764786b8679608aa9c49 100644 --- a/common/utils/T/tracer/local.c +++ b/common/utils/T/tracer/local.c @@ -9,6 +9,9 @@ #include <fcntl.h> #include <pthread.h> +#define DEFAULT_REMOTE_IP "127.0.0.1" +#define DEFAULT_REMOTE_PORT 2021 + #include "defs.h" #include "../T_defs.h" @@ -94,7 +97,9 @@ void usage(void) printf( "tracer - local side\n" "options:\n" -" -l <IP address> <port> local side (forwards packets to remote IP:port)\n" +" -r <IP address> <port> forwards packets to remote IP:port\n" +" (default %s:%d)\n", + DEFAULT_REMOTE_IP, DEFAULT_REMOTE_PORT ); exit(1); } @@ -103,8 +108,8 @@ int main(int n, char **v) { int s; int i; - char *remote_ip = NULL; - int remote_port = -1; + char *remote_ip = DEFAULT_REMOTE_IP; + int remote_port = DEFAULT_REMOTE_PORT; int port = 2020; void *f; @@ -116,8 +121,6 @@ int main(int n, char **v) usage(); } - if (remote_port == -1 || remote_ip == NULL) usage(); - f = forwarder(remote_ip, remote_port); init_shm(); s = get_connection("127.0.0.1", port);