aboutsummaryrefslogtreecommitdiffstats
path: root/src/diag_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/diag_io.c')
-rw-r--r--src/diag_io.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/diag_io.c b/src/diag_io.c
index b4313bb..087eecf 100644
--- a/src/diag_io.c
+++ b/src/diag_io.c
@@ -41,6 +41,9 @@ int diag_transmit_msgb(struct diag_instance *di, struct msgb *msg)
struct diag_send_desc_type send;
struct diag_hdlc_dest_type enc = { NULL, NULL, 0 };
+ if (di->flags & DIAG_INST_F_HEXDUMP)
+ printf("Tx: %s\n", msgb_hexdump(msg));
+
send.state = DIAG_STATE_START;
send.pkt = msgb_data(msg);
send.last = msgb_data(msg) + msgb_length(msg) - 1;
@@ -128,6 +131,10 @@ struct msgb *diag_read_msg(struct diag_instance *di)
msgb_free(msg);
return NULL;
}
+
+ if (di->flags & DIAG_INST_F_HEXDUMP)
+ printf("Rx: %s\n", msgb_hexdump(msg));
+
return msg;
}