From 792b55737297fd08a6cc30b899d727e3828d4d31 Mon Sep 17 00:00:00 2001 From: zfl9 Date: Fri, 30 Aug 2019 21:34:56 +0800 Subject: update dns2tcp.c --- dns2tcp.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/dns2tcp.c b/dns2tcp.c index c1f08f7..7267f69 100644 --- a/dns2tcp.c +++ b/dns2tcp.c @@ -3,7 +3,18 @@ #include #undef _GNU_SOURCE -int main(void) { - LOGINF("[main] hello, world!"); +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" + " -v print verbose log, default: \n" + " -V print version number of dns2tcp and exit\n" + " -h print help information of dns2tcp and exit\n" + "bug report: https://github.com/zfl9/dns2tcp. email: zfl9.com@gmail.com\n" + ); +} + +int main() { + print_command_help(); return 0; } -- cgit v1.2.3