From 0f0fcebcb9cfb0bf42e2bd710e510806d51cc283 Mon Sep 17 00:00:00 2001 From: zfl9 Date: Sat, 31 Aug 2019 14:56:34 +0800 Subject: update dns2tcp.c --- dns2tcp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dns2tcp.c b/dns2tcp.c index fb60d63..cd14021 100644 --- a/dns2tcp.c +++ b/dns2tcp.c @@ -10,6 +10,7 @@ #include #undef _GNU_SOURCE +#define IF_VERBOSE if (g_verbose) #define DNS2TCP_VERSION "dns2tcp v1.0" static bool g_verbose = false; @@ -24,7 +25,7 @@ static skaddr6_t g_remote_skaddr = {0}; static void print_command_help(void) { printf("usage: dns2tcp <-L LISTEN_ADDR> <-R REMOTE_ADDR> [-vVh]\n" " -L udp listen address, it is required\n" - " -R tcp server address, it is required\n" + " -R tcp remote address, it is required\n" " -v print verbose log, default: \n" " -V print version number of dns2tcp and exit\n" " -h print help information of dns2tcp and exit\n" @@ -145,6 +146,10 @@ int main(int argc, char *argv[]) { setvbuf(stdout, NULL, _IOLBF, 256); parse_command_args(argc, argv); + LOGINF("[main] udp listen addr: %s#%hu", g_listen_ipstr, g_listen_portno); + LOGINF("[main] tcp remote addr: %s#%hu", g_remote_ipstr, g_remote_portno); + IF_VERBOSE LOGINF("[main] verbose mode, affect performance"); + // TODO return 0; -- cgit v1.2.3