comparison rvinterf/lowlevel/logsent.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 e7502631a0f9
children 4e243402f453
comparison
equal deleted inserted replaced
898:203c025e71ab 899:a1065c17429c
6 #include <stdio.h> 6 #include <stdio.h>
7 #include <string.h> 7 #include <string.h>
8 #include <strings.h> 8 #include <strings.h>
9 #include "../include/pktmux.h" 9 #include "../include/pktmux.h"
10 #include "../include/limits.h" 10 #include "../include/limits.h"
11
12 extern int no_output, verbose;
13 extern FILE *logF;
11 14
12 static void 15 static void
13 log_sent_ati(pkt, pktlen) 16 log_sent_ati(pkt, pktlen)
14 u_char *pkt; 17 u_char *pkt;
15 { 18 {
70 } 73 }
71 74
72 log_sent_packet(pkt, pktlen) 75 log_sent_packet(pkt, pktlen)
73 u_char *pkt; 76 u_char *pkt;
74 { 77 {
78 if (no_output && !logF)
79 return;
75 switch (pkt[0]) { 80 switch (pkt[0]) {
76 case RVT_L23_HEADER: 81 case RVT_L23_HEADER:
77 log_sent_gpf(pkt, pktlen); 82 log_sent_gpf(pkt, pktlen);
78 return; 83 return;
79 case RVT_AT_HEADER: 84 case RVT_AT_HEADER:
80 log_sent_ati(pkt, pktlen); 85 log_sent_ati(pkt, pktlen);
81 return; 86 return;
87 case RVT_TCH_HEADER:
88 if (verbose)
89 goto generic;
90 tch_inc_count_tx();
91 return;
82 default: 92 default:
93 generic:
83 log_sent_other(pkt, pktlen); 94 log_sent_other(pkt, pktlen);
84 } 95 }
85 } 96 }