diff rvinterf/lowlevel/rvifmain.c @ 899:a1065c17429c

rvinterf: implement TCH hiding mode and -v option for verbose
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 12 Dec 2022 22:15:25 +0000
parents 32031c18cc25
children bb7a03cc1e43
line wrap: on
line diff
--- a/rvinterf/lowlevel/rvifmain.c	Sun Apr 03 19:09:21 2022 +0000
+++ b/rvinterf/lowlevel/rvifmain.c	Mon Dec 12 22:15:25 2022 +0000
@@ -27,7 +27,7 @@
 char *logfname;
 FILE *logF;
 time_t logtime;
-int background, no_output;
+int background, no_output, verbose;
 int max_fd;
 
 char *socket_pathname = "/tmp/rvinterf_socket";
@@ -64,7 +64,7 @@
 	fd_set fds;
 	struct client *cli, **clip;
 
-	while ((c = getopt(argc, argv, "bB:d:l:nP:s:S:w:X:")) != EOF)
+	while ((c = getopt(argc, argv, "bB:d:l:nP:s:S:vw:X:")) != EOF)
 		switch (c) {
 		case 'b':
 			background++;
@@ -91,6 +91,9 @@
 		case 'S':
 			socketpair_fd = atoi(optarg);
 			continue;
+		case 'v':
+			verbose++;
+			continue;
 		case 'w':
 			wakeup_after_sec = strtoul(optarg, 0, 0);
 			continue;
@@ -221,8 +224,12 @@
 			report_extui_packet();
 		return;
 	case RVT_TCH_HEADER:
-		if (!no_output || logF)
-			print_tch_output_raw();
+		if (!no_output || logF) {
+			if (verbose)
+				print_tch_output_raw();
+			else
+				tch_inc_count_rx();
+		}
 		if (client_head)
 			forward_nonrvt_pkt();
 		return;