# HG changeset patch # User Michael Spacefalcon # Date 1409557379 0 # Node ID c2f2f7d784515e2d490e5f888d633c2c3e95ae60 # Parent 42c91c51ca7f02f98eed7202b12b8b89ce1eac3b rvinterf: log sent GPF packets with the same decoding as received ones diff -r 42c91c51ca7f -r c2f2f7d78451 rvinterf/lowlevel/logsent.c --- a/rvinterf/lowlevel/logsent.c Mon Sep 01 06:23:38 2014 +0000 +++ b/rvinterf/lowlevel/logsent.c Mon Sep 01 07:42:59 2014 +0000 @@ -6,9 +6,22 @@ #include #include #include +#include "../include/pktmux.h" #include "../include/limits.h" -log_sent_packet(pkt, pktlen) +static void +log_sent_gpf(pkt, pktlen) + u_char *pkt; +{ + char buf[MAX_PKT_TO_TARGET*4+30]; + + strcpy(buf, "Sent "); + format_g23_packet(pkt, pktlen, buf + 5); + output_line(buf); +} + +static void +log_sent_other(pkt, pktlen) u_char *pkt; { char buf[MAX_PKT_TO_TARGET*3+5]; @@ -25,3 +38,12 @@ *dp = '\0'; output_line(buf); } + +log_sent_packet(pkt, pktlen) + u_char *pkt; +{ + if (pkt[0] == RVT_L23_HEADER) + log_sent_gpf(pkt, pktlen); + else + log_sent_other(pkt, pktlen); +}