comparison rvinterf/lowlevel/rviftmode.c @ 932:3d1abb9f05ef

rvinterf proper: move TM logging to new module
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 23 May 2023 06:20:21 +0000
parents
children bd6dd6120180
comparison
equal deleted inserted replaced
931:bb7a03cc1e43 932:3d1abb9f05ef
1 /*
2 * This module is for rvinterf only. Whenever we send or receive Test Mode
3 * packets, we should be a little more intelligent about how we display and
4 * log them. By default we only print a one-line summary, and in verbose mode
5 * we also emit a full hex dump.
6 */
7
8 #include <sys/types.h>
9 #include <stdio.h>
10 #include <string.h>
11 #include <strings.h>
12
13 extern u_char rxpkt[];
14 extern size_t rxpkt_len;
15 extern int verbose;
16
17 extern void output_cont();
18
19 void
20 log_sent_tm(pkt, pktlen)
21 u_char *pkt;
22 {
23 output_line("Sent Test Mode packet");
24 packet_hex_dump(pkt, pktlen, output_cont);
25 }
26
27 void
28 print_tm_output_new()
29 {
30 output_line("Rx Test Mode packet");
31 packet_hex_dump(rxpkt, (unsigned) rxpkt_len, output_cont);
32 }